123
Fork of LG by
Diff: uart_m.c
- Revision:
- 28:17c84ed091b3
- Parent:
- 21:bc8c1cec3da6
- Child:
- 38:716472a4492e
diff -r f9174eac3dee -r 17c84ed091b3 uart_m.c --- a/uart_m.c Fri Feb 05 08:02:55 2016 +0000 +++ b/uart_m.c Fri Feb 05 23:21:54 2016 +0000 @@ -39,9 +39,9 @@ -int UART0_BPS = 9600 ; /* ����0ͨ�Ų����� */ +int UART0_BPS = 9600 ; /* ����0ͨ�Ų����� */ int UART1_BPS = 4800; /* ����0ͨ�Ų����� */ -int UART2_BPS = 9600 ; /* ����0ͨ�Ų����� */ +int UART2_BPS = 9600 ; /* ����0ͨ�Ų����� */ int UART3_BPS = 19200 ; /* ����0ͨ�Ų����� */ #define UART_LCR_ODD 0x0b @@ -129,6 +129,7 @@ // LPC_UART0->FDR = 0x00000085; // c�� ��� LPC17xx-User-Manual_0[1].05 �� ��� 311 //���������� �� 8 �������� �� 5 // usFdiv = 4; + usFdiv = (FPCLK / 16) / UART0_BPS; /* ���ò����� */ LPC_UART0->DLM = usFdiv / 256; LPC_UART0->DLL = usFdiv % 256;