]> git.sur5r.net Git - openocd/commitdiff
stlink: add dummy speed handlers
authorSpencer Oliver <spen@spen-soft.co.uk>
Mon, 9 Jan 2012 14:43:26 +0000 (14:43 +0000)
committerSpencer Oliver <spen@spen-soft.co.uk>
Thu, 12 Jan 2012 20:43:48 +0000 (20:43 +0000)
Change-Id: I0445be7867637728145941b06225dc0acc5380e8
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/355
Tested-by: jenkins
src/jtag/stlink/stlink_interface.c

index a2ac99f74eb33cb10a43301522ef0a08a22ea003..fc5edc619a3c9f86cfb73981339fd0e1d6cb852b 100644 (file)
@@ -101,6 +101,18 @@ static int stlink_interface_speed(int speed)
        return ERROR_OK;
 }
 
+static int stlink_speed_div(int speed, int *khz)
+{
+       *khz = speed;
+       return ERROR_OK;
+}
+
+static int stlink_khz(int khz, int *jtag_speed)
+{
+       *jtag_speed = khz;
+       return ERROR_OK;
+}
+
 static int stlink_interface_execute_queue(void)
 {
        LOG_DEBUG("stlink_interface_execute_queue: ignored");
@@ -217,9 +229,10 @@ struct jtag_interface stlink_interface = {
        .supported = 0,
        .commands = stlink_interface_command_handlers,
        .transports = stlink_transports,
-
        .init = stlink_interface_init,
        .quit = stlink_interface_quit,
        .speed = stlink_interface_speed,
+       .speed_div = stlink_speed_div,
+       .khz = stlink_khz,
        .execute_queue = stlink_interface_execute_queue,
 };