22 #ifndef OPENOCD_FLASH_NOR_DRIVER_H 23 #define OPENOCD_FLASH_NOR_DRIVER_H 27 #define __FLASH_BANK_COMMAND(name) \ 28 COMMAND_HELPER(name, struct flash_bank *bank) 242 #define FLASH_BANK_COMMAND_HANDLER(name) \ 243 static __FLASH_BANK_COMMAND(name)
void(* free_driver_priv)(struct flash_bank *bank)
Deallocates private driver structures.
int(* erase)(struct flash_bank *bank, unsigned int first, unsigned int last)
Bank/sector erase routine (target-specific).
Provides the implementation-independent structure that defines all of the callbacks required by OpenO...
int(* probe)(struct flash_bank *bank)
Probe to determine what kind of flash is present.
int(* info)(struct flash_bank *bank, char *buf, int buf_size)
Display human-readable information about the flash bank into the given buffer.
int(* verify)(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
Verify data in flash.
const struct flash_driver * flash_driver_find_by_name(const char *name)
Find a NOR flash driver by its name.
const struct command_registration * commands
An array of driver-specific commands to register.
int(* erase_check)(struct flash_bank *bank)
Check the erasure status of a flash bank.
const char * name
Gives a human-readable name of this flash driver, This field is used to select and initialize the dri...
int(* auto_probe)(struct flash_bank *bank)
A more gentle flavor of flash_driver_s::probe, performing setup with less noise.
const char * usage
Gives a human-readable description of arguments.
int(* protect_check)(struct flash_bank *bank)
Determine if the specific bank is "protected" or not.
int(* write)(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
Program data into the flash.
int(* read)(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
Read data from the flash.
int(* protect)(struct flash_bank *bank, int set, unsigned int first, unsigned int last)
Bank/sector protection routine (target-specific).
Provides details of a flash bank, available either on-chip or through a major interface.
__FLASH_BANK_COMMAND((*flash_bank_command))
Finish the "flash bank" command for bank.