aboutsummaryrefslogtreecommitdiff
path: root/self-test/uart-test.c
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2016-04-11 14:44:44 -0400
committerPaul Selkirk <paul@psgd.org>2016-04-11 14:44:44 -0400
commit79b1ba7104dba52dbfacf11a07305702889f440b (patch)
tree75a08fdc6e3af427e953f319b3fdb0f9dcfdf80e /self-test/uart-test.c
parentd5669dac8c7ab2fbf6bd3c7faed7ce050c94ee1a (diff)
Reorganize Makefile and directory structure, because it's messy, and it's about to get messier.
Diffstat (limited to 'self-test/uart-test.c')
-rw-r--r--self-test/uart-test.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/self-test/uart-test.c b/self-test/uart-test.c
deleted file mode 100644
index 8fe7795..0000000
--- a/self-test/uart-test.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Test code that just sends the letters 'a' to 'z' over and
- * over again using USART2.
- *
- * Toggles the BLUE LED slowly and the RED LED for every
- * character sent.
- */
-#include "stm32f4xx_hal.h"
-#include "stm-init.h"
-#include "stm-led.h"
-#include "stm-uart.h"
-
-#define DELAY() HAL_Delay(100)
-
-int
-main()
-{
- uint8_t c = 'a';
-
- stm_init();
-
- while (1)
- {
- HAL_GPIO_TogglePin(LED_PORT, LED_RED);
-
- uart_send_char(c);
- DELAY();
-
- if (c++ == 'z') {
- c = 'a';
- HAL_GPIO_TogglePin(LED_PORT, LED_BLUE);
- }
- }
-}