Marzogh / SPIMemory

Arduino library for Flash Memory Chips (SPI based only). Formerly SPIFlash
http://spimemory.readthedocs.io/en/latest/
GNU General Public License v3.0
435 stars 138 forks source link

Bug report - SPIFlash flash(csPin, &SPI2); #224

Open Sofus199 opened 3 years ago

Sofus199 commented 3 years ago

First of all thanks for this amazing library!!!

But I'm trying to use this function/ call: SPIFlash flash(csPin, &SPI2);

It makes a error saying: no matching function for call to 'SPIFlash::SPIFlash(int&, SPIClass*)'

A bit of the Code:

include

include

//Define the memory library:

if defined(ARDUINO_SAMD_ZERO) && defined(SERIAL_PORT_USBVIRTUAL)

// Required for Serial on Zero based boards

define Serial SERIAL_PORT_USBVIRTUAL

endif

if defined (SIMBLEE)

define BAUD_RATE 250000

define RANDPIN 1

else

define BAUD_RATE 2000000 //Set your baute rate to this or change it acordingly

define RANDPIN A0

endif

//SPIFlash flash(31, &SPI1); int csPin = 31; //SPIFlash flash(31); SPIFlash flash(csPin, &SPI2);

I'm using teensy 3.6 and I just wan't it to be at another spi port. Otherwise it works perfect