|
| typedef errcode_t(* | hal_sfc_get_flash_id_t) (uint32_t *flash_id) |
| | 获取Flash ID操作
|
| |
| typedef errcode_t(* | hal_sfc_init_t) (flash_spi_ctrl_t *spi_ctrl, uint32_t mapping_address, uint32_t flash_size) |
| | SFC 初始化操作。
|
| |
| typedef void(* | hal_sfc_deinit_t) (void) |
| | SFC 去初始化操作。
|
| |
| typedef errcode_t(* | hal_sfc_reg_read_t) (uint32_t flash_addr, uint8_t *read_buffer, uint32_t read_size, spi_opreation_t read_opreation) |
| | SFC 内嵌SPI模式读操作。
|
| |
| typedef errcode_t(* | hal_sfc_reg_write_t) (uint32_t flash_addr, uint8_t *write_data, uint32_t write_size, spi_opreation_t write_opreation) |
| | SFC 内嵌SPI模式写操作。
|
| |
| typedef errcode_t(* | hal_sfc_reg_erase_t) (uint32_t flash_addr, spi_opreation_t erase_opreation, bool delete_chip) |
| | SFC 内嵌SPI模式擦除操作。
|
| |
| typedef errcode_t(* | hal_sfc_reg_flash_opreation_t) (uint32_t opt_type, uint8_t cmd, uint8_t *buffer, uint32_t length) |
| | SFC 内嵌SPI模式Flash其他操作。
|
| |
| typedef errcode_t(* | hal_sfc_dma_read_t) (uint32_t flash_addr, uint8_t *read_buffer, uint32_t read_size) |
| | SFC dma模式读操作
|
| |
| typedef errcode_t(* | hal_sfc_dma_write_t) (uint32_t flash_addr, uint8_t *write_data, uint32_t write_size) |
| | SFC dma模式读操作。
|
| |
| typedef struct hal_sfc_funcs | hal_sfc_funcs_t |
| | HAL层SFC的接口
|
| |
| typedef errcode_t(* | hal_sfc_reg_flash_opreation_t) (uint32_t opt_type, uint8_t cmd, uint8_t *buffer, uint32_t length) |
| | SFC 内嵌SPI模式Flash其他操作。
|
| |
|
| errcode_t | hal_sfc_regs_init (void) |
| | 设置SFC寄存器的基地址
|
| |
| void | hal_sfc_regs_deinit (void) |
| | 清除由 hal_sfc_regs_init 设置的基地址
|
| |
| errcode_t | hal_sfc_register_funcs (hal_sfc_funcs_t *funcs) |
| | 注册 hal_sfc_funcs_t 到 g_hal_sfcs_funcs
|
| |
| void | hal_sfc_unregister_funcs (void) |
| | 从g_hal_sfcs_funcs注销 hal_sfc_funcs_t
|
| |
| hal_sfc_funcs_t * | hal_sfc_get_funcs (void) |
| | 获取Driver层SFC和HAL层SFC的接口实例,参考 hal_sfc_funcs_t.
|
| |
| errcode_t | hal_sfc_get_flash_id (uint32_t *flash_id) |
| | 获取Flash ID操作
|
| |
| errcode_t | hal_sfc_init (flash_spi_ctrl_t *spi_ctrl, uint32_t mapping, uint32_t flash_size) |
| | SFC 初始化操作。
|
| |
| void | hal_sfc_deinit (void) |
| | SFC 去初始化操作。
|
| |
| errcode_t | hal_sfc_reg_read (uint32_t flash_addr, uint8_t *read_buffer, uint32_t read_size, spi_opreation_t read_opreation) |
| | SFC 内嵌SPI模式读操作。
|
| |
| errcode_t | hal_sfc_reg_write (uint32_t flash_addr, uint8_t *write_data, uint32_t write_size, spi_opreation_t write_opreation) |
| | SFC 内嵌SPI模式写操作。
|
| |
| errcode_t | hal_sfc_reg_erase (uint32_t flash_addr, spi_opreation_t erase_opreation, bool delete_chip) |
| | SFC 内嵌SPI模式擦除操作。
|
| |
| errcode_t | hal_sfc_reg_flash_opreations (uint32_t opt_type, uint8_t cmd, uint8_t *buffer, uint32_t length) |
| | SFC 内嵌SPI模式Flash其他操作。
|
| |
| errcode_t | hal_sfc_dma_read (uint32_t flash_addr, uint8_t *read_buffer, uint32_t read_size) |
| | SFC dma模式读操作
|
| |
| errcode_t | hal_sfc_dma_write (uint32_t flash_addr, uint8_t *write_data, uint32_t write_size) |
| | SFC dma模式读操作。
|
| |
| errcode_t | hal_sfc_lock_protect (uint32_t flash_id, uint8_t region) |
| | 使能或失能SFC写保护。
|
| |
| errcode_t | hal_sfc_unlock_protect (uint32_t flash_id) |
| | 失能SFC写保护。
|
| |
Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2022-2022. All rights reserved.
Description: Provides hal sfc
History:
2022-12-01, Create file.
◆ SFC_SECTION
◆ hal_sfc_deinit_t
| typedef void(* hal_sfc_deinit_t) (void) |
◆ hal_sfc_dma_read_t
| typedef errcode_t(* hal_sfc_dma_read_t) (uint32_t flash_addr, uint8_t *read_buffer, uint32_t read_size) |
◆ hal_sfc_dma_write_t
| typedef errcode_t(* hal_sfc_dma_write_t) (uint32_t flash_addr, uint8_t *write_data, uint32_t write_size) |
◆ hal_sfc_funcs_t
◆ hal_sfc_get_flash_id_t
| typedef errcode_t(* hal_sfc_get_flash_id_t) (uint32_t *flash_id) |
◆ hal_sfc_init_t
◆ hal_sfc_reg_erase_t
◆ hal_sfc_reg_flash_opreation_t [1/2]
| typedef errcode_t(* hal_sfc_reg_flash_opreation_t) (uint32_t opt_type, uint8_t cmd, uint8_t *buffer, uint32_t length) |
◆ hal_sfc_reg_flash_opreation_t [2/2]
| typedef errcode_t(* hal_sfc_reg_flash_opreation_t) (uint32_t opt_type, uint8_t cmd, uint8_t *buffer, uint32_t length) |
◆ hal_sfc_reg_read_t
| typedef errcode_t(* hal_sfc_reg_read_t) (uint32_t flash_addr, uint8_t *read_buffer, uint32_t read_size, spi_opreation_t read_opreation) |
◆ hal_sfc_reg_write_t
| typedef errcode_t(* hal_sfc_reg_write_t) (uint32_t flash_addr, uint8_t *write_data, uint32_t write_size, spi_opreation_t write_opreation) |
◆ hal_sfc_deinit()
| void hal_sfc_deinit |
( |
void |
| ) |
|
◆ hal_sfc_dma_read()
| errcode_t hal_sfc_dma_read |
( |
uint32_t |
flash_addr, |
|
|
uint8_t * |
read_buffer, |
|
|
uint32_t |
read_size |
|
) |
| |
◆ hal_sfc_dma_write()
| errcode_t hal_sfc_dma_write |
( |
uint32_t |
flash_addr, |
|
|
uint8_t * |
write_data, |
|
|
uint32_t |
write_size |
|
) |
| |
◆ hal_sfc_get_flash_id()
| errcode_t hal_sfc_get_flash_id |
( |
uint32_t * |
flash_id | ) |
|
◆ hal_sfc_get_funcs()
◆ hal_sfc_init()
◆ hal_sfc_lock_protect()
| errcode_t hal_sfc_lock_protect |
( |
uint32_t |
flash_id, |
|
|
uint8_t |
region |
|
) |
| |
◆ hal_sfc_reg_erase()
◆ hal_sfc_reg_flash_opreations()
| errcode_t hal_sfc_reg_flash_opreations |
( |
uint32_t |
opt_type, |
|
|
uint8_t |
cmd, |
|
|
uint8_t * |
buffer, |
|
|
uint32_t |
length |
|
) |
| |
◆ hal_sfc_reg_read()
| errcode_t hal_sfc_reg_read |
( |
uint32_t |
flash_addr, |
|
|
uint8_t * |
read_buffer, |
|
|
uint32_t |
read_size, |
|
|
spi_opreation_t |
read_opreation |
|
) |
| |
◆ hal_sfc_reg_write()
| errcode_t hal_sfc_reg_write |
( |
uint32_t |
flash_addr, |
|
|
uint8_t * |
write_data, |
|
|
uint32_t |
write_size, |
|
|
spi_opreation_t |
write_opreation |
|
) |
| |
◆ hal_sfc_register_funcs()
◆ hal_sfc_regs_deinit()
| void hal_sfc_regs_deinit |
( |
void |
| ) |
|
◆ hal_sfc_regs_init()
◆ hal_sfc_unlock_protect()
| errcode_t hal_sfc_unlock_protect |
( |
uint32_t |
flash_id | ) |
|
◆ hal_sfc_unregister_funcs()
| void hal_sfc_unregister_funcs |
( |
void |
| ) |
|