aboutsummaryrefslogtreecommitdiff
path: root/src/platforms/swlink/platform.h
diff options
context:
space:
mode:
authorGareth McMullin2015-03-02 21:59:04 -0800
committerGareth McMullin2015-03-02 21:59:04 -0800
commit3e466f2d23401df610cb0f94a226317c2dc38751 (patch)
tree7225d3f7929044ced05872d0d11dfd3501605603 /src/platforms/swlink/platform.h
parentb07ffffcee53e18051b324eb59a2794044ce6f95 (diff)
Factor out timing routines common to all STM32 targets.
Diffstat (limited to 'src/platforms/swlink/platform.h')
-rw-r--r--src/platforms/swlink/platform.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/platforms/swlink/platform.h b/src/platforms/swlink/platform.h
index 6ee4a9c..27cc299 100644
--- a/src/platforms/swlink/platform.h
+++ b/src/platforms/swlink/platform.h
@@ -26,6 +26,7 @@
#include "gdb_packet.h"
#include "gpio.h"
+#include "timing.h"
#include <setjmp.h>
@@ -69,6 +70,7 @@
#define SWCLK_PIN TCK_PIN
#define LED_PORT GPIOA
+#define LED_IDLE_RUN GPIO8
/* Use PC14 for a "dummy" uart led. So we can observere at least with scope*/
#define LED_PORT_UART GPIOC
#define LED_UART GPIO14
@@ -123,14 +125,11 @@
#define DEBUG(...)
-extern uint8_t running_status;
-extern volatile uint32_t timeout_counter;
-
extern jmp_buf fatal_error_jmpbuf;
-#define led_idle_run GPIO8
#define SET_RUN_STATE(state) {running_status = (state);}
-#define SET_IDLE_STATE(state) {gpio_set_val(LED_PORT, led_idle_run, state);}
+#define SET_IDLE_STATE(state) {gpio_set_val(LED_PORT, LED_IDLE_RUN, state);}
+#define SET_ERROR_STATE(x)
#define PLATFORM_SET_FATAL_ERROR_RECOVERY() {setjmp(fatal_error_jmpbuf);}
#define PLATFORM_FATAL_ERROR(error) { \