diff options
Diffstat (limited to 'controller/fw/mspdebug_wrapper.c')
-rw-r--r-- | controller/fw/mspdebug_wrapper.c | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/controller/fw/mspdebug_wrapper.c b/controller/fw/mspdebug_wrapper.c new file mode 100644 index 0000000..3d8daf5 --- /dev/null +++ b/controller/fw/mspdebug_wrapper.c @@ -0,0 +1,112 @@ + +#include "sr_global.h" + +#include "output.h" +#include "jtaglib.h" + +int printc_err(const char *fmt, ...) { + UNUSED(fmt); + /* ignore */ +} + + +static void sr_jtdev_power_on(struct jtdev *p) { + /* ignore */ +} + +static void sr_jtdev_connect(struct jtdev *p) { + /* ignore */ +} + +static enum sr_gpio_types { + SR_GPIO_TCK, + SR_GPIO_TMS, + SR_GPIO_TDI, + SR_GPIO_RST, + SR_GPIO_TST, + SR_GPIO_TDO, + SR_NUM_GPIOS +}; + +struct { + uint32_t port, uint16_t num, +} gpios[SR_NUM_GPIOS] = { + [SR_GPIO_TCK] = {}, + [SR_GPIO_TMS] = {}, + [SR_GPIO_TDI] = {}, + [SR_GPIO_RST] = {}, + [SR_GPIO_TST] = {}, + [SR_GPIO_TDO] = {}, +}; + +static void sr_jtdev_tck(struct jtdev *p, int out) { +} + +static void sr_jtdev_tms(struct jtdev *p, int out) { +} + +static void sr_jtdev_tdi(struct jtdev *p, int out) { +} + +static void sr_jtdev_rst(struct jtdev *p, int out) { +} + +static void sr_jtdev_tst(struct jtdev *p, int out) { +} + +static int sr_jtdev_tdo_get(struct jtdev *p) { +} + +static void sr_jtdev_tclk(struct jtdev *p, int out) { +} + +static int sr_jtdev_tclk_get(struct jtdev *p) { +} + +static void sr_jtdev_tclk_strobe(struct jtdev *p, unsigned int count) { +} + +static void sr_jtdev_led_green(struct jtdev *p, int out) { + UNUSED(p); + UNUSED(out); + /* ignore */ +} + +static void sr_jtdev_led_red(struct jtdev *p, int out) { + UNUSED(p); + UNUSED(out); + /* ignore */ +} + + +static struct jtdev_func sr_jtdev_vtable = { + .jtdev_open = 0, + .jtdev_close = 0, + + .jtdev_power_off = 0, + .jtdev_release = 0, + + .jtdev_power_on = sr_jtdev_power_on, + .jtdev_connect = sr_jtdev_connect, + + .jtdev_tck = sr_jtdev_tck, + .jtdev_tms = sr_jtdev_tms, + .jtdev_tdi = sr_jtdev_tdi, + .jtdev_rst = sr_jtdev_rst, + .jtdev_tst = sr_jtdev_tst, + .jtdev_tdo_get = sr_jtdev_tdo_get, + + .jtdev_tclk = sr_jtdev_tclk, + .jtdev_tclk_get = sr_jtdev_tclk_get, + .jtdev_tclk_strobe = sr_jtdev_tclk_strobe, + + .jtdev_led_green = sr_jtdev_led_green, + .jtdev_led_red = sr_jtdev_led_red, + +}; + +static struct jtdev sr_jtdev = { + 0, + .f = &sr_jtdev_vtable +}; + |