Initial commit
This commit is contained in:
parent
28a6ccc3ee
commit
1dfac0074b
10
uart_send_chr.c
Normal file
10
uart_send_chr.c
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
#include "mc8051fun.h"
|
||||
|
||||
void uart_send_chr(char tx_data)
|
||||
{
|
||||
TI = 0; /* Clear TI flag */
|
||||
SBUF = tx_data; /* Load char in SBUF register */
|
||||
while (TI==0); /* Wait until stop bit transmit */
|
||||
}
|
||||
|
8
uart_send_str.c
Normal file
8
uart_send_str.c
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
#include "mc8051fun.h"
|
||||
|
||||
void uart_send_str(const char *str)
|
||||
{
|
||||
while(*str)
|
||||
uart_send_chr(*str++);
|
||||
}
|
Loading…
Reference in New Issue
Block a user