Laurent Huot
/
SPI
drtgddf
Diff: UART.cpp
- Revision:
- 0:aab1f335cf6b
- Child:
- 1:2b2be189b4db
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/UART.cpp Mon Jan 11 19:10:09 2016 +0000 @@ -0,0 +1,23 @@ +#include "UART.h" + +UART::UART() +{ + + //*PCLKSEL0 |= 0x000000C0; + //Donne acces aux registres DLL et DLM pour set le baud rate + *U0LCR |= 0x00000080; + + //On active les pins pour TXD0 + *PINSEL0 &= ~0x00000020; + *PINSEL0 |= 0x00000010; + + //On active le FIFO + *U0FCR |= 0x00000001; + + //8 bits de data + *U0LCR |= 0x00000003; + //1 Seul stop bit, pas de parite + *U0LCR &= ~0x0000000C; + + +} \ No newline at end of file