The generic controller extension layer allows extending the generic controller through a number of hook functions that are used by the generic controller, when flexibility in handling a specific operation is desirable. A generic controller extension is defined through a structure of type FS_NAND_CTRLR_GEN_EXT
, described in Listing - API structure type for generic controller extension. Note that all unused function pointers should be set to DEF_NULL
.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
typedef struct fs_nand_ctrlr_gen_ext {
void (*Init) (FS_ERR *p_err); (1)
void *(*Open) (FS_NAND_CTRLR_GEN_DATA *p_ctrlr_data, (2)
void *p_ext_cfg,
FS_ERR *p_err);
void (*Close) (void *p_ext_data); (3)
FS_NAND_PG_SIZE (*Setup) (FS_NAND_CTRLR_GEN_DATA *p_ctrlr_data, (4)
void *p_ext_data,
FS_ERR *p_err);
void (*RdStatusChk) (void *p_ext_data, (5)
FS_ERR *p_err);
void (*ECC_Calc) (void *p_ext_data, (6)
void *p_sec_buf,
void *p_oos_buf,
FS_NAND_PG_SIZE oos_size,
FS_ERR *p_err);
void (*ECC_Verify) (void *p_ext_data, (7)
void *p_sec_buf,
void *p_oos_buf,
FS_NAND_PG_SIZE oos_size,
FS_ERR *p_err);
} FS_NAND_CTLRR_GEN_EXT; |
Panel |
---|
(1) The (2) The (3) The (4) The (5) The (6) The (7) The |