Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The BSP must declare an instance of the BSP API type (FS_NAND_CTRLR_GEN_BSP_API) as a global variable within the source code. The API structure is an ordered list of function pointers used by the generic controller layer implementation. The BSP API type is shown in Listing - Example BSP API structure for generic controller.

An example of a BSP API structure definition is shown in the listing below:

Code Block
languagecpp
titleListing - Example BSP API structure for generic controller
linenumberstrue
const  FS_NAND_CTRLR_GEN_BSP_API  FS_NAND_BSP_Example = {
    Open,                                                  (1)
    Close,                                                 (2)
    ChipSelEn,                                             (3)
    ChipSelDis,                                            (4)
    CmdWr,                                                 (5)
    AddrWr,                                                (6)
    DataWr,                                                (7)
    DataRd,                                                (8)
    WaitWhileBusy                                          (9)
};


A proper BSP should implement all of these functions. The  'Dev/NAND/BSP/Template/\Micrium\Software\uC-FS\Dev\NAND\BSP\Template\fs_dev_nand_ctrlr_gen_bsp.c' file, which contains a definition of API structure along with empty functions, is provided as a template to implement your BSP.

...