55#include <hardware/flash.h>
56#define WHISKERS_FLASH_SIZE PICO_FLASH_SIZE_BYTES
58#define WHISKERS_FLASH_SIZE 0
59#define FLASH_PAGE_SIZE 0
60#define FLASH_SECTOR_SIZE 0
HAL_ERROR check_memory_integrity_page(uint32_t page, char checkagainst[FLASH_PAGE_SIZE])
Checks a page against a known correct value to see if that page is still good to use.
#define FLASH_PAGE_SIZE
This is 256 bytes for board versions(s) 1.0.
Definition flash.h:59
HAL_ERROR read_sector(uint32_t sector, char buf[FLASH_SECTOR_SIZE])
Reads a sector from memory.
HAL_ERROR read_page(uint32_t page, char buf[FLASH_PAGE_SIZE])
Reads a page from memory.
HAL_ERROR write_sector(uint32_t sector, char buf[FLASH_SECTOR_SIZE])
Writes a sector-sized amount of data.
HAL_ERROR erase_page(uint32_t page)
Erases a page.
HAL_ERROR erase_sector(uint32_t sector)
Erases a sector.
HAL_ERROR check_memory_integrity_sector(uint32_t sector, char checkagainst[FLASH_SECTOR_SIZE])
Checks a sector against a known correct value to see if that sector is still good to use.
#define FLASH_SECTOR_SIZE
This is 4Kb (4096b) for board version(s) 1.0.
Definition flash.h:60
HAL_ERROR write_page(uint32_t page, char buf[FLASH_PAGE_SIZE])
Writes a page-sized amount of data.
Shared structs, error codes, and functions for all HAL files.
uint8_t HAL_ERROR
This type represents a HAL_* error. See the defines in the file to read up on them.
Definition shared.h:31