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

Go to the source code of this file.

Data Structures

struct  faux_flash_bank
 

Functions

static int faux_erase (struct flash_bank *bank, int first, int last)
 
static int faux_info (struct flash_bank *bank, char *buf, int buf_size)
 
static int faux_probe (struct flash_bank *bank)
 
static int faux_protect (struct flash_bank *bank, int set, int first, int last)
 
static int faux_protect_check (struct flash_bank *bank)
 
static int faux_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
 
 FLASH_BANK_COMMAND_HANDLER (faux_flash_bank_command)
 

Variables

static const struct
command_registration 
faux_command_handlers []
 
struct flash_driver faux_flash
 
static const int sectorSize = 0x10000
 

Function Documentation

static int faux_erase ( struct flash_bank bank,
int  first,
int  last 
)
static

Definition at line 81 of file faux.c.

References flash_bank::driver_priv, ERROR_OK, info, faux_flash_bank::memory, and sectorSize.

static int faux_info ( struct flash_bank bank,
char *  buf,
int  buf_size 
)
static

Definition at line 106 of file faux.c.

References ERROR_OK.

static int faux_probe ( struct flash_bank bank)
static

Definition at line 112 of file faux.c.

References ERROR_OK.

static int faux_protect ( struct flash_bank bank,
int  set,
int  first,
int  last 
)
static

Definition at line 88 of file faux.c.

References ERROR_OK, and LOG_USER.

static int faux_protect_check ( struct flash_bank bank)
static

Definition at line 101 of file faux.c.

References ERROR_OK.

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

Definition at line 94 of file faux.c.

References flash_bank::driver_priv, ERROR_OK, info, and faux_flash_bank::memory.

FLASH_BANK_COMMAND_HANDLER ( faux_flash_bank_command  )

Variable Documentation

const struct command_registration faux_command_handlers[]
static
Initial value:
= {
{
.name = "faux",
.mode = COMMAND_ANY,
.help = "faux flash command group",
},
}
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
Definition: command.h:222
const struct command_registration hello_command_handlers[]
Export the registration for the hello command group, so it can be embedded in example drivers...
Definition: hello.c:96

Definition at line 117 of file faux.c.

struct flash_driver faux_flash
Initial value:
= {
.name = "faux",
.commands = faux_command_handlers,
.flash_bank_command = faux_flash_bank_command,
.erase = faux_erase,
.protect = faux_protect,
.write = faux_write,
.probe = faux_probe,
.auto_probe = faux_probe,
.erase_check = default_flash_blank_check,
.protect_check = faux_protect_check,
.info = faux_info
}
static int faux_probe(struct flash_bank *bank)
Definition: faux.c:112
static const struct command_registration faux_command_handlers[]
Definition: faux.c:117
int default_flash_read(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
Provides default read implementation for flash memory.
int default_flash_blank_check(struct flash_bank *bank)
Provides default erased-bank check handling.
static int faux_info(struct flash_bank *bank, char *buf, int buf_size)
Definition: faux.c:106
static int faux_erase(struct flash_bank *bank, int first, int last)
Definition: faux.c:81
static int faux_protect(struct flash_bank *bank, int set, int first, int last)
Definition: faux.c:88
static int faux_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
Definition: faux.c:94
static int faux_protect_check(struct flash_bank *bank)
Definition: faux.c:101

Definition at line 127 of file faux.c.

const int sectorSize = 0x10000
static

Definition at line 33 of file faux.c.

Referenced by faux_erase(), and FLASH_BANK_COMMAND_HANDLER().