nand_flash
interface is used to perform read and write
accesses and control some pins on NAND Flash devices.
The read_access() and write_access() functions perform read and write accesses.
The set_command_latch_enable(), set_address_latch_enable(), set_write_protect() and set_spare_area_enable() functions set the input level of the pins with the same names. 0 represents low input and 1 represents high input.
The chip enable and ready/busy pins are not modelled. The NAND Flash device assumes that chip enable is always asserted, and the device is never busy.
#define NAND_FLASH_INTERFACE "nand_flash" SIM_INTERFACE(nand_flash) { uint16 (*read_access)(conf_object_t *obj); void (*write_access)(conf_object_t *obj, uint16 value); void (*set_command_latch_enable)(conf_object_t *obj, int value); void (*set_address_latch_enable)(conf_object_t *obj, int value); void (*set_write_protect)(conf_object_t *obj, int value); void (*set_spare_area_enable)(conf_object_t *obj, int value); };