17 bank->read_only =
true;
23 LOG_ERROR(
"Erase of read-only memory refused");
30 LOG_ERROR(
"Write to read-only memory refused");
41 .flash_bank_command = rom_bank_command,
uint64_t buffer
Pointer to data buffer to send over SPI.
int default_flash_blank_check(struct flash_bank *bank)
Provides default erased-bank check handling.
int default_flash_read(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
Provides default read implementation for flash memory.
void default_flash_free_driver_priv(struct flash_bank *bank)
Deallocates bank->driver_priv.
#define LOG_ERROR(expr ...)
static int rom_probe(struct flash_bank *bank)
static int rom_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
const struct flash_driver read_only_flash
FLASH_BANK_COMMAND_HANDLER(rom_bank_command)
static int rom_erase(struct flash_bank *bank, unsigned int first, unsigned int last)
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 char * name
Gives a human-readable name of this flash driver, This field is used to select and initialize the dri...