107 bool readStatus(uint8_t &status1, uint8_t &status2);
186 bool readBuffer(uint32_t addr, uint8_t *buf, uint32_t len);
201 bool writeBuffer(uint32_t addr,
const uint8_t *data, uint32_t len);
204 SPI_HandleTypeDef *_hspi;
207 uint32_t _spiTimeoutMs;
233 HAL_StatusTypeDef writeEnable();
241 HAL_StatusTypeDef runCommand(uint8_t cmd);
251 HAL_StatusTypeDef readCommand(uint8_t cmd, uint8_t *resp, uint32_t len);
261 HAL_StatusTypeDef writeCommand(uint8_t cmd,
const uint8_t *data, uint32_t len);
270 HAL_StatusTypeDef eraseCommand(uint8_t cmd, uint32_t addr);
278 void fillAddress(uint8_t *buf, uint32_t addr);
bool eraseRange(uint32_t addr, uint32_t len)
Erases every sector spanned by [addr, addr + len), computing the sector boundaries automatically – th...
bool writeBuffer(uint32_t addr, const uint8_t *data, uint32_t len)
Writes len bytes starting at addr, paging internally at 256-byte boundaries as the chip's Page Progra...
: Header for main.c file. This file contains the common defines of the application.