avr_common_t -> struct avr_common
authorZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 16:41:52 +0000 (08:41 -0800)
committerZachary T Welch <zw@superlucidity.net>
Fri, 13 Nov 2009 19:58:10 +0000 (11:58 -0800)
Remove misleading typedef and redundant suffix from struct avr_common.

src/flash/avrf.c
src/target/avrt.c
src/target/avrt.h

index 8dd43398cb8f717310fafec956f8ea297924af86..91aedb85a5eab9cf94ceea24630de8d81ef0a4ac 100644 (file)
@@ -70,7 +70,7 @@ int mcu_write_dr_u32(struct jtag_tap *tap, uint32_t *ir_in, uint32_t ir_out, int
 int mcu_execute_queue(void);
 
 /* avr program functions */
-static int avr_jtag_reset(avr_common_t *avr, uint32_t reset)
+static int avr_jtag_reset(struct avr_common *avr, uint32_t reset)
 {
        avr_jtag_sendinstr(avr->jtag_info.tap, NULL, AVR_JTAG_INS_AVR_RESET);
        avr_jtag_senddat(avr->jtag_info.tap, NULL, reset ,AVR_JTAG_REG_Reset_Len);
@@ -78,7 +78,7 @@ static int avr_jtag_reset(avr_common_t *avr, uint32_t reset)
        return ERROR_OK;
 }
 
-static int avr_jtag_read_jtagid(avr_common_t *avr, uint32_t *id)
+static int avr_jtag_read_jtagid(struct avr_common *avr, uint32_t *id)
 {
        avr_jtag_sendinstr(avr->jtag_info.tap, NULL, AVR_JTAG_INS_IDCODE);
        avr_jtag_senddat(avr->jtag_info.tap, id, 0, AVR_JTAG_REG_JTAGID_Len);
@@ -86,7 +86,7 @@ static int avr_jtag_read_jtagid(avr_common_t *avr, uint32_t *id)
        return ERROR_OK;
 }
 
-static int avr_jtagprg_enterprogmode(avr_common_t *avr)
+static int avr_jtagprg_enterprogmode(struct avr_common *avr)
 {
        avr_jtag_reset(avr, 1);
 
@@ -96,7 +96,7 @@ static int avr_jtagprg_enterprogmode(avr_common_t *avr)
        return ERROR_OK;
 }
 
-static int avr_jtagprg_leaveprogmode(avr_common_t *avr)
+static int avr_jtagprg_leaveprogmode(struct avr_common *avr)
 {
        avr_jtag_sendinstr(avr->jtag_info.tap, NULL, AVR_JTAG_INS_PROG_COMMANDS);
        avr_jtag_senddat(avr->jtag_info.tap, NULL, 0x2300, AVR_JTAG_REG_ProgrammingCommand_Len);
@@ -110,7 +110,7 @@ static int avr_jtagprg_leaveprogmode(avr_common_t *avr)
        return ERROR_OK;
 }
 
-static int avr_jtagprg_chiperase(avr_common_t *avr)
+static int avr_jtagprg_chiperase(struct avr_common *avr)
 {
        uint32_t poll_value;
 
@@ -133,7 +133,7 @@ static int avr_jtagprg_chiperase(avr_common_t *avr)
        return ERROR_OK;
 }
 
-static int avr_jtagprg_writeflashpage(avr_common_t *avr, uint8_t *page_buf, uint32_t buf_size, uint32_t addr, uint32_t page_size)
+static int avr_jtagprg_writeflashpage(struct avr_common *avr, uint8_t *page_buf, uint32_t buf_size, uint32_t addr, uint32_t page_size)
 {
        uint32_t i, poll_value;
 
@@ -213,7 +213,7 @@ static int avrf_protect(struct flash_bank_s *bank, int set, int first, int last)
 static int avrf_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
 {
        target_t *target = bank->target;
-       avr_common_t *avr = target->arch_info;
+       struct avr_common *avr = target->arch_info;
        uint32_t cur_size, cur_buffer_size, page_size;
 
        if (bank->target->state != TARGET_HALTED)
@@ -265,7 +265,7 @@ static int avrf_probe(struct flash_bank_s *bank)
 {
        target_t *target = bank->target;
        struct avrf_flash_bank *avrf_info = bank->driver_priv;
-       avr_common_t *avr = target->arch_info;
+       struct avr_common *avr = target->arch_info;
        struct avrf_type *avr_info = NULL;
        int i;
        uint32_t device_id;
@@ -346,7 +346,7 @@ static int avrf_protect_check(struct flash_bank_s *bank)
 static int avrf_info(struct flash_bank_s *bank, char *buf, int buf_size)
 {
        target_t *target = bank->target;
-       avr_common_t *avr = target->arch_info;
+       struct avr_common *avr = target->arch_info;
        struct avrf_type *avr_info = NULL;
        int i;
        uint32_t device_id;
@@ -397,7 +397,7 @@ static int avrf_info(struct flash_bank_s *bank, char *buf, int buf_size)
 static int avrf_mass_erase(struct flash_bank_s *bank)
 {
        target_t *target = bank->target;
-       avr_common_t *avr = target->arch_info;
+       struct avr_common *avr = target->arch_info;
 
        if (target->state != TARGET_HALTED)
        {
index 4a1024fef46b774ae0d2e36dfd7cbad2879ef75c..d7c7623d848d90c1e7dc42355fb4c87debbab536 100644 (file)
@@ -104,7 +104,7 @@ int avr_register_commands(struct command_context_s *cmd_ctx)
 
 int avr_target_create(struct target_s *target, Jim_Interp *interp)
 {
-       avr_common_t *avr = calloc(1, sizeof(avr_common_t));
+       struct avr_common *avr = calloc(1, sizeof(struct avr_common));
 
        avr->jtag_info.tap = target->tap;
        target->arch_info = avr;
index 54722ac6ba16579bbe3fe1b0eb3580f238140783..145f836f1a79496e1ba4d03cbf15895cc1a39bb6 100644 (file)
@@ -27,9 +27,9 @@ struct mcu_jtag
        struct jtag_tap *tap;
 };
 
-typedef struct avr_common_s
+struct avr_common
 {
        struct mcu_jtag jtag_info;
-} avr_common_t;
+};
 
 #endif /* AVRT_H */

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)