jtag_command_t -> struct jtag_command
[fw/openocd] / src / jtag / jlink.c
index 78efc5ef0bf66d4b494bd5c7521679763e55d5dd..9677f0e80d54ade44c075a45188a78e7c5081895 100644 (file)
@@ -100,7 +100,7 @@ static void jlink_end_state(tap_state_t state);
 static void jlink_state_move(void);
 static void jlink_path_move(int num_states, tap_state_t *path);
 static void jlink_runtest(int num_cycles);
-static void jlink_scan(bool ir_scan, enum scan_type type, uint8_t *buffer, int scan_size, scan_command_t *command);
+static void jlink_scan(bool ir_scan, enum scan_type type, uint8_t *buffer, int scan_size, struct scan_command *command);
 static void jlink_reset(int trst, int srst);
 static void jlink_simple_command(uint8_t command);
 static int jlink_get_status(void);
@@ -110,7 +110,7 @@ static void jlink_tap_init(void);
 static int jlink_tap_execute(void);
 static void jlink_tap_ensure_space(int scans, int bits);
 static void jlink_tap_append_step(int tms, int tdi);
-static void jlink_tap_append_scan(int length, uint8_t *buffer, scan_command_t *command);
+static void jlink_tap_append_scan(int length, uint8_t *buffer, struct scan_command *command);
 
 /* Jlink lowlevel functions */
 struct jlink {
@@ -150,7 +150,7 @@ struct jtag_interface jlink_interface =
        .quit = jlink_quit
 };
 
-static void jlink_execute_runtest(jtag_command_t *cmd)
+static void jlink_execute_runtest(struct jtag_command *cmd)
 {
        DEBUG_JTAG_IO("runtest %i cycles, end in %i",
                        cmd->cmd.runtest->num_cycles,
@@ -161,7 +161,7 @@ static void jlink_execute_runtest(jtag_command_t *cmd)
        jlink_runtest(cmd->cmd.runtest->num_cycles);
 }
 
-static void jlink_execute_statemove(jtag_command_t *cmd)
+static void jlink_execute_statemove(struct jtag_command *cmd)
 {
        DEBUG_JTAG_IO("statemove end in %i", cmd->cmd.statemove->end_state);
 
@@ -169,7 +169,7 @@ static void jlink_execute_statemove(jtag_command_t *cmd)
        jlink_state_move();
 }
 
-static void jlink_execute_pathmove(jtag_command_t *cmd)
+static void jlink_execute_pathmove(struct jtag_command *cmd)
 {
        DEBUG_JTAG_IO("pathmove: %i states, end in %i",
                cmd->cmd.pathmove->num_states,
@@ -179,7 +179,7 @@ static void jlink_execute_pathmove(jtag_command_t *cmd)
                        cmd->cmd.pathmove->path);
 }
 
-static void jlink_execute_scan(jtag_command_t *cmd)
+static void jlink_execute_scan(struct jtag_command *cmd)
 {
        int scan_size;
        enum scan_type type;
@@ -200,7 +200,7 @@ static void jlink_execute_scan(jtag_command_t *cmd)
                        type, buffer, scan_size, cmd->cmd.scan);
 }
 
-static void jlink_execute_reset(jtag_command_t *cmd)
+static void jlink_execute_reset(struct jtag_command *cmd)
 {
        DEBUG_JTAG_IO("reset trst: %i srst %i",
                        cmd->cmd.reset->trst, cmd->cmd.reset->srst);
@@ -210,14 +210,14 @@ static void jlink_execute_reset(jtag_command_t *cmd)
        jlink_tap_execute();
 }
 
-static void jlink_execute_sleep(jtag_command_t *cmd)
+static void jlink_execute_sleep(struct jtag_command *cmd)
 {
        DEBUG_JTAG_IO("sleep %i", cmd->cmd.sleep->us);
        jlink_tap_execute();
        jtag_sleep(cmd->cmd.sleep->us);
 }
 
-static void jlink_execute_command(jtag_command_t *cmd)
+static void jlink_execute_command(struct jtag_command *cmd)
 {
        switch (cmd->type)
        {
@@ -235,7 +235,7 @@ static void jlink_execute_command(jtag_command_t *cmd)
 
 static int jlink_execute_queue(void)
 {
-       jtag_command_t *cmd = jtag_command_queue;
+       struct jtag_command *cmd = jtag_command_queue;
 
        while (cmd != NULL)
        {
@@ -449,7 +449,7 @@ static void jlink_runtest(int num_cycles)
        }
 }
 
-static void jlink_scan(bool ir_scan, enum scan_type type, uint8_t *buffer, int scan_size, scan_command_t *command)
+static void jlink_scan(bool ir_scan, enum scan_type type, uint8_t *buffer, int scan_size, struct scan_command *command)
 {
        tap_state_t saved_end_state;
 
@@ -677,7 +677,7 @@ static uint8_t tdo_buffer[JLINK_TAP_BUFFER_SIZE];
 struct pending_scan_result {
        int first;      /* First bit position in tdo_buffer to read */
        int length; /* Number of bits to read */
-       scan_command_t *command; /* Corresponding scan command */
+       struct scan_command *command; /* Corresponding scan command */
        uint8_t *buffer;
 };
 
@@ -736,7 +736,7 @@ static void jlink_tap_append_step(int tms, int tdi)
        tap_length++;
 }
 
-static void jlink_tap_append_scan(int length, uint8_t *buffer, scan_command_t *command)
+static void jlink_tap_append_scan(int length, uint8_t *buffer, struct scan_command *command)
 {
        struct pending_scan_result *pending_scan_result =
                &pending_scan_results_buffer[pending_scan_results_length];
@@ -804,7 +804,7 @@ static int jlink_tap_execute(void)
                uint8_t *buffer = pending_scan_result->buffer;
                int length = pending_scan_result->length;
                int first = pending_scan_result->first;
-               scan_command_t *command = pending_scan_result->command;
+               struct scan_command *command = pending_scan_result->command;
 
                /* Copy to buffer */
                buf_set_buf(tdo_buffer, first, buffer, 0, length);