flashmem.h
Go to the documentation of this file.
140 flash_sector_t flashmem_find_sector(flash_addr_t address, flash_addr_t* pstart, flash_addr_t* pend);
uint32_t spi_flash_get_id(void)
bool flashmem_erase_sector(flash_sector_t sector_id)
Erase a single flash sector.
SPIFlashSize flashmem_get_size_type(void)
Returns a number indicating the size of flash memory chip.
flash_sector_t flashmem_get_size_sectors(void)
Get the total number of flash sectors.
uint32_t flashmem_read(void *to, flash_addr_t fromaddr, uint32_t size)
Read a block of data from flash.
flash_sector_t flashmem_get_sector_of_address(flash_addr_t addr)
Get sector number containing the given address.
uint32_t flashmem_write(const void *from, flash_addr_t toaddr, uint32_t size)
Write a block of data to flash.
uint32_t flashmem_get_first_free_block_address(void)
Definition: flashmem.h:153
flash_sector_t flashmem_find_sector(flash_addr_t address, flash_addr_t *pstart, flash_addr_t *pend)
Helper function: find the flash sector in which an address resides.
flash_addr_t flashmem_get_address(const void *memptr)
Obtain the flash memory address for a memory pointer.
1.9.1