Pārlūkot izejas kodu

AVR compatibility

main
PaulStoffregen pirms 9 gadiem
vecāks
revīzija
db7e1870c5
2 mainītis faili ar 7 papildinājumiem un 3 dzēšanām
  1. +4
    -1
      SerialFlashChip.cpp
  2. +3
    -2
      examples/TestHardware/TestHardware.ino

+ 4
- 1
SerialFlashChip.cpp Parādīt failu

@@ -26,13 +26,16 @@
*/

#include "SerialFlash.h"
#include "SPIFIFO.h"

#define CSCONFIG() pinMode(6, OUTPUT)
#define CSASSERT() digitalWriteFast(6, LOW)
#define CSRELEASE() digitalWriteFast(6, HIGH)
#define SPICONFIG SPISettings(50000000, MSBFIRST, SPI_MODE0)

#if !defined(__arm__) || !defined(CORE_TEENSY)
#define digitalWriteFast(pin, state) digitalWrite((pin), (state))
#endif

uint16_t SerialFlashChip::dirindex = 0;
uint8_t SerialFlashChip::fourbytemode = 0;
uint8_t SerialFlashChip::busy = 0;

+ 3
- 2
examples/TestHardware/TestHardware.ino Parādīt failu

@@ -10,8 +10,9 @@ void setup() {
while (!Serial) ;
delay(10);

SPI.setSCK(14); // Audio shield has SCK on pin 14
SPI.setMOSI(7); // Audio shield has MOSI on pin 7
//uncomment these if using Teensy audio shield
//SPI.setSCK(14); // Audio shield has SCK on pin 14
//SPI.setMOSI(7); // Audio shield has MOSI on pin 7

Serial.println("Test Hardware");
SerialFlash.begin();

Notiek ielāde…
Atcelt
Saglabāt