OpenOCD
read_only.c File Reference
Include dependency graph for read_only.c:

Go to the source code of this file.

Functions

 FLASH_BANK_COMMAND_HANDLER (rom_bank_command)
 
static int rom_erase (struct flash_bank *bank, unsigned int first, unsigned int last)
 
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)
 

Variables

const struct flash_driver read_only_flash
 

Function Documentation

◆ FLASH_BANK_COMMAND_HANDLER()

FLASH_BANK_COMMAND_HANDLER ( rom_bank_command  )

Definition at line 15 of file read_only.c.

References bank, and ERROR_OK.

◆ rom_erase()

static int rom_erase ( struct flash_bank bank,
unsigned int  first,
unsigned int  last 
)
static

Definition at line 21 of file read_only.c.

References ERROR_FAIL, and LOG_ERROR.

◆ rom_probe()

static int rom_probe ( struct flash_bank bank)
static

Definition at line 34 of file read_only.c.

◆ rom_write()

static int rom_write ( struct flash_bank bank,
const uint8_t *  buffer,
uint32_t  offset,
uint32_t  count 
)
static

Definition at line 27 of file read_only.c.

References ERROR_FAIL, and LOG_ERROR.

Variable Documentation

◆ read_only_flash

const struct flash_driver read_only_flash
Initial value:
= {
.name = "read_only",
.flash_bank_command = rom_bank_command,
.erase = rom_erase,
.write = rom_write,
.probe = rom_probe,
.auto_probe = rom_probe,
.erase_check = default_flash_blank_check,
.free_driver_priv = default_flash_free_driver_priv,
}
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.
static int rom_probe(struct flash_bank *bank)
Definition: read_only.c:34
static int rom_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
Definition: read_only.c:27
static int rom_erase(struct flash_bank *bank, unsigned int first, unsigned int last)
Definition: read_only.c:21

Definition at line 34 of file read_only.c.