SmartSnippets DA1459x SDK
eflash_automode.h
Go to the documentation of this file.
1 
42 #ifndef EFLASH_AUTOMODE_H_
43 #define EFLASH_AUTOMODE_H_
44 
45 
46 #include "hw_fcu.h"
47 
48 /*
49  * EFLASH sector size
50  */
51 #define EFLASH_SECTOR_SIZE (HW_FCU_FLASH_PAGE_SIZE_IN_BYTES)
52 
53 #include <sdk_defs.h>
54 
67 __RETAINED_CODE const void *eflash_automode_get_physical_addr(uint32_t virtual_addr);
68 
81 __RETAINED_CODE bool eflash_automode_is_valid_virtual_address_range(uint32_t addr, uint32_t len);
82 
90 __RETAINED_CODE bool eflash_automode_is_valid_virtual_addr(uint32_t addr);
91 
98 __ALWAYS_RETAINED_CODE void eflash_automode_wakeup(void);
99 
105 __ALWAYS_RETAINED_CODE void eflash_automode_sleep(void);
106 
118 uint32_t eflash_automode_read(uint32_t addr, uint8_t *buf, uint32_t len);
119 
137 __ALWAYS_RETAINED_CODE uint32_t eflash_automode_write_page(uint32_t addr, const uint8_t *buf, uint32_t len);
138 
150 __ALWAYS_RETAINED_CODE bool eflash_automode_erase_sector(uint32_t addr);
151 
161 __RETAINED_CODE bool eflash_automode_erase_chip(void);
162 
163 
164 #endif /* EFLASH_AUTOMODE_H_ */
165 
eflash_automode_is_valid_virtual_addr
__RETAINED_CODE bool eflash_automode_is_valid_virtual_addr(uint32_t addr)
Verify if given virtual address points to EFLASH memory.
sdk_defs.h
Central include header file with platform definitions.
eflash_automode_get_physical_addr
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.
eflash_automode_write_page
__ALWAYS_RETAINED_CODE uint32_t eflash_automode_write_page(uint32_t addr, const uint8_t *buf, uint32_t len)
Write data to EFLASH memory page.
hw_fcu.h
Definition of API for the FCU Low Level Driver.
eflash_automode_wakeup
__ALWAYS_RETAINED_CODE void eflash_automode_wakeup(void)
Wakeup EFLASH.
eflash_automode_erase_chip
__RETAINED_CODE bool eflash_automode_erase_chip(void)
Erase chip.
eflash_automode_sleep
__ALWAYS_RETAINED_CODE void eflash_automode_sleep(void)
Sef EFLASH to sleep mode.
eflash_automode_erase_sector
__ALWAYS_RETAINED_CODE bool eflash_automode_erase_sector(uint32_t addr)
Erase EFLASH sector.
eflash_automode_read
uint32_t eflash_automode_read(uint32_t addr, uint8_t *buf, uint32_t len)
Read data from EFLASH memory.
eflash_automode_is_valid_virtual_address_range
__RETAINED_CODE bool eflash_automode_is_valid_virtual_address_range(uint32_t addr, uint32_t len)
Check if the virtual address range from addr to addr + len is valid.