]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/eb_ebb/uart.h
Odometry autocalibration
[eurobot/public.git] / src / eb_ebb / uart.h
1 #ifndef UART_H\r
2 #define UART_H\r
3 \r
4 #define UART_BITS_5     0x0\r
5 #define UART_BITS_6     0x1\r
6 #define UART_BITS_7     0x2\r
7 #define UART_BITS_8     0x3\r
8 \r
9 #define UART_STOP_BIT_1         (0x0 << 2)\r
10 #define UART_STOP_BIT_2         (0x1 << 2)\r
11 \r
12 #define UART_PARIT_ENA          (0x1 << 3)\r
13 #define UART_PARIT_OFF          (0x0 << 3)\r
14 #define UART_PARIT_ODD          (0x0 << 4)\r
15 #define UART_PARIT_EVEN         (0x1 << 4)\r
16 #define UART_PARIT_FORCE_1      (0x2 << 4)\r
17 #define UART_PARIT_FORCE_0      (0x3 << 4)\r
18 \r
19 \r
20 \r
21 \r
22 void init_uart1(int baudrate, char bits, char stopbit, char parit_en, char parit_mode );\r
23 void init_uart0(int baudrate, char bits, char stopbit, char parit_en, char parit_mode );\r
24 unsigned char uart1GetCh(void);\r
25 unsigned char uart0GetCh(void);\r
26 void uart1SendCh(char ch);\r
27 void uart0SendCh(char ch);\r
28 \r
29 #endif\r