tested

Dependencies:   Queue mbed-rtos mbed

Revision:
0:265e6a986bf1
diff -r 000000000000 -r 265e6a986bf1 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Jul 27 12:53:20 2017 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+#include "rtos.h"
+#include "ringbuf.h"
+#include "serial_bus.h"
+#include "can_bus.h"
+
+Serial pc(USBTX, USBRX);
+
+DigitalOut reset(p21);
+DigitalOut enable(p22);
+DigitalOut reflash(p23);
+
+void main() {
+   
+    pc.baud(115200);
+    
+    /* setup the system before using it */
+    reset = 0;
+    enable = 1;
+    reflash = 1;
+    
+    wait(0.1);
+    reset = 1;
+    wait(2.0);
+    pc.printf("mbed boot up... \r\n");
+    
+    start_serial_bus();
+    
+    while(1) 
+    {
+        Thread::wait(100);
+        }
+}