STC15W408AS library 0.9.0
|
Macros | |
#define | uart1_init(uart_baudrate) |
Initiazlize UART1. More... | |
Functions | |
void | uart1_send_byte (uint8_t data) |
uint8_t | uart1_receive_byte () |
Receive byte from UART1. More... | |
int | putchar (int ch) |
Send character to UART1. More... | |
int | getchar (void) |
Receive character from UART1. More... | |
Functions and data structures related to exchange data thru UART1
#define uart1_init | ( | uart_baudrate | ) |
Initiazlize UART1.
Initialize uart using Timer2. Set timer according to baudrate
uart_baudrate | uint32_t uart baudrate, like 9600 and etc |
int getchar | ( | void | ) |
Receive character from UART1.
This method need for scanf
int putchar | ( | int | ch | ) |
Send character to UART1.
This method need for printf
ch | character to send |
uint8_t uart1_receive_byte | ( | ) |
Receive byte from UART1.
This receive is implemented as synhcronous operation. Waiting until byte is received
void uart1_send_byte | ( | uint8_t | data | ) |
Send byte to UART
data | byte to send |