aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2015-10-29 15:42:29 -0400
committerPaul Selkirk <paul@psgd.org>2015-10-29 15:42:29 -0400
commit9278e9bafd96105b64f9946eb94f5618f01649d3 (patch)
tree2aca37b1edebc9eb717456179f85927929c98cbb /main.c
parentfb73e2d75b4e99a29c28bbbaf754222010c273b7 (diff)
add libhal tests, some cleanup (some mess-making)
Diffstat (limited to 'main.c')
-rw-r--r--main.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/main.c b/main.c
new file mode 100644
index 0000000..feec344
--- /dev/null
+++ b/main.c
@@ -0,0 +1,17 @@
+/* A wrapper for test programs that contain main() (currently libhal/tests).
+ * We compile them with -Dmain=__main, so we can do stm setup first.
+ */
+
+#include "stm-init.h"
+#include "stm-uart.h"
+
+void main(void)
+{
+ stm_init();
+ fmc_init();
+ while(1) {
+ __main();
+ uart_send_string("\r\n");
+ HAL_Delay(2000);
+ }
+}