diff options
Diffstat (limited to 'src/jtag/hla/hla_interface.c')
-rw-r--r-- | src/jtag/hla/hla_interface.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/jtag/hla/hla_interface.c b/src/jtag/hla/hla_interface.c index a33be54..964b074 100644 --- a/src/jtag/hla/hla_interface.c +++ b/src/jtag/hla/hla_interface.c @@ -145,6 +145,35 @@ int hl_interface_init_reset(void) return ERROR_OK; } +static int dummy_khz(int khz, int *jtag_speed) +{ + *jtag_speed = khz; + return ERROR_OK; +} + +static int dummy_speed_div(int speed, int *khz) +{ + *khz = speed; + return ERROR_OK; +} + +static int dummy_speed(int speed) +{ + return ERROR_OK; +} + +int hl_interface_override_target(const char **targetname) +{ + if (hl_if.layout->api->override_target) { + if (hl_if.layout->api->override_target(*targetname)) { + *targetname = "hla_target"; + return ERROR_OK; + } else + return ERROR_FAIL; + } + return ERROR_FAIL; +} + COMMAND_HANDLER(hl_interface_handle_device_desc_command) { LOG_DEBUG("hl_interface_handle_device_desc_command"); @@ -286,4 +315,7 @@ struct jtag_interface hl_interface = { .init = hl_interface_init, .quit = hl_interface_quit, .execute_queue = hl_interface_execute_queue, + .speed = &dummy_speed, + .khz = &dummy_khz, + .speed_div = &dummy_speed_div, }; |