API Summary

Utility macros
LIBMEM_ADDRESS_IN_RANGE Determine whether an address is within an address range
LIBMEM_ADDRESS_IS_ALIGNED Determine whether an address is aligned to a specified width
LIBMEM_ALIGNED_ADDRESS Return an address aligned to a specified width
LIBMEM_KB Convert kilobytes to bytes
LIBMEM_MB Convert megabytes to bytes
LIBMEM_RANGE_OCCLUDES_RANGE Determine whether an address range overlaps another address range or vice versa
LIBMEM_RANGE_OVERLAPS_RANGE Determine whether an address range overlaps another address range
LIBMEM_RANGE_WITHIN_RANGE Determine whether an address range is within another address range
Return codes
LIBMEM_STATUS_CFI_ERROR Error reading CFI information return code
LIBMEM_STATUS_ERROR Non-specific error return code
LIBMEM_STATUS_GEOMETRY_REGION_OVERFLOW No room for geometry information return code
LIBMEM_STATUS_INVALID_DEVICE Invalid or mismatched device return code
LIBMEM_STATUS_INVALID_PARAMETER Invalid parameter return code
LIBMEM_STATUS_INVALID_RANGE Invalid range return code
LIBMEM_STATUS_INVALID_WIDTH Invalid or unsupported device width return code
LIBMEM_STATUS_LOCKED Memory locked return code
LIBMEM_STATUS_NOT_IMPLEMENTED Not implemented return code
LIBMEM_STATUS_NO_DRIVER No driver for memory range return code
LIBMEM_STATUS_SUCCESS Successful operation return code
LIBMEM_STATUS_TIMEOUT Timeout error return code
Command set macros
LIBMEM_CFI_CMDSET_AMD_EXTENDED AMD standard command set
LIBMEM_CFI_CMDSET_AMD_STANDARD AMD standard command set
LIBMEM_CFI_CMDSET_INTEL_EXTENDED Intel extended command set
LIBMEM_CFI_CMDSET_INTEL_STANDARD Intel standard command set
LIBMEM_CFI_CMDSET_MITSUBISHI_EXTENDED Mitsubishi extended command set
LIBMEM_CFI_CMDSET_MITSUBISHI_STANDARD Mitsubishi standard command set
LIBMEM_CFI_CMDSET_NONE Invalid CFI command set
LIBMEM_CFI_CMDSET_RESERVED Reserved command set
LIBMEM_CFI_CMDSET_SST_PAGE_WRITE SST page write command set
LIBMEM_CFI_CMDSET_WINBOND_STANDARD Winbond standard command set
Macros
LIBMEM_VERSION_NUMBER LIBMEM interface version number
Configuration macros
LIBMEM_INLINE Inline definition
Driver helper macros
LIBMEM_DRIVER_PAGED_WRITE_OPTION_DISABLE_PAGE_PRELOAD Option to disable paged write data pre-loading
Data types
_libmem_driver_functions_t Structure containing pointers to a LIBMEM driver's functions
_libmem_driver_handle_t LIBMEM driver handle structure
_libmem_driver_paged_write_ctrlblk_t Paged write control block
_libmem_ext_driver_functions_t Structure containing pointers to a LIBMEM driver's extended functions
_libmem_flash_info_t Structure containing information about a specific FLASH chip
_libmem_geometry_t Structure describing a geometry region
_libmem_sector_info_t Structure describing a sector
Static data
libmem_busy_handler_fn Pointer to a function that should be called each time LIBMEM iterates a busy loop
libmem_drivers Pointer to the first registered LIBMEM driver
libmem_get_ticks_fn Pointer to a function that returns the current timer tick count
libmem_ticks_per_second How fast the tick increments
Function pointers
libmem_busy_handler_fn_t A pointer to a function to be called each time LIBMEM iterates a busy loop
libmem_driver_crc32_fn_t A function pointer to a LIBMEM driver's crc32 extended function
libmem_driver_erase_fn_t A function pointer to a LIBMEM driver's erase function
libmem_driver_fill_fn_t A function pointer to a LIBMEM driver's fill function
libmem_driver_flush_fn_t A function pointer to a LIBMEM driver's flush function
libmem_driver_inrange_fn_t A function pointer to a LIBMEM driver's inrange extended function
libmem_driver_lock_fn_t A function pointer to a LIBMEM driver's lock function
libmem_driver_page_write_fn_t A function pointer to a function implementing a paged write operation
libmem_driver_read_fn_t A function pointer to a LIBMEM driver's read extended function
libmem_driver_unlock_fn_t A function pointer to a LIBMEM driver's unlock function
libmem_driver_write_fn_t A function pointer to a LIBMEM driver's write function
libmem_foreach_driver_fn_t A function pointer to a function handling a libmem_foreach_driver call
libmem_foreach_sector_fn_t A function pointer to a function handling a libmem_foreach_sector or libmem_foreach_sector_in_range call
libmem_get_ticks_fn_t A pointer to a function returning the current timer tick count
Functions
libmem_cfi_get_info Return a FLASH memory device's common flash interface (CFI) information
libmem_crc32 Compute CRC-32 checksum
libmem_crc32_direct Compute CRC-32 checksum of an address range
libmem_enable_timeouts Enable LIBMEM operation timeouts
libmem_erase Erase a block of memory using a LIBMEM driver
libmem_erase_all Erase all memory using LIBMEM drivers
libmem_fill Fill memory with a specific data value using a LIBMEM driver
libmem_flush Flush any outstanding memory operations and return memory to read mode if applicable
libmem_foreach_driver Iterate through all drivers
libmem_foreach_sector Iterate through all sectors of a driver
libmem_foreach_sector_in_range Iterate through subset of sectors of a driver
libmem_foreach_sector_in_range_ex A helper function for iterating through all sectors in a specified geometry that are within a specific address range
libmem_get_driver Look up driver for address
libmem_get_driver_sector_size A helper function that locates the driver for a specific address and then returns the sector size for that address using the driver's geometry
libmem_get_geometry_size A helper function that returns the size of the address range described by a geometry description
libmem_get_number_of_regions A helper function that returns the number of geometry regions described by a geometry description
libmem_get_number_of_sectors A helper function that returns the number of sectors described by a geometry description
libmem_get_sector_info A helper function that returns the sector information for an address within a specified geometry
libmem_get_sector_number A helper function that returns the sector number of an address within a specified geometry
libmem_get_sector_size A helper function that returns the sector size for an address within a specified geometry
libmem_get_ticks Helper function that returns the current timer tick count
libmem_lock Lock a block of memory using a LIBMEM driver
libmem_lock_all Lock all memory using LIBMEM drivers
libmem_read Read a block of data using a LIBMEM driver
libmem_register_driver Register a LIBMEM driver instance
libmem_set_busy_handler Specify busy loop function
libmem_unlock Unlock a block of memory using a LIBMEM driver
libmem_unlock_all Unlock all memory using LIBMEM drivers
libmem_write Write a block of data using a LIBMEM driver
Driver helper functions
libmem_driver_paged_write A driver helper function that implements a paged write operation
libmem_driver_paged_write_fill A driver helper function that implements a paged write fill operation
libmem_driver_paged_write_flush A driver helper function that implements a paged write flush operation
libmem_driver_paged_write_init A driver helper function that initializes the paged write control bock
Generic FLASH drivers
libmem_register_cfi_0001_16_driver Register a 16-bit CFI command set 1 (Intel Extended) LIBMEM driver
libmem_register_cfi_0001_8_driver Register an 8-bit CFI command set 1 (Intel Extended) LIBMEM driver
libmem_register_cfi_0002_16_driver Register a 16-bit CFI command set 2 (AMD Standard) LIBMEM driver
libmem_register_cfi_0002_8_driver Register an 8 bit CFI command set 2 (AMD Standard) LIBMEM driver
libmem_register_cfi_0003_16_driver Register a 16-bit CFI command set 3 (Intel Standard) LIBMEM driver
libmem_register_cfi_0003_8_driver Register an 8-bit CFI command set 3 (Intel Standard) LIBMEM driver
libmem_register_cfi_amd_driver Register a multi-width CFI command set 2 (AMD) LIBMEM driver
libmem_register_cfi_driver Register a FLASH driver based on detected CFI information
libmem_register_cfi_intel_driver Register a combined multi-width CFI command set 1 and 3 (Intel) LIBMEM driver
FLASH drivers
libmem_register_am29f200b_driver Register a driver for an AMD Am29F200B FLASH chip
libmem_register_am29f200t_driver Register a driver for an AMD Am29F200T FLASH chip
libmem_register_am29f400bb_driver Register a driver for an AMD Am29F400BB FLASH chip
libmem_register_am29f400bt_driver Register a driver for an AMD Am29F400BT FLASH chip
libmem_register_am29fxxx_driver Register a driver for an AMD Am29Fxxx FLASH chip
libmem_register_am29lv010b_driver Register a driver for an AMD Am29LV010B FLASH chip
libmem_register_sst39xFx00A_16_driver Register a driver for a 16-bit SST39xFx00A FLASH chip
libmem_register_st_m28w320cb_driver Register a driver for an ST M28W320CB FLASH chip
libmem_register_st_m28w320ct_driver Register a driver for an ST M28W320CT FLASH chip
RAM drivers
libmem_register_ram_driver Register a simple driver that directly accesses RAM