00001
00016 #ifndef _UART_LIB_H_
00017 #define _UART_LIB_H_
00018
00019
00020 #include "uart_drv.h"
00021
00022
00023
00024 #ifndef UART_CONFIG
00025 #define UART_CONFIG MSK_UART_8BIT
00026 #endif
00027
00028 #ifndef BAUDRATE
00029 #error You must define BAUDRATE in config.h
00030 #define BAUDRATE 999
00031 #endif
00032
00033 #define AUTOBAUD 0
00034
00035 #if BAUDRATE == AUTOBAUD
00036 #define Uart_set_baudrate(bdr) autobaud()
00037 #include "modules/autobaud/autobaud.h"
00038 #else
00039 #include "lib_mcu/uart/uart_bdr.h"
00040 #endif
00041
00042
00043
00044
00045
00046
00047
00058 bit uart_init (void);
00059
00072 r_uart_ptchar uart_putchar (p_uart_ptchar uc_wr_byte);
00073
00080 char uart_getchar (void);
00081
00088 bit uart_test_hit (void);
00089
00090
00091
00092 #endif