Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
card10
openocd
Commits
0796dfff
Commit
0796dfff
authored
Nov 10, 2009
by
Zachary T Welch
Browse files
use FLASH_BANK_COMMAND_HANDLER macro
Defines all flash_bank_command handlers using the new macro.
parent
57c5c5f4
Changes
18
Hide whitespace changes
Inline
Side-by-side
src/flash/aduc702x.c
View file @
0796dfff
...
...
@@ -61,7 +61,7 @@ typedef struct
/* flash bank aduc702x 0 0 0 0 <target#>
* The ADC7019-28 devices all have the same flash layout */
static
int
aduc702x_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
,
struct
flash_bank_s
*
bank
)
FLASH_BANK_COMMAND_HANDLER
(
aduc702x_flash_bank_command
)
{
aduc702x_flash_bank_t
*
nbank
;
...
...
src/flash/at91sam3.c
View file @
0796dfff
...
...
@@ -1641,12 +1641,7 @@ sam3_protect_check(struct flash_bank_s *bank)
return
ERROR_OK
;
}
static
int
sam3_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
,
struct
flash_bank_s
*
bank
)
FLASH_BANK_COMMAND_HANDLER
(
sam3_flash_bank_command
)
{
struct
sam3_chip
*
pChip
;
...
...
src/flash/at91sam7.c
View file @
0796dfff
...
...
@@ -711,7 +711,7 @@ static int at91sam7_protect_check(struct flash_bank_s *bank)
return
ERROR_OK
;
}
static
int
at91sam7_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
,
struct
flash_bank_s
*
bank
)
FLASH_BANK_COMMAND_HANDLER
(
at91sam7_flash_bank_command
)
{
flash_bank_t
*
t_bank
=
bank
;
at91sam7_flash_bank_t
*
at91sam7_info
;
...
...
src/flash/avrf.c
View file @
0796dfff
...
...
@@ -180,7 +180,7 @@ static int avr_jtagprg_writeflashpage(avr_common_t *avr, uint8_t *page_buf, uint
return
ERROR_OK
;
}
static
int
avrf_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
,
struct
flash_bank_s
*
bank
)
FLASH_BANK_COMMAND_HANDLER
(
avrf_flash_bank_command
)
{
avrf_flash_bank_t
*
avrf_info
;
...
...
src/flash/cfi.c
View file @
0796dfff
...
...
@@ -601,7 +601,7 @@ static int cfi_register_commands(struct command_context_s *cmd_ctx)
/* flash_bank cfi <base> <size> <chip_width> <bus_width> <target#> [options]
*/
static
int
cfi_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
,
struct
flash_bank_s
*
bank
)
FLASH_BANK_COMMAND_HANDLER
(
cfi_flash_bank_command
)
{
cfi_flash_bank_t
*
cfi_info
;
int
i
;
...
...
src/flash/ecos.c
View file @
0796dfff
...
...
@@ -104,7 +104,7 @@ flash_errmsg(int err)
/* flash bank ecosflash <base> <size> <chip_width> <bus_width> <target#> <driverPath>
*/
static
int
ecosflash_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
,
struct
flash_bank_s
*
bank
)
FLASH_BANK_COMMAND_HANDLER
(
ecosflash_flash_bank_command
)
{
ecosflash_flash_bank_t
*
info
;
...
...
src/flash/faux.c
View file @
0796dfff
...
...
@@ -37,7 +37,7 @@ static const int sectorSize = 0x10000;
/* flash bank faux <base> <size> <chip_width> <bus_width> <target#> <driverPath>
*/
static
int
faux_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
,
struct
flash_bank_s
*
bank
)
FLASH_BANK_COMMAND_HANDLER
(
faux_flash_bank_command
)
{
faux_flash_bank_t
*
info
;
...
...
src/flash/lpc2000.c
View file @
0796dfff
...
...
@@ -419,7 +419,7 @@ static int lpc2000_iap_blank_check(struct flash_bank_s *bank, int first, int las
/*
* flash bank lpc2000 <base> <size> 0 0 <target#> <lpc_variant> <cclk> [calc_checksum]
*/
static
int
lpc2000_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
,
struct
flash_bank_s
*
bank
)
FLASH_BANK_COMMAND_HANDLER
(
lpc2000_flash_bank_command
)
{
lpc2000_flash_bank_t
*
lpc2000_info
;
...
...
src/flash/lpc288x.c
View file @
0796dfff
...
...
@@ -165,7 +165,7 @@ static int lpc288x_protect_check(struct flash_bank_s *bank)
}
/* flash_bank LPC288x 0 0 0 0 <target#> <cclk> */
static
int
lpc288x_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
,
struct
flash_bank_s
*
bank
)
FLASH_BANK_COMMAND_HANDLER
(
lpc288x_flash_bank_command
)
{
lpc288x_flash_bank_t
*
lpc288x_info
;
...
...
src/flash/lpc2900.c
View file @
0796dfff
...
...
@@ -1016,9 +1016,7 @@ static int lpc2900_register_commands(struct command_context_s *cmd_ctx)
/// Evaluate flash bank command.
static
int
lpc2900_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
,
struct
flash_bank_s
*
bank
)
FLASH_BANK_COMMAND_HANDLER
(
lpc2900_flash_bank_command
)
{
lpc2900_flash_bank_t
*
lpc2900_info
;
...
...
src/flash/ocl.c
View file @
0796dfff
...
...
@@ -44,7 +44,7 @@ static int ocl_protect_check(struct flash_bank_s *bank)
}
/* flash_bank ocl 0 0 0 0 <target#> */
static
int
ocl_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
,
struct
flash_bank_s
*
bank
)
FLASH_BANK_COMMAND_HANDLER
(
ocl_flash_bank_command
)
{
int
retval
;
armv4_5_common_t
*
armv4_5
;
...
...
src/flash/pic32mx.c
View file @
0796dfff
...
...
@@ -62,7 +62,7 @@ static int pic32mx_write_word(struct flash_bank_s *bank, uint32_t address, uint3
/* flash bank pic32mx <base> <size> 0 0 <target#>
*/
static
int
pic32mx_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
,
struct
flash_bank_s
*
bank
)
FLASH_BANK_COMMAND_HANDLER
(
pic32mx_flash_bank_command
)
{
pic32mx_flash_bank_t
*
pic32mx_info
;
...
...
src/flash/stellaris.c
View file @
0796dfff
...
...
@@ -213,7 +213,7 @@ static char * StellarisClassname[5] =
/* flash_bank stellaris <base> <size> 0 0 <target#>
*/
static
int
stellaris_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
,
struct
flash_bank_s
*
bank
)
FLASH_BANK_COMMAND_HANDLER
(
stellaris_flash_bank_command
)
{
stellaris_flash_bank_t
*
stellaris_info
;
...
...
src/flash/stm32x.c
View file @
0796dfff
...
...
@@ -33,7 +33,7 @@ static int stm32x_mass_erase(struct flash_bank_s *bank);
/* flash bank stm32x <base> <size> 0 0 <target#>
*/
static
int
stm32x_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
,
struct
flash_bank_s
*
bank
)
FLASH_BANK_COMMAND_HANDLER
(
stm32x_flash_bank_command
)
{
stm32x_flash_bank_t
*
stm32x_info
;
...
...
src/flash/str7x.c
View file @
0796dfff
...
...
@@ -109,7 +109,7 @@ static int str7x_build_block_list(struct flash_bank_s *bank)
/* flash bank str7x <base> <size> 0 0 <target#> <str71_variant>
*/
static
int
str7x_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
,
struct
flash_bank_s
*
bank
)
FLASH_BANK_COMMAND_HANDLER
(
str7x_flash_bank_command
)
{
str7x_flash_bank_t
*
str7x_info
;
...
...
src/flash/str9x.c
View file @
0796dfff
...
...
@@ -116,8 +116,7 @@ static int str9x_build_block_list(struct flash_bank_s *bank)
/* flash bank str9x <base> <size> 0 0 <target#>
*/
static
int
str9x_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
,
struct
flash_bank_s
*
bank
)
FLASH_BANK_COMMAND_HANDLER
(
str9x_flash_bank_command
)
{
str9x_flash_bank_t
*
str9x_info
;
...
...
src/flash/str9xpec.c
View file @
0796dfff
...
...
@@ -235,7 +235,7 @@ static int str9xpec_build_block_list(struct flash_bank_s *bank)
/* flash bank str9x <base> <size> 0 0 <target#>
*/
static
int
str9xpec_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
,
struct
flash_bank_s
*
bank
)
FLASH_BANK_COMMAND_HANDLER
(
str9xpec_flash_bank_command
)
{
str9xpec_flash_controller_t
*
str9xpec_info
;
armv4_5_common_t
*
armv4_5
=
NULL
;
...
...
src/flash/tms470.c
View file @
0796dfff
...
...
@@ -1222,7 +1222,7 @@ static int tms470_info(struct flash_bank_s *bank, char *buf, int buf_size)
* [options...]
*/
static
int
tms470_flash_bank_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
,
struct
flash_bank_s
*
bank
)
FLASH_BANK_COMMAND_HANDLER
(
tms470_flash_bank_command
)
{
bank
->
driver_priv
=
malloc
(
sizeof
(
tms470_flash_bank_t
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment