Vince et Yann / Mbed 2 deprecated APP1_customProtocole

Dependencies:   mbed

Fork of APP1_customProtocole by Yann Lemay-Sévigny

Revision:
6:5c8e02d5ebcc
Parent:
5:259661cbf9c3
Child:
7:7424c51ee942
--- a/customUART.cpp	Mon Jan 11 04:04:54 2016 +0000
+++ b/customUART.cpp	Mon Jan 11 20:01:34 2016 +0000
@@ -18,7 +18,6 @@
     volatile int* U3LCR = (volatile int*)0x4009C00C;
     volatile int* U3DLL = (volatile int*)0x4009C000;
     volatile int* U3DLM = (volatile int*)0x4009C004;
-    
     *U3LCR = *U3LCR | (0b1 << 7);
     *U3DLM = 0x02;
     *U3DLL = 0x71;
@@ -28,12 +27,13 @@
     volatile int* U3FCR = (volatile int*)0x4009C008;
     *U3FCR = *U3FCR | 0b1;
     
-
+    //Set the pointer for the writting process
+    U3THR = (volatile int*)0x4009C000;
 }
 
 void CustomUART::putc(const char caracter)
 {
-    volatile int* U3THR = (volatile int*)0x4009C000;
+    //Write the caracter on the register
     *U3THR = caracter;
 }
     
\ No newline at end of file