#ifndef myftl_h__ #define myftl_h__ #include "stdint.h" typedef int (*nand_init)(void); typedef uint32_t (*nand_read_id)(void); typedef uint32_t (*nand_read_page_8b) (uint16_t plan,uint16_t block,uint16_t page,uint8_t *buff,uint32_t size); typedef uint32_t (*nand_read_page_spare_area_8b) (uint16_t plan,uint16_t block,uint16_t page,uint8_t *buff,uint32_t size); typedef uint32_t (*nand_write_page_8b) (uint16_t plan,uint16_t block,uint16_t page,uint8_t *buff,uint32_t size); typedef uint32_t (*nand_write_page_spare_area_8b) (uint16_t plan,uint16_t block,uint16_t page,uint8_t *buff,uint32_t size); typedef int (*nand_erase_block)(uint16_t plan,uint16_t block); typedef struct{ nand_init init; nand_read_id read_id; nand_read_page_8b read_page; nand_read_page_spare_area_8b read_page_spare_area; nand_write_page_8b write_page; nand_write_page_spare_area_8b write_page_spare_area; nand_erase_block erase_block; }nand_if; #endif