Initial commit

This commit is contained in:
7u83 2024-05-18 02:14:33 +02:00
parent 28a6ccc3ee
commit 1dfac0074b
2 changed files with 18 additions and 0 deletions

10
uart_send_chr.c Normal file
View 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
View File

@ -0,0 +1,8 @@
#include "mc8051fun.h"
void uart_send_str(const char *str)
{
while(*str)
uart_send_chr(*str++);
}