This commit is contained in:
but0n 2016-08-21 22:46:46 +08:00
parent fa13a73c6f
commit a511122083
2 changed files with 6 additions and 6 deletions

View File

@ -4,7 +4,7 @@
void uart_init(unsigned int pclk2, unsigned int bound);
void uart_sendData(unsigned char data);
void uart_showData(short k);
void uart_showData(short k); //THIS FUNCTION IS NOT SO GOOD, EG: uart_showData(1000)
unsigned char uart_Float2Char(float value);
#endif

View File

@ -42,11 +42,11 @@ void uart_showData(short k) {
b = (unsigned char)(k/1000) % 10;
a = (unsigned char)(k/10000);
uart_sendData(a+0x30);
uart_sendData(b+0x30);
uart_sendData(c+0x30);
uart_sendData(d+0x30);
uart_sendData(e+0x30);
uart_sendData(a+'0');
uart_sendData(b+'0');
uart_sendData(c+'0');
uart_sendData(d+'0');
uart_sendData(e+'0');
uart_sendData(' ');
}