Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of APP1_customProtocole by
Diff: customUART.cpp
- 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
