|
Register an 8 bit CFI command set 2 (AMD Standard) LIBMEM driver.
-
Parameters:
-
|
h
|
A pointer to the LIBMEM handle structure to use for this LIBMEM driver. |
|
start
|
The start address of the FLASH memory. |
|
size
|
The size of the FLASH memory. |
|
geometry
|
A NULL terminated description of the FLASH's geometry. |
|
flash_info
|
A pointer to the FLASH information structure or NULL if not required. |
-
Returns:
- The LIBMEM status result.
Example:
libmem_driver_handle_t flash1_handle;
uint8_t *flash1_start = (uint8_t *)0x10000000;
libmem_geometry_t flash1_geometry[] =
{
{ 8, 0x00002000 },
{ 31, 0x00010000 },
{ 0, 0 },
};
int res;
res = libmem_register_cfi_0002_8_driver(&flash1_handle,
flash1_start,
libmem_get_geometry_size(flash1_geometry),
flash1_geometry,
0);
if (res == LIBMEM_STATUS_SUCCESS)
printf("libmem_register_cfi_0002_8_driver : success\n");
else
printf("libmem_register_cfi_0002_8_driver : failed (%d)\n", res);
|
|