static int presto_jtag_speed(int speed);
static int presto_jtag_khz(int khz, int *jtag_speed);
static int presto_jtag_speed_div(int speed, int *khz);
-static int presto_jtag_register_commands(struct command_context_s *cmd_ctx);
+static int presto_jtag_register_commands(struct command_context *cmd_ctx);
static int presto_jtag_init(void);
static int presto_jtag_quit(void);
-jtag_interface_t presto_interface =
+struct jtag_interface presto_interface =
{
.name = "presto",
.execute_queue = bitq_execute_queue,
static int presto_bitq_in_rdy(void);
static int presto_bitq_in(void);
-static bitq_interface_t presto_bitq =
+static struct bitq_interface presto_bitq =
{
.out = presto_bitq_out,
.flush = presto_bitq_flush,
#define BUFFER_SIZE (64*62)
-typedef struct presto_s
-{
+struct presto {
#if BUILD_PRESTO_FTD2XX == 1
FT_HANDLE handle;
FT_STATUS status;
int jtag_tdi_count;
int jtag_speed;
+};
-} presto_t;
-
-static presto_t presto_state;
-static presto_t *presto = &presto_state;
+static struct presto presto_state;
+static struct presto *presto = &presto_state;
static uint8_t presto_init_seq[] =
{
static char *presto_serial;
-static int presto_handle_serial_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
+COMMAND_HANDLER(presto_handle_serial_command)
{
if (argc == 1)
{
return ERROR_OK;
}
-static int presto_jtag_register_commands(struct command_context_s *cmd_ctx)
+static int presto_jtag_register_commands(struct command_context *cmd_ctx)
{
register_command(cmd_ctx, NULL, "presto_serial", presto_handle_serial_command,
COMMAND_CONFIG, NULL);