SPIMemory
SPIMemory copied to clipboard
Examples fail to compile
I'm using a Teensy 4.0, and an SST25PF040C connected to the SPI bus (chip select pin to)
I tried running readWriteString.ino with no code changes
readWriteString:33: error: no matching function for call to 'SPIFlash::SPIFlash()' SPIFlash flash;
I changed code to SPIFlash flash(10); //matches my chip select
compiled and get another error readWriteString:43: error: 'class SPIFlash' has no member named 'begin' flash.begin();
I changed code to flash.begin(1); // nothing will compile
readWriteString: In function 'void setup()': readWriteString:43: error: 'class SPIFlash' has no member named 'begin' flash.begin(1); ^ readWriteString:46: error: 'class SPIFlash' has no member named 'getCapacity' strAddr = random(0, flash.getCapacity()); ^ readWriteString:48: error: 'class SPIFlash' has no member named 'writeStr' flash.writeStr(strAddr, inputString); ^ readWriteString:54: error: 'class SPIFlash' has no member named 'readStr' if (flash.readStr(strAddr, outputString)) { ^ readWriteString:60: error: 'class SPIFlash' has no member named 'eraseSector' while (!flash.eraseSector(strAddr)); ^ Multiple libraries were found for "SPIFlash.h" Used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPIFlash Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPIFlash-master 'class SPIFlash' has no member named 'begin'
Can you post a working example?