diff options
| author | Xian Wu <[email protected]> | 2023-12-27 18:41:52 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-12-27 18:41:52 +0800 |
| commit | 6360253c129afcb91d34770cb253eea8d837e66a (patch) | |
| tree | 065167006028882ff4d57208252d1e0ce9f3b4e4 /bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_flash.h | |
| parent | 7b4592c2d15bf90c1958bdbc840ea4df3d97cd96 (diff) | |
Synwit MCU 采用新的 BSP 框架,将 BSP 与 libraries 分离 (#8432)
Diffstat (limited to 'bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_flash.h')
| -rw-r--r-- | bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_flash.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_flash.h b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_flash.h new file mode 100644 index 0000000000..0ab4fb2116 --- /dev/null +++ b/bsp/synwit/libraries/SWM341_CSL/SWM341_StdPeriph_Driver/SWM341_flash.h @@ -0,0 +1,27 @@ +#ifndef __SWM341_FLASH_H__ +#define __SWM341_FLASH_H__ + + +uint32_t FLASH_Erase(uint32_t addr); +uint32_t FLASH_Write(uint32_t addr, uint32_t buff[], uint32_t count); + +void Flash_Param_at_xMHz(uint32_t x); + +#define FLASH_RES_OK 0 +#define FLASH_RES_TO 1 //Timeout +#define FLASH_RES_ERR 2 + + + +typedef void (*IAP_Cache_Reset_t)(uint32_t cfg, uint32_t flag); +typedef int (*IAP_Flash_Param_t)(uint32_t cfg0, uint32_t cfg1, uint32_t flag); +typedef int (*IAP_Flash_Erase_t)(uint32_t sector, uint32_t flag); +typedef int (*IAP_Flash_Write_t)(uint32_t flash_addr, uint32_t ram_addr, uint32_t count, uint32_t flag); + +extern const IAP_Cache_Reset_t IAP_Cache_Reset; +extern const IAP_Flash_Param_t IAP_Flash_Param; +extern const IAP_Flash_Erase_t IAP_Flash_Erase; +extern const IAP_Flash_Write_t IAP_Flash_Write; + + +#endif //__SWM341_FLASH_H__ |
