|void||m25p16_eraseSector (uint32_t address)|
|const flashGeometry_t *||m25p16_getGeometry ()|
|void||m25p16_pageProgram (uint32_t address, const uint8_t *data, int length)|
|void||m25p16_pageProgramBegin (uint32_t address)|
|void||m25p16_pageProgramContinue (const uint8_t *data, int length)|
|int||m25p16_readBytes (uint32_t address, uint8_t *buffer, int length)|
|bool||m25p16_waitForReady (uint32_t timeoutMillis)|
|const flashGeometry_t* m25p16_getGeometry||(||)|
|const uint8_t *||data,|
Write bytes to a flash page. Address must not cross a page boundary.
Bits can only be set to zero, not from zero back to one again. In order to set bits to 1, use the erase command.
Length must be smaller than the page size.
This will wait for the flash to become ready before writing begins.
Datasheet indicates typical programming time is 0.8ms for 256 bytes, 0.2ms for 64 bytes, 0.05ms for 16 bytes. (Although the maximum possible write time is noted as 5ms).
If you want to write multiple buffers (whose sum of sizes is still not more than the page size) then you can break this operation up into one beginProgram call, one or more continueProgram calls, and one finishProgram call.
|void m25p16_pageProgramContinue||(||const uint8_t *||data,|
length bytes into the provided
buffer from the flash starting from the given
address (which need not lie on a page boundary).
Waits up to DEFAULT_TIMEOUT_MILLIS milliseconds for the flash to become ready before reading.
The number of bytes actually read is returned, which can be zero if an error or timeout occurred.