|
| DataFlash () |
| Constructor.
|
|
| ~DataFlash () |
| Destructor.
|
|
void | setup (int8_t csPin, int8_t resetPin=-1, int8_t wpPin=-1) |
| Set pin use, with defaults for reset and write-protect if not specified as argument.
|
|
void | begin () |
| Initialise SPI interface for use with the Dataflash, allowing shared use with other SPI devices (which must however use a different chip select pin).
|
|
void | end () |
| Restore SPI configuration, so it can be used by other SPI devices.
|
|
void | enable () |
| Enable (select) Dataflash.
|
|
void | disable () |
| Disable (deselect) Dataflash.
|
|
void | reEnable () |
| Disable (deselect) Dataflash, then enable (select) it again.
|
|
void | autoErase () |
| Set erase mode to automatic (default).
|
|
void | manualErase () |
| Set erase mode to manual.
|
|
uint8_t | isReady () |
| Return whether the chip has completed the current operation and is ready for the next.
|
|
void | waitUntilReady () |
| Wait until the chip is ready.
|
|
void | endAndWait () |
| Same as waitUntilReady.
|
|
uint8_t | status () |
| Read status register.
|
|
void | readID (DataFlash::ID &id) |
| Read Manufacturer and Device ID.
|
|
void | pageRead (uint16_t page, uint16_t offset=0) |
| A main memory page read allows the user to read data directly from any one of the pages in the main memory, bypassing both of the data buffers and leaving the contents of the buffers unchanged.
|
|
void | arrayRead (uint16_t page, uint16_t offset=0) |
| Sequentially read a continuous stream of data at the currently set speed.
|
|
void | bufferRead (uint8_t bufferNum, uint16_t offset=0) |
| Read the content of one of the SRAM data buffer at the currently set speed.
|
|
void | bufferWrite (uint8_t bufferNum, uint16_t offset) |
| Write data to one of the SRAM data buffers at the currently set speed.
|
|
void | bufferToPage (uint8_t bufferNum, uint16_t page) |
| Transfer data from buffer 0 or 1 to a main memory page, erasing the page first if auto-erase is set.
|
|
void | pageToBuffer (uint16_t page, uint8_t bufferNum) |
| Transfer a page of data from main memory to buffer 0 or 1.
|
|
void | pageErase (uint16_t page) |
| Erase a page in the main memory array.
|
|
void | blockErase (uint16_t block) |
| Erase a block of pages in a single operation.
|
|
void | sectorErase (int8_t sector) |
| Erase a sector of blocks in a single operation.
|
|
void | beginPageWriteThroughBuffer (uint16_t page, uint16_t offset, uint8_t bufferNum) |
| This a combination of Buffer Write and Buffer to Page with Built-in Erase.
|
|
int8_t | isPageEqualBuffer (uint16_t page, uint8_t bufferNum) |
| Compare a page of data in main memory to the data in buffer 0 or 1.
|
|
void | deepPowerDown () |
| Put the device into the lowest power consumption mode.
|
|
void | resumeFromDeepPowerDown () |
| Takes the device out of Deep Power-down mode.
|
|
void | hardReset () |
| Reset device via the reset pin.
|
|
void | writeProtect () |
| Enable write protection.
|
|
void | readWrite () |
| Disable write protection.
|
|
int8_t | chipSelectPin () const |
| Get chip Select (CS) pin.
|
|
int8_t | resetPin () const |
| Get reset (RESET) pin.
|
|
int8_t | writeProtectPin () const |
| Get write protect (WP) pin.
|
|
AT45DBxxxD Atmel Dataflash device.