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 "uart/uart_bdr.h"
00040 #endif
00041
00042 #include "compiler.h"
00043
00044
00045
00046
00047
00048
00049
00060 bit uart_init(void);
00061
00074 r_uart_ptchar uart_putchar(p_uart_ptchar uc_wr_byte);
00075
00082 r_uart_gtchar uart_getchar(void);
00083
00090 bit uart_test_hit (void);
00091
00092
00093
00094 #endif