Marzogh / SPIMemory

Arduino library for Flash Memory Chips (SPI based only). Formerly SPIFlash

Home Page:http://spimemory.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Sofus199 opened this issue · comments

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<SPIMemory.h>
#include<SPI.h>

//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