SPIFlash class
Definition at line 161 of file SPIFlash.h.
#include <SPIFlash.h>
|
| SPIFlash (uint8_t slaveSelectPin, uint16_t jedecID=0) |
| Constructor.
|
|
bool | initialize () |
| setup SPI, read device ID etc...
|
|
void | command (uint8_t cmd, bool isWrite=false) |
| Send a command to the flash chip, pass TRUE for isWrite when its a write command.
|
|
uint8_t | readStatus () |
| return the STATUS register
|
|
uint8_t | readByte (uint32_t addr) |
| read 1 byte from flash memory
|
|
void | readBytes (uint32_t addr, void *buf, uint16_t len) |
| read unlimited # of bytes
|
|
void | writeByte (uint32_t addr, uint8_t byt) |
| Write 1 byte to flash memory.
|
|
void | writeBytes (uint32_t addr, const void *buf, uint16_t len) |
| write multiple bytes to flash memory (up to 64K), if define SPIFLASH_SST25TYPE is set AAI Word Programming will be used
|
|
bool | busy () |
| check if the chip is busy erasing/writing
|
|
void | chipErase () |
| erase entire flash memory array
|
|
void | blockErase4K (uint32_t address) |
| erase a 4Kbyte block
|
|
void | blockErase32K (uint32_t address) |
| erase a 32Kbyte block
|
|
void | blockErase64K (uint32_t addr) |
| erase a 64Kbyte block
|
|
uint16_t | readDeviceId () |
| Get the manufacturer and device ID bytes (as a short word)
|
|
uint8_t * | readUniqueId () |
| Get the 64 bit unique identifier, stores it in UNIQUEID[8].
|
|
void | sleep () |
| Put device to sleep.
|
|
void | wakeup () |
| Wake device.
|
|
void | end () |
| end
|
|
|
static uint8_t | UNIQUEID [8] |
| Storage for unique identifier.
|
|
The documentation for this class was generated from the following file: