target: make register flags "bool"
[fw/openocd] / src / jtag / usbprog.c
index 06a9673f96df6ecee89ddf24ff306ef84dd0dd90..e8c0eadf9f87e54f4d6bb4c49b4e6ee19cf3f8bd 100644 (file)
 #define TCK_BIT                        2
 #define TMS_BIT                        1
 
-static int usbprog_execute_queue(void);
-static int usbprog_speed(int speed);
-static int usbprog_register_commands(struct command_context_s *cmd_ctx);
-static int usbprog_init(void);
-static int usbprog_quit(void);
-
 static void usbprog_end_state(tap_state_t state);
 static void usbprog_state_move(void);
-static void usbprog_path_move(pathmove_command_t *cmd);
+static void usbprog_path_move(struct pathmove_command *cmd);
 static void usbprog_runtest(int num_cycles);
 static void usbprog_scan(bool ir_scan, enum scan_type type, uint8_t *buffer, int scan_size);
 
-struct jtag_interface usbprog_interface =
-{
-       .name = "usbprog",
-       .execute_queue = usbprog_execute_queue,
-       .speed = usbprog_speed,
-       .register_commands = usbprog_register_commands,
-       .init = usbprog_init,
-       .quit = usbprog_quit
-};
-
 #define UNKOWN_COMMAND 0x00
 #define PORT_DIRECTION 0x01
 #define PORT_SET               0x02
@@ -120,14 +104,9 @@ static int usbprog_speed(int speed)
        return ERROR_OK;
 }
 
-static int usbprog_register_commands(struct command_context_s *cmd_ctx)
-{
-       return ERROR_OK;
-}
-
 static int usbprog_execute_queue(void)
 {
-       jtag_command_t *cmd = jtag_command_queue; /* currently processed command */
+       struct jtag_command *cmd = jtag_command_queue; /* currently processed command */
        int scan_size;
        enum scan_type type;
        uint8_t *buffer;
@@ -249,7 +228,7 @@ static void usbprog_state_move(void)
        tap_set_state(tap_get_end_state());
 }
 
-static void usbprog_path_move(pathmove_command_t *cmd)
+static void usbprog_path_move(struct pathmove_command *cmd)
 {
        int num_states = cmd->num_states;
        int state_count;
@@ -688,3 +667,11 @@ static void usbprog_jtag_tms_send(struct usbprog_jtag *usbprog_jtag)
                tms_chain_index = 0;
        }
 }
+
+struct jtag_interface usbprog_interface = {
+               .name = "usbprog",
+               .execute_queue = &usbprog_execute_queue,
+               .speed = &usbprog_speed,
+               .init = &usbprog_init,
+               .quit = &usbprog_quit
+       };