X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fjtag%2Fdriver.c;h=6469358d9bfc3ebe73013ca97bb73eea28b7cc1c;hb=246068fd8985b293d7109058f83c57f6c22a4336;hp=6f205734903e42ba5ae2c1993f670f6395a4cb1e;hpb=af3f4a0bbefd796bd40602ae28f66dd373272e6a;p=openocd.git diff --git a/src/jtag/driver.c b/src/jtag/driver.c index 6f20573490..6469358d9b 100644 --- a/src/jtag/driver.c +++ b/src/jtag/driver.c @@ -77,7 +77,7 @@ int interface_jtag_add_ir_scan(int in_num_fields, const struct scan_field *in_fi { size_t num_taps = jtag_tap_count_enabled(); - jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t)); + struct jtag_command * cmd = cmd_queue_alloc(sizeof(struct jtag_command)); struct scan_command * scan = cmd_queue_alloc(sizeof(struct scan_command)); struct scan_field * out_fields = cmd_queue_alloc(num_taps * sizeof(struct scan_field)); @@ -150,7 +150,7 @@ int interface_jtag_add_ir_scan(int in_num_fields, const struct scan_field *in_fi int interface_jtag_add_plain_ir_scan(int in_num_fields, const struct scan_field *in_fields, tap_state_t state) { - jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t)); + struct jtag_command * cmd = cmd_queue_alloc(sizeof(struct jtag_command)); struct scan_command * scan = cmd_queue_alloc(sizeof(struct scan_command)); struct scan_field * out_fields = cmd_queue_alloc(in_num_fields * sizeof(struct scan_field)); @@ -188,7 +188,7 @@ int interface_jtag_add_dr_scan(int in_num_fields, const struct scan_field *in_fi bypass_devices++; } - jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t)); + struct jtag_command * cmd = cmd_queue_alloc(sizeof(struct jtag_command)); struct scan_command * scan = cmd_queue_alloc(sizeof(struct scan_command)); struct scan_field * out_fields = cmd_queue_alloc((in_num_fields + bypass_devices) * sizeof(struct scan_field)); @@ -278,7 +278,7 @@ void interface_jtag_add_dr_out(struct jtag_tap *target_tap, } - jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t)); + struct jtag_command * cmd = cmd_queue_alloc(sizeof(struct jtag_command)); struct scan_command * scan = cmd_queue_alloc(sizeof(struct scan_command)); struct scan_field * out_fields = cmd_queue_alloc((in_num_fields + bypass_devices) * sizeof(struct scan_field)); @@ -346,7 +346,7 @@ void interface_jtag_add_dr_out(struct jtag_tap *target_tap, */ int interface_jtag_add_plain_dr_scan(int in_num_fields, const struct scan_field *in_fields, tap_state_t state) { - jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t)); + struct jtag_command * cmd = cmd_queue_alloc(sizeof(struct jtag_command)); struct scan_command * scan = cmd_queue_alloc(sizeof(struct scan_command)); struct scan_field * out_fields = cmd_queue_alloc(in_num_fields * sizeof(struct scan_field)); @@ -371,7 +371,7 @@ int interface_jtag_add_tlr(void) tap_state_t state = TAP_RESET; /* allocate memory for a new list member */ - jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t)); + struct jtag_command * cmd = cmd_queue_alloc(sizeof(struct jtag_command)); jtag_queue_command(cmd); @@ -386,13 +386,13 @@ int interface_jtag_add_tlr(void) int interface_jtag_add_pathmove(int num_states, const tap_state_t *path) { /* allocate memory for a new list member */ - jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t)); + struct jtag_command * cmd = cmd_queue_alloc(sizeof(struct jtag_command)); jtag_queue_command(cmd); cmd->type = JTAG_PATHMOVE; - cmd->cmd.pathmove = cmd_queue_alloc(sizeof(pathmove_command_t)); + cmd->cmd.pathmove = cmd_queue_alloc(sizeof(struct pathmove_command)); cmd->cmd.pathmove->num_states = num_states; cmd->cmd.pathmove->path = cmd_queue_alloc(sizeof(tap_state_t) * num_states); @@ -405,13 +405,13 @@ int interface_jtag_add_pathmove(int num_states, const tap_state_t *path) int interface_jtag_add_runtest(int num_cycles, tap_state_t state) { /* allocate memory for a new list member */ - jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t)); + struct jtag_command * cmd = cmd_queue_alloc(sizeof(struct jtag_command)); jtag_queue_command(cmd); cmd->type = JTAG_RUNTEST; - cmd->cmd.runtest = cmd_queue_alloc(sizeof(runtest_command_t)); + cmd->cmd.runtest = cmd_queue_alloc(sizeof(struct runtest_command)); cmd->cmd.runtest->num_cycles = num_cycles; cmd->cmd.runtest->end_state = state; @@ -421,13 +421,13 @@ int interface_jtag_add_runtest(int num_cycles, tap_state_t state) int interface_jtag_add_clocks(int num_cycles) { /* allocate memory for a new list member */ - jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t)); + struct jtag_command * cmd = cmd_queue_alloc(sizeof(struct jtag_command)); jtag_queue_command(cmd); cmd->type = JTAG_STABLECLOCKS; - cmd->cmd.stableclocks = cmd_queue_alloc(sizeof(stableclocks_command_t)); + cmd->cmd.stableclocks = cmd_queue_alloc(sizeof(struct stableclocks_command)); cmd->cmd.stableclocks->num_cycles = num_cycles; return ERROR_OK; @@ -436,13 +436,13 @@ int interface_jtag_add_clocks(int num_cycles) int interface_jtag_add_reset(int req_trst, int req_srst) { /* allocate memory for a new list member */ - jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t)); + struct jtag_command * cmd = cmd_queue_alloc(sizeof(struct jtag_command)); jtag_queue_command(cmd); cmd->type = JTAG_RESET; - cmd->cmd.reset = cmd_queue_alloc(sizeof(reset_command_t)); + cmd->cmd.reset = cmd_queue_alloc(sizeof(struct reset_command)); cmd->cmd.reset->trst = req_trst; cmd->cmd.reset->srst = req_srst; @@ -452,13 +452,13 @@ int interface_jtag_add_reset(int req_trst, int req_srst) int interface_jtag_add_sleep(uint32_t us) { /* allocate memory for a new list member */ - jtag_command_t * cmd = cmd_queue_alloc(sizeof(jtag_command_t)); + struct jtag_command * cmd = cmd_queue_alloc(sizeof(struct jtag_command)); jtag_queue_command(cmd); cmd->type = JTAG_SLEEP; - cmd->cmd.sleep = cmd_queue_alloc(sizeof(sleep_command_t)); + cmd->cmd.sleep = cmd_queue_alloc(sizeof(struct sleep_command)); cmd->cmd.sleep->us = us; return ERROR_OK;