增加文件系统
This commit is contained in:
@@ -144,6 +144,36 @@ int gd5f2gq5ue_erase(long offset, size_t size);
|
||||
*/
|
||||
int gd5f2gq5ue_reset(void);
|
||||
|
||||
/*
|
||||
* 函数功能:查询块是否坏块
|
||||
* 入口参数:block - 块编号 uint32_t 0 ~ GD5F_TOTAL_BLOCKS-1
|
||||
* 返回值:0 - 好块,1 - 坏块
|
||||
* 限定条件:gd5f2gq5ue_init() 已成功调用
|
||||
* 函数说明:通过 BBT(Bad Block Table)查询,BBT 在 init 阶段 ECC 使能前扫描构建
|
||||
*/
|
||||
int gd5f2gq5ue_is_block_bad(uint32_t block);
|
||||
|
||||
/*
|
||||
* 函数功能:标记块为坏块
|
||||
* 入口参数:block - 块编号 uint32_t 0 ~ GD5F_TOTAL_BLOCKS-1
|
||||
* 返回值:无
|
||||
* 限定条件:gd5f2gq5ue_init() 已成功调用
|
||||
* 函数说明:更新 BBT,并尝试物理标记该块最后一页 spare byte 0 为 0x00
|
||||
*/
|
||||
void gd5f2gq5ue_mark_block_bad(uint32_t block);
|
||||
|
||||
/* ==================== SPI 原语(FTL 共享) ==================== */
|
||||
|
||||
int gd5f_wait_busy(uint32_t timeout_ms);
|
||||
int gd5f_write_enable(void);
|
||||
int gd5f_read_status(uint8_t *p_status);
|
||||
int gd5f_page_read(uint32_t page_addr);
|
||||
int gd5f_read_from_cache(uint16_t column, uint8_t *p_buf, size_t size);
|
||||
int gd5f_program_load(uint16_t column, const uint8_t *p_buf, size_t size);
|
||||
int gd5f_program_exec(uint32_t page_addr);
|
||||
int gd5f_block_erase(uint32_t block_addr);
|
||||
int gd5f_check_ecc(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user