#define DIM(x) (sizeof(x)/sizeof((x)[0]))
/** Calculate the number of bytes required to hold @a n TAP scan bits */
-#define TAP_SCAN_BYTES(n) CEIL(n, 8)
+#define TAP_SCAN_BYTES(n) DIV_ROUND_UP(n, 8)
/*-----</Macros>-------------------------------------------------*/
uint8_t intmp[4];
};
-typedef struct jtag_tap_event_action_s jtag_tap_event_action_t;
-
struct jtag_tap {
const char* chip;
const char* tapname;
/// Bypass register selected
int bypass;
- jtag_tap_event_action_t *event_action;
+ struct jtag_tap_event_action *event_action;
struct jtag_tap* next_tap;
};
JTAG_TAP_EVENT_DISABLE,
};
-struct jtag_tap_event_action_s
+struct jtag_tap_event_action
{
enum jtag_event event;
Jim_Obj* body;
- jtag_tap_event_action_t* next;
+ struct jtag_tap_event_action* next;
};
/**
* Initialize interface upon startup. Return a successful no-op upon
* subsequent invocations.
*/
-int jtag_interface_init(struct command_context_s* cmd_ctx);
+int jtag_interface_init(struct command_context* cmd_ctx);
/// Shutdown the JTAG interface upon program exit.
int jtag_interface_quit(void);
* Initialize JTAG chain using only a RESET reset. If init fails,
* try reset + init.
*/
-int jtag_init(struct command_context_s* cmd_ctx);
+int jtag_init(struct command_context* cmd_ctx);
/// reset, then initialize JTAG chain
-int jtag_init_reset(struct command_context_s* cmd_ctx);
-int jtag_register_commands(struct command_context_s* cmd_ctx);
-int jtag_init_inner(struct command_context_s *cmd_ctx);
+int jtag_init_reset(struct command_context* cmd_ctx);
+int jtag_register_commands(struct command_context* cmd_ctx);
+int jtag_init_inner(struct command_context *cmd_ctx);
/**
* @file