|
| STATIC errcode_t | check_init_param (const sfc_flash_config_t *config) |
| |
| STATIC errcode_t | check_opt_param (uint32_t addr, uint32_t size) |
| |
| STATIC errcode_t | build_flash_ctrl (const flash_spi_info_t *spi_info, sfc_read_if_t read_type, sfc_write_if_t write_type) |
| |
| STATIC errcode_t | build_cmds (uint32_t flash_id, sfc_read_if_t read_type, sfc_write_if_t write_type) |
| |
| STATIC errcode_t | do_greedy_erase (uint32_t hal_erase_size, uint32_t start_sector) |
| |
| errcode_t | uapi_sfc_init (sfc_flash_config_t *config) |
| | 初始化并配置SFC,未识别的Flash默认采用单线读写512KB的配置。
|
| |
| errcode_t | uapi_sfc_init_rom (sfc_flash_config_t *config) |
| | 初始化并配置SFC。rom 默认采用单线读写512KB的配置。
|
| |
| void | uapi_sfc_deinit (void) |
| | 去初始化SFC。
|
| |
| SFC_SECTION errcode_t | uapi_sfc_reg_read (uint32_t flash_addr, uint8_t *read_buffer, uint32_t read_size) |
| | 提供寄存器模式读功能,读取的数据将按字节存入read_buffer中。不允许在中断中调用。
|
| |
| SFC_SECTION errcode_t | uapi_sfc_reg_write (uint32_t flash_addr, uint8_t *write_data, uint32_t write_size) |
| | 提供寄存器模式写功能,预计写入的数据按字节存入write_data中。不允许在中断中调用。
|
| |
| SFC_SECTION errcode_t | uapi_sfc_dma_read (uint32_t flash_addr, uint8_t *read_buffer, uint32_t read_size) |
| | 提供DMA模式读功能,读取的数据将按字节存入read_buffer中。不允许在中断中调用。
|
| |
| SFC_SECTION errcode_t | uapi_sfc_dma_write (uint32_t flash_addr, uint8_t *write_buffer, uint32_t write_size) |
| | 提供寄存器模式写功能,预计写入的数据按字节存入write_data中。不允许在中断中调用。
|
| |
| SFC_SECTION errcode_t | uapi_sfc_reg_erase (uint32_t flash_addr, uint32_t erase_size) |
| | 使用寄存器模式进行对Flash的擦除,不使能写回时强制要求地址和大小按扇区对齐。不允许在中断中调用。
|
| |
| SFC_SECTION errcode_t | uapi_sfc_reg_erase_chip (void) |
| | 使用寄存器模式对整片Flash进行擦除。不允许在中断中调用。
|
| |
| SFC_SECTION errcode_t | uapi_sfc_reg_other_flash_opt (sfc_flash_op_t cmd_type, uint8_t cmd, uint8_t *buffer, uint32_t length) |
| | 使用寄存器模式对Flash属性进行读写。不允许在中断中调用。
|
| |