summaryrefslogtreecommitdiff
path: root/src/short-test/include/stm_init.h
diff options
context:
space:
mode:
authorFredrik Thulin <fredrik@thulin.net>2015-09-10 10:51:57 +0200
committerFredrik Thulin <fredrik@thulin.net>2015-09-10 10:51:57 +0200
commit8af6e5c4d9764afb89395ccc006674277a859024 (patch)
tree044032cfffb50e63bf4391b2eb343a5eb86b998f /src/short-test/include/stm_init.h
parentb5f7b6b8ed23eccc15415776b6d2fa05e10b9c7d (diff)
Add application useful in helping identifying electrical shorts.
This application tries to help finding elecrical shorts in the dev-bridge board by configuring all pins but one at a time as input (pull-down), and then outputing a bit to one pin and checking that none of the input pins go high.
Diffstat (limited to 'src/short-test/include/stm_init.h')
-rw-r--r--src/short-test/include/stm_init.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/short-test/include/stm_init.h b/src/short-test/include/stm_init.h
new file mode 100644
index 0000000..946ac40
--- /dev/null
+++ b/src/short-test/include/stm_init.h
@@ -0,0 +1,18 @@
+#ifndef __STM_INIT_H
+#define __STM_INIT_H
+
+#include "stm32f4xx_hal.h"
+
+#define LED_PORT GPIOJ
+#define LED_RED GPIO_PIN_1
+#define LED_YELLOW GPIO_PIN_2
+#define LED_GREEN GPIO_PIN_3
+#define LED_BLUE GPIO_PIN_4
+
+#define USART2_BAUD_RATE 115200
+
+extern UART_HandleTypeDef huart2;
+extern void stm_init(void);
+extern void Error_Handler(void);
+
+#endif /* __STM_INIT_H */