|
SmartSnippets DA1459x SDK
|
Go to the documentation of this file.
49 #if dg_configFLASH_ADAPTER
62 # if dg_configQSPI_AUTOMODE_ENABLE
63 # define AD_FLASH_GET_SECTOR_SIZE(addr) ((addr >= EFLASH_MEM1_VIRTUAL_BASE_ADDR && \
64 addr < (EFLASH_MEM1_VIRTUAL_BASE_ADDR + MEMORY_EFLASH_SIZE)) ? \
65 EFLASH_SECTOR_SIZE : FLASH_SECTOR_SIZE)
66 # define AD_FLASH_MAX_SECTOR_SIZE (MAX(EFLASH_SECTOR_SIZE, FLASH_SECTOR_SIZE))
68 # define AD_FLASH_GET_SECTOR_SIZE(addr) (EFLASH_SECTOR_SIZE)
69 # define AD_FLASH_MAX_SECTOR_SIZE (EFLASH_SECTOR_SIZE)
95 size_t ad_flash_read(uint32_t addr, uint8_t *buf,
size_t len);
114 size_t ad_flash_write(uint32_t addr,
const uint8_t *buf,
size_t size);
148 # if (dg_configQSPI_AUTOMODE_ENABLE == 1)
149 }
else if (qspi_automode_is_valid_virtual_addr(addr)) {
150 return qspi_automode_get_physical_addr(addr);
223 #define AD_FLASH_ALWAYS_FLUSH_CACHE ((uint32_t) - 1)
size_t ad_flash_write(uint32_t addr, const uint8_t *buf, size_t size)
Write data to flash memory.
__RETAINED_CODE bool eflash_automode_is_valid_virtual_addr(uint32_t addr)
Verify if given virtual address points to EFLASH memory.
void ad_flash_lock(void)
Lock the flash adapter to prevent multiple tasks from accessing the same flash memory simultaneously.
size_t ad_flash_erase_size(uint32_t addr)
Get minimum flash erasable size (sector size)
const __RETAINED_CODE void * eflash_automode_get_physical_addr(uint32_t virtual_addr)
Get the physical address of eFlash memory for the given virtual address.
bool ad_flash_chip_erase_by_addr(uint32_t addr)
Perform full erase of a specified flash memory.
Access QSPI device when running in auto mode.
void ad_flash_init(void)
Initialize the flash adapter.
int ad_flash_update_possible(uint32_t addr, const uint8_t *data_to_write, size_t size)
Check if a flash update can be performed without erasing memory.
void ad_flash_skip_cache_flushing(uint32_t base, uint32_t size)
Control cache flushing on modifications to a specified flash region.
void ad_flash_unlock(void)
Release lock on flash adapter.
size_t ad_flash_read(uint32_t addr, uint8_t *buf, size_t len)
Read data from flash memory.
Access EFLASH device when running in auto mode.
bool ad_flash_erase_region(uint32_t addr, size_t size)
Erase a flash memory region.
const __STATIC_INLINE void * ad_flash_get_ptr(uint32_t addr)
Translate a virtual address to a pointer that directly accesses the corresponding physical flash memo...
Definition: ad_flash.h:144