summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZachary T Welch <zw@superlucidity.net>2009-11-13 07:38:03 -0800
committerZachary T Welch <zw@superlucidity.net>2009-11-13 11:58:06 -0800
commita15d4cc75eb7bae55db5f6a156cd15918d574688 (patch)
tree01a03f99e0220348bb46f36fa29f31d75ebb945c /src
parent632fd663a821047df9a9b965ec1c35d6b034ebba (diff)
downloadopenocd_libswd-a15d4cc75eb7bae55db5f6a156cd15918d574688.tar.gz
openocd_libswd-a15d4cc75eb7bae55db5f6a156cd15918d574688.tar.bz2
openocd_libswd-a15d4cc75eb7bae55db5f6a156cd15918d574688.tar.xz
openocd_libswd-a15d4cc75eb7bae55db5f6a156cd15918d574688.zip
lpc2000_flash_bank_t -> struct lpc2000_flash_bank
Remove misleading typedef and redundant suffix from struct lpc2000_flash_bank.
Diffstat (limited to 'src')
-rw-r--r--src/flash/lpc2000.c14
-rw-r--r--src/flash/lpc2000.h4
2 files changed, 9 insertions, 9 deletions
diff --git a/src/flash/lpc2000.c b/src/flash/lpc2000.c
index 27eec7f3..01b17f53 100644
--- a/src/flash/lpc2000.c
+++ b/src/flash/lpc2000.c
@@ -55,7 +55,7 @@
static int lpc2000_build_sector_list(struct flash_bank_s *bank)
{
- lpc2000_flash_bank_t *lpc2000_info = bank->driver_priv;
+ struct lpc2000_flash_bank *lpc2000_info = bank->driver_priv;
int i;
uint32_t offset = 0;
@@ -237,7 +237,7 @@ static int lpc2000_build_sector_list(struct flash_bank_s *bank)
static int lpc2000_iap_call(flash_bank_t *bank, int code, uint32_t param_table[5], uint32_t result_table[4])
{
int retval;
- lpc2000_flash_bank_t *lpc2000_info = bank->driver_priv;
+ struct lpc2000_flash_bank *lpc2000_info = bank->driver_priv;
target_t *target = bank->target;
mem_param_t mem_params[2];
reg_param_t reg_params[5];
@@ -421,7 +421,7 @@ static int lpc2000_iap_blank_check(struct flash_bank_s *bank, int first, int las
*/
FLASH_BANK_COMMAND_HANDLER(lpc2000_flash_bank_command)
{
- lpc2000_flash_bank_t *lpc2000_info;
+ struct lpc2000_flash_bank *lpc2000_info;
if (argc < 8)
{
@@ -429,7 +429,7 @@ FLASH_BANK_COMMAND_HANDLER(lpc2000_flash_bank_command)
return ERROR_FLASH_BANK_INVALID;
}
- lpc2000_info = malloc(sizeof(lpc2000_flash_bank_t));
+ lpc2000_info = malloc(sizeof(struct lpc2000_flash_bank));
bank->driver_priv = lpc2000_info;
if (strcmp(args[6], "lpc2000_v1") == 0)
@@ -479,7 +479,7 @@ FLASH_BANK_COMMAND_HANDLER(lpc2000_flash_bank_command)
static int lpc2000_erase(struct flash_bank_s *bank, int first, int last)
{
- lpc2000_flash_bank_t *lpc2000_info = bank->driver_priv;
+ struct lpc2000_flash_bank *lpc2000_info = bank->driver_priv;
uint32_t param_table[5];
uint32_t result_table[4];
int status_code;
@@ -537,7 +537,7 @@ static int lpc2000_protect(struct flash_bank_s *bank, int set, int first, int la
static int lpc2000_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
{
- lpc2000_flash_bank_t *lpc2000_info = bank->driver_priv;
+ struct lpc2000_flash_bank *lpc2000_info = bank->driver_priv;
target_t *target = bank->target;
uint32_t dst_min_alignment;
uint32_t bytes_remaining = count;
@@ -730,7 +730,7 @@ static int lpc2000_protect_check(struct flash_bank_s *bank)
static int lpc2000_info(struct flash_bank_s *bank, char *buf, int buf_size)
{
- lpc2000_flash_bank_t *lpc2000_info = bank->driver_priv;
+ struct lpc2000_flash_bank *lpc2000_info = bank->driver_priv;
snprintf(buf, buf_size, "lpc2000 flash driver variant: %i, clk: %" PRIi32 "kHz" , lpc2000_info->variant, lpc2000_info->cclk);
diff --git a/src/flash/lpc2000.h b/src/flash/lpc2000.h
index 007cabec..b93deb69 100644
--- a/src/flash/lpc2000.h
+++ b/src/flash/lpc2000.h
@@ -32,7 +32,7 @@ typedef enum
lpc1700
} lpc2000_variant;
-typedef struct lpc2000_flash_bank_s
+struct lpc2000_flash_bank
{
lpc2000_variant variant;
struct working_area_s *iap_working_area;
@@ -43,7 +43,7 @@ typedef struct lpc2000_flash_bank_s
int calc_checksum;
uint32_t cmd51_max_buffer;
int checksum_vector;
-} lpc2000_flash_bank_t;
+};
enum lpc2000_status_codes
{