
Installation
Firmware Package User Guide 2-9
4209A–MP3–12/02
2.3 SBC Libraries
Interface SBC module is composed of the following libraries:
nsbc.lib:this lib contains the common (not memory dependant) SBC functions.
nsbc_df.libthis lib contains the specific SBC functions for DataFlash support.
nsbc_mmc.lib:this lib contains the specific SBC functions for MultiMediaCard support.
nsbc_nf.lib:this lib contains the specific SBC functions for Nand Flash support.
nsbc_smc.lib:this lib contains the specific SBC functions for SmartMediaCard support.
2.3.1 Global Variables ngl_sbc_wr_busy
1-bit write activity, set to ON by library, must be set to OFF by consuming task (see
disp_task.c).
ngl_sbc_rd_busy
1-bit read activity, set to ON by library, must be set to OFF by consuming task (see
disp_task.c).
ngl_sbc_wr_protect
1-bit write protection, set to ON or OFF before calling the library command browser
(see usb_task.c).
ndCBWDataTransferLength
4-byte unsigned USB variable (declared in usb_task.c).
ngl_sbc_vendor_id
8-char table in code space(see Section 2.2.2 for configuration).
ngl_sbc_product_id
16-char table in code space (see Section 2.2.2 for configuration).
ngl_sbc_revision_id
4-char table in code space(see Section 2.2.2 for configuration).
2.3.2 Internal Library
Functions In the following items xxx may represent df, nf, smc,cf…depending on the memory
library.
nvoid sbc_xxx_init (void)
Memory dedicated SBC support initialization function.
nvoid sbc_command_xxx (void)
Memory dedictaed SBC support command parser function.
2.3.3 External Library
Functions In the following items xxx may represent df, nf, smc,cf…depending on the memory
library.
nxxx_block_size_0(), xxx_block_size_1(), xxx_block_size_2(), xxx_block_size_3():
4-byte unsigned block size (byte unit) reported byte by byte.
nxxx_disk_size_0(), xxx_disk_size_1(), xxx_disk_size_2(), xxx_disk_size_3():
4-byte unsigned disk size (block unit) reported byte by byte.
nxxx_read_open(void), xxx_read_sector(sector_nb), xxx_read_close(void)
functions implemented in memory driver module.
nxxx_write_open(void), xxx_write_sector(sector_nb), xxx_write_close(void)
functions implemented in memory driver module.
nxxx_check_presence()
function implemented in removable memory (card) driver module only.