45 bool writeData(
byte* bytes, uint32_t length);
52 int readData(
byte* dest, uint32_t length);
82 uint32_t
readMemory(
byte *dest, uint32_t length);
110 void writePage(uint32_t addr,
byte* bytes, uint32_t length);
Command
Commands for the AT25M02 chip. Pulled from the data sheet for this chip. All commands are MSB first.
Interfaces with the AT25M02 EEPROM chip.
void setWRSR(byte val)
Sets the WRSR (Write status reg)
uint32_t freeBufferBytes()
uint8_t write_buffer[256]
void init()
Initialize the AT25M02 EEPROM device. Define spi settings, chip select pin, and set initial variables...
void writePage(uint32_t addr, byte *bytes, uint32_t length)
Write the given data to the RAM in a page write. Increments mem_end when done.
void waitUntilReady()
Waits until the RAM is ready to write.
uint32_t readMemory(byte *dest, uint32_t length)
uint32_t usedMemoryBytes()
bool writeData(byte *bytes, uint32_t length)
Write from the given array to the memory. This data is appended to the end of the queue....
uint32_t usedBufferBytes()
bool isReady()
Checks if the RAM is ready for a new command.
uint32_t freeBytes()
Returns how many bytes are free and available to be written to.
uint32_t readWriteBuffer(byte *dest, uint32_t length)
void sendCommand(Command cmd)
uint32_t freeMemoryBytes()
uint32_t usedBytes()
Returns the number of bytes currently being used.