11 #ifndef OPENOCD_FLASH_NOR_DRIVER_H
12 #define OPENOCD_FLASH_NOR_DRIVER_H
16 #define __FLASH_BANK_COMMAND(name) \
17 COMMAND_HELPER(name, struct flash_bank *bank)
230 #define FLASH_BANK_COMMAND_HANDLER(name) \
231 static __FLASH_BANK_COMMAND(name)
const struct flash_driver * flash_driver_find_by_name(const char *name)
Find a NOR flash driver by its name.
When run_command is called, a new instance will be created on the stack, filled with the proper value...
Provides details of a flash bank, available either on-chip or through a major interface.
Provides the implementation-independent structure that defines all of the callbacks required by OpenO...
const struct command_registration * commands
An array of driver-specific commands to register.
int(* protect)(struct flash_bank *bank, int set, unsigned int first, unsigned int last)
Bank/sector protection routine (target-specific).
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(* erase_check)(struct flash_bank *bank)
Check the erasure status of a flash bank.
int(* info)(struct flash_bank *bank, struct command_invocation *cmd)
Display human-readable information about the flash bank.
void(* free_driver_priv)(struct flash_bank *bank)
Deallocates private driver structures.
int(* write)(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
Program data into the flash.
int(* probe)(struct flash_bank *bank)
Probe to determine what kind of flash is present.
int(* erase)(struct flash_bank *bank, unsigned int first, unsigned int last)
Bank/sector erase routine (target-specific).
__FLASH_BANK_COMMAND((*flash_bank_command))
Finish the "flash bank" command for bank.
int(* read)(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
Read data from the flash.
int(* verify)(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
Verify data in flash.
int(* protect_check)(struct flash_bank *bank)
Determine if the specific bank is "protected" or not.
const char * name
Gives a human-readable name of this flash driver, This field is used to select and initialize the dri...