test firmware for BLE Micro V1.3 1. test io, vcc and ble 2. act as a UART to BLE bridge

Dependencies:   BLE_API Buffer mbed

Fork of BLE_LEDBlinker by Bluetooth Low Energy

Revision:
12:c4090cb58976
Parent:
11:c8cbc4bc2c17
--- a/main.cpp	Tue Dec 08 06:02:25 2015 +0000
+++ b/main.cpp	Tue Dec 08 08:34:22 2015 +0000
@@ -84,6 +84,7 @@
         if (current_test_status == 3) 
         {
             current_test_status = 0;
+            test_output_result(0);
             test_save_result(0);
         }
         
@@ -132,8 +133,14 @@
 {
     int io_status;
     int vcc_status;
+    
     saved_test_result = test_is_passed();
     if (!saved_test_result) {
+        {
+            uart = new Serial(p20, p21); // release USBTX and USBRX
+            uart->baud(38400);
+        }
+        
         io_status = test_check_io();
         vcc_status = test_check_vcc();
         
@@ -149,12 +156,13 @@
         }
         
     } else {
-        //test_output_result(0);
+        test_output_result(0);
+        uart = new Serial(p8, p7);
+        uart->baud(38400);
     }
     
 
-    uart = new Serial(p8, p7);
-    uart->baud(38400);
+    
 
     ble.init();
     ble.gap().onConnection(connectionCallback);
@@ -183,7 +191,7 @@
             if (current_test_status == 0) {
                 LOG("from scan to connected: %d", device_connected_time - device_scan_time);
             } else if (current_test_status == 3) {
-                test_output_result(current_test_status);
+                test_output_result(3);
             }
         }
     }