]> git.sur5r.net Git - freertos/blob - Demo/ColdFire_MCF52221_CodeWarrior/sources/uart_support.h
Start of a new ColdFire/CodeWarrior demo.
[freertos] / Demo / ColdFire_MCF52221_CodeWarrior / sources / uart_support.h
1 /*\r
2  * File:        uart_support.h\r
3  * Purpose:     Implements UART basic support, Derivative Specific Interrupt handler and need function needed \r
4  *              for MSL Support (printf\cout to terminal), defined in <UART.h>\r
5  *\r
6  * Notes:       \r
7  *              \r
8  */\r
9 \r
10 #ifndef __UART_SUPPORT_H__\r
11 #define __UART_SUPPORT_H__\r
12 \r
13 #ifdef __cplusplus\r
14 extern "C" {\r
15 #endif\r
16 \r
17 \r
18 #include "support_common.h"\r
19 \r
20 #if ENABLE_UART_SUPPORT==1 \r
21 \r
22 /* \r
23  * Include the Freescale UART specific header file for printf/cout/scanf support \r
24  */\r
25 #include <ansi_parms.h>\r
26 #ifdef __cplusplus\r
27 extern "C" {\r
28 #endif\r
29 #include <UART.h>\r
30 #ifdef __cplusplus\r
31 }\r
32 #endif\r
33 \r
34 #define UART_STANDARD   0\r
35 #define UART_DIVIDER    1\r
36 #define UART_5407               2\r
37 #define UART_PSC                3\r
38 #define UART_54451              4\r
39 \r
40 #define UART_SUPPORT_TYPE    UART_STANDARD\r
41 \r
42 void uart_init(int channel, unsigned long systemClockKHz, unsigned long baudRate);\r
43 \r
44 /********************************************************************/\r
45 /*\r
46  * Wait for a character to be received on the specified UART\r
47  *\r
48  * Return Values:\r
49  *  the received character\r
50  */\r
51 char uart_getchar (int channel);\r
52 \r
53 /********************************************************************/\r
54 /*\r
55  * Wait for space in the UART Tx FIFO and then send a character\r
56  */ \r
57 void uart_putchar (int channel, char ch);\r
58 \r
59 \r
60 #endif  /* ENABLE_UART_SUPPORT */\r
61 \r
62 #ifdef __cplusplus\r
63 }\r
64 #endif\r
65 \r
66 #endif /* __UART_SUPPORT_H__ */\r