annotate gsm-fw/serial/uartfax.h @ 643:d779078abe40

PCM integration: pcm_init() call
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Wed, 03 Sep 2014 17:50:06 +0000
parents afceeeb2cba1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
116
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 * UARTFAX.H
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 * This driver allows to control the UARTs of chipset 1.5 for fax and data
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 * It performs flow control: RTS/CTS, XON/XOFF.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 * (C) Texas Instruments 1999 - 2003
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12 #ifndef __UARTFAX_H__
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 #define __UARTFAX_H__
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 #ifndef C_EXTERN
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 #if 1 //(OP_L1_STANDALONE == 1)
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 #define C_EXTERN extern
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 #else
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 #define C_EXTERN
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 #endif
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 #endif
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23 /*
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24 * In UAF_Init, a constant is used to identify the UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 */
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27 typedef enum {
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28 UAF_UART_0, /* IrDA */
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29 UAF_UART_1 /* Modem */
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30 #if (CHIPSET == 12)
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31 , UAF_UART_2 /* Modem 2 */
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
32 #endif
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
33 } T_fd_UartId;
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35 #if (CHIPSET == 12)
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36 #define NUMBER_OF_FD_UART (3)
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 #else
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38 #define NUMBER_OF_FD_UART (2)
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39 #endif
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43 * UAF_Init
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45 * Purpose : Initializes the UART hardware and installs interrupt handlers.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46 * The parameters are set to the default values:
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47 * - 19200 baud,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
48 * - 8 bits / character,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
49 * - no parity,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50 * - 1 stop bit,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
51 * - no flow control.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52 * All functionalities of the UART driver are disabled.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54 * Arguments: In : uartNo: Used UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57 * Returns : FD_OK : Successful operation.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58 * FD_NOT_SUPPORTED: Wrong UART number.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59 * FD_INTERNAL_ERR : Internal problem.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
60 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
62
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
63 C_EXTERN T_FDRET UAF_Init (T_fd_UartId uartNo);
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
66 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
67 * UAF_Enable
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
68 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
69 * Purpose : The functionalities of the UART driver are disabled or enabled.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
70 * In the deactivated state, all information about the communication
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
71 * parameters should be stored and recalled if the driver is again
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
72 * enabled. When the driver is enabled the RX and TX buffers are
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
73 * cleared.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
74 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
75 * Arguments: In : uartNo: Used UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
76 * : enable: 1: enable the driver
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
77 * 0: disable the driver
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
78 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
79 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
80 * Returns : FD_OK : Successful operation.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
81 * FD_NOT_SUPPORTED: Wrong UART number.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
82 * FD_INTERNAL_ERR : Internal problem with the hardware.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
83 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
84 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
85
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
86 C_EXTERN T_FDRET UAF_Enable (T_fd_UartId uartNo,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
87 SYS_BOOL enable);
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
88
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
89 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
90 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
91 * UAF_SetComPar
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
92 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
93 * Purpose : Sets up the communication parameters: baud rate, bits per
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
94 * character, number of stop bits, parity.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
95 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
96 * Arguments: In : uartNo : Used UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
97 * baudrate: Used baud rate.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
98 * bpc : Used bits per character.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
99 * sb : Used stop bits.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
100 * parity : Used parity.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
101 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
102 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
103 * Returns : FD_OK : Successful operation.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
104 * FD_NOT_SUPPORTED: The specified parameters don't fit to the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
105 * capabilities of the UART or wrong UART number.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
106 * FD_INTERNAL_ERR : Internal problem with the hardware.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
107 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
108 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
109
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
110 C_EXTERN T_FDRET UAF_SetComPar (T_fd_UartId uartNo,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
111 T_baudrate baudrate,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
112 T_bitsPerCharacter bpc,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
113 T_stopBits sb,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
114 T_parity parity);
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
115
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
116 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
117 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
118 * UAF_SetBuffer
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
119 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
120 * Purpose : Sets up the size of the circular buffers to be used in the UART
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
121 * driver. This function may be called only if the UART is disabled
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
122 * with UAF_Enable.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
123 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
124 * Arguments: In : uartNo : Used UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
125 * bufSize : Specifies the size of the circular buffer.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
126 * rxThreshold: Amount of received bytes that leads to a call
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
127 * to suspended read-out function which is passed
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
128 * to the function UAF_ReadData.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
129 * txThreshold: Amount of bytes in the TX buffer to call the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
130 * suspended write-in function which is passed to
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
131 * the function UAF_WriteData
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
132 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
133 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
134 * Returns : FD_OK : Successful operation.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
135 * FD_NOT_SUPPORTED: bufSize exceeds the maximal possible
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
136 * capabilities of the driver or the threshold
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
137 * values don't correspond to the bufSize or
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
138 * wrong UART number.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
139 * FD_INTERNAL_ERR : Internal problem with the hardware or the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
140 * function has been called while the UART is
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
141 * enabled.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
142 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
143 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
144
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
145 C_EXTERN T_FDRET UAF_SetBuffer (T_fd_UartId uartNo,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
146 SYS_UWORD16 bufSize,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
147 SYS_UWORD16 rxThreshold,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
148 SYS_UWORD16 txThreshold);
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
149
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
150 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
151 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
152 * UAF_SetFlowCtrl
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
153 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
154 * Purpose : Changes the flow control mode of the UART driver.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
155 * If a flow control is activated, DTR is activated or XOFF is sent
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
156 * if the RX buffer is not able to store the received characters else
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
157 * DTR is deactivated or XON is sent.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
158 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
159 * Arguments: In : uartNo: Used UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
160 * fcMode: flow control mode (none, DTR/DSR, RTS/CTS, XON/XOFF).
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
161 * XON : ASCII code of the XON character.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
162 * XOFF : ASCII code of the XOFF character.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
163 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
164 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
165 * Returns : FD_OK : Successful operation.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
166 * FD_NOT_SUPPORTED: The flow control mode is not supported or wrong
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
167 * UART number.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
168 * FD_INTERNAL_ERR : Internal problem with the hardware.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
169 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
170 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
171
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
172 C_EXTERN T_FDRET UAF_SetFlowCtrl (T_fd_UartId uartNo,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
173 T_flowCtrlMode fcMode,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
174 SYS_UWORD8 XON,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
175 SYS_UWORD8 XOFF);
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
176
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
177 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
178 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
179 * UAF_SetEscape
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
180 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
181 * Purpose : To return to the command mode at the ACI while a data connection
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
182 * is established, an escape sequence has to be detected.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
183 * To distinguish between user data and the escape sequence a
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
184 * defined guard period is necessary before and after this sequence.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
185 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
186 * Arguments: In: uartNo : Used UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
187 * escChar : ASCII character which could appear three times
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
188 * as an escape sequence.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
189 * guardPeriod: Denotes the minimal duration of the rest before
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
190 * the first and after the last character of the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
191 * escape sequence, and the maximal receiving
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
192 * duration of the whole escape string. This value
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
193 * is expressed in ms.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
194 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
195 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
196 * Returns : FD_OK : Successful operation.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
197 * FD_NOT_SUPPORTED: Wrong UART number.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
198 * FD_INTERNAL_ERR : Internal problem with the hardware.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
199 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
200 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
201
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
202 C_EXTERN T_FDRET UAF_SetEscape (T_fd_UartId uartNo,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
203 SYS_UWORD8 escChar,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
204 SYS_UWORD16 guardPeriod);
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
205
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
206 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
207 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
208 * UAF_InpAvail
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
209 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
210 * Purpose : Returns the number of characters available in the RX buffer of the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
211 * driver. If the driver is disabled the function returns 0.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
212 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
213 * Arguments: In : uartNo: Used UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
214 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
215 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
216 * Returns : >= 0 : The returned value is the amount of data in the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
217 * RX buffer.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
218 * FD_NOT_SUPPORTED: Wrong UART number.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
219 * FD_NOT_READY : The function is called while the callback of the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
220 * readOutFunc function is activated and still not
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
221 * terminated.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
222 * FD_INTERNAL_ERR : Internal problem with the hardware.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
223 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
224 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
225
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
226 C_EXTERN T_FDRET UAF_InpAvail (T_fd_UartId uartNo);
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
227
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
228 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
229 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
230 * UAF_OutpAvail
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
231 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
232 * Purpose : Returns the number of free characters in TX buffer of the driver.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
233 * If the driver is disabled the function returns 0.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
234 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
235 * Arguments: In : uartNo: Used UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
236 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
237 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
238 * Returns : >= 0 : The returned value is the amount of data in the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
239 * TX buffer.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
240 * FD_NOT_SUPPORTED: Wrong UART number.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
241 * FD_NOT_READY : The function is called while the callback of the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
242 * writeInFunc function is activated and still not
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
243 * terminated.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
244 * FD_INTERNAL_ERR : Internal problem with the hardware.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
245 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
246 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
247
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
248 C_EXTERN T_FDRET UAF_OutpAvail (T_fd_UartId uartNo);
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
249
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
250 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
251 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
252 * UAF_EnterSleep
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
253 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
254 * Purpose : Checks if UART is ready to enter Deep Sleep. If ready, enables
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
255 * wake-up interrupt.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
256 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
257 * Arguments: In : uartNo: Used UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
258 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
259 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
260 * Returns : 0 : Deep Sleep is not possible.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
261 * >= 1 : Deep Sleep is possible.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
262 * FD_NOT_SUPPORTED: Wrong UART number.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
263 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
264 * Warning: Parameters are not verified.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
265 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
266 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
267
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
268 C_EXTERN T_FDRET UAF_EnterSleep (T_fd_UartId uartNo);
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
269
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
270 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
271 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
272 * UAF_WakeUp
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
273 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
274 * Purpose : Wakes up UART after Deep Sleep.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
275 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
276 * Arguments: In : uartNo: Used UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
277 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
278 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
279 * Returns : FD_OK : Successful operation.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
280 * FD_NOT_SUPPORTED: Wrong UART number.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
281 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
282 * Warning: Parameters are not verified.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
283 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
284 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
285
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
286 C_EXTERN T_FDRET UAF_WakeUp (T_fd_UartId uartNo);
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
287
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
288 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
289 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
290 * UAF_ReadData
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
291 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
292 * Purpose : To read the received characters out of the RX buffer the address
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
293 * of a function is passed. If characters are available, the driver
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
294 * calls this function and pass the address and the amount of
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
295 * readable characters. Because the RX buffer is circular, the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
296 * callback function may be called with more than one address of
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
297 * buffer fragment.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
298 * The readOutFunc function modifies the contents of the size array
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
299 * to return the driver the number of processed characters. Each
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
300 * array entry is decremented by the number of bytes read in the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
301 * fragment.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
302 * If the UAF_ReadData is called while the RX buffer is empty, it
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
303 * depends on the suspend parameter to suspend the call-back or to
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
304 * leave without any operation. In the case of suspension, the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
305 * return value of UAF_ReadData is UAF_SUSPENDED. A delayed call-back
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
306 * will be performed if:
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
307 * - the RX buffer reachs the adjusted threshold (rxThreshold of
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
308 * UAF_SetBuffer),
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
309 * - the state of a V.24 input line has changed,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
310 * - a break is detected,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
311 * - an escape sequence is detected.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
312 * If no suspension is necessary the function returns the number of
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
313 * processed bytes.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
314 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
315 * Arguments: In : uartNo : Used UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
316 * suspend : mode of suspension in case of RX buffer empty.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
317 * readOutFunc: Callback function.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
318 * cldFromIrq: The driver sets this parameter to 1
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
319 * if the callback function is called
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
320 * from an interrupt service routine.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
321 * reInstall : The call-back function sets this
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
322 * parameter to rm_reInstall if the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
323 * driver must call again the callback
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
324 * function when the RX threshold level
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
325 * is reached. Else it will be set to
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
326 * rm_noInstall. Before to call the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
327 * readOutFunc function this parameter
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
328 * is set to rm_notDefined.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
329 * nsource : Informed the callback function about
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
330 * the number of fragments which are
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
331 * ready to copy from the circular RX
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
332 * buffer.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
333 * source : Array which contains the addresses
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
334 * of the fragments.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
335 * size : Array which contains the sizes of
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
336 * each fragments.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
337 * state : The state parameter is the status
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
338 * of the V.24 lines and the break /
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
339 * escape detection. The state
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
340 * parameter is described in the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
341 * specification of UAF_GetLineState.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
342 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
343 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
344 * Returns : >= 0 : Succesful operation. Amount of processed bytes.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
345 * FD_NOT_SUPPORTED: Wrong UART number.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
346 * FD_SUSPENDED : The callback is suspended until the buffer or
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
347 * state condition changed.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
348 * FD_NOT_READY : The function is called while the callback is
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
349 * activated and still not terminated.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
350 * FD_INTERNAL_ERR : Internal problems with the hardware.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
351 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
352 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
353
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
354 C_EXTERN T_FDRET UAF_ReadData (T_fd_UartId uartNo,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
355 T_suspendMode suspend,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
356 void (readOutFunc (SYS_BOOL cldFromIrq,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
357 T_reInstMode *reInstall,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
358 SYS_UWORD8 nsource,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
359 SYS_UWORD8 *source[],
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
360 SYS_UWORD16 size[],
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
361 SYS_UWORD32 state)));
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
362
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
363 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
364 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
365 * UAF_WriteData
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
366 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
367 * Purpose : To write characters into the TX buffer the address of a function
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
368 * is passed. If free space is available in the buffer, the driver
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
369 * calls this function and passes the destination address and the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
370 * amount of space. Because the TX buffer is circular, the callback
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
371 * function may be called with more than one address of buffer
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
372 * fragment.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
373 * The writeInFunc function modifies the contents of the size array
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
374 * to return the driver the number of processed bytes. Each array
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
375 * entry is decremented by the number of bytes written in this
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
376 * fragment.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
377 * If the UAF_WriteData function is called while the TX buffer is
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
378 * full, it depends on the suspend parameter to suspend the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
379 * call-back or to leave this function without any operation. In the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
380 * case of suspension the returned value of the UAF_WriteData is
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
381 * UAF_SUSPENDED. A delayed call-back will be performed if the TX
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
382 * buffer reaches the adjusted threshold (txThreshold of
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
383 * UAF_SetBuffer). If no suspension is necessary the function returns
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
384 * the number of processed bytes.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
385 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
386 * Arguments: In : uartNo : Used UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
387 * suspend : mode of suspension in case of TX buffer empty.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
388 * writeInFunc: Callback function.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
389 * cldFromIrq: The driver sets this parameter to 1
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
390 * if the call-back function is called
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
391 * from an interrupt service routine.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
392 * reInstall : The callback function sets this
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
393 * parameter to rm_reInstall if the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
394 * driver must call again the callback
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
395 * function when the TX threshold level
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
396 * is reached. Else it will be set to
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
397 * rm_noInstall. Before to call the
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
398 * writeInFunc function this parameter
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
399 * is set to rm_notDefined.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
400 * ndest : Informed the callback function about
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
401 * the number of fragments which are
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
402 * available in the TX buffer.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
403 * dest : Array which contains the addresses
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
404 * of the fragments.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
405 * size : Array which contains the sizes of
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
406 * each fragments.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
407 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
408 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
409 * Returns : >= 0 : Succesful operation. Amount of processed bytes.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
410 * FD_NOT_SUPPORTED: Wrong UART number.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
411 * FD_SUSPENDED : The callback is suspended until the buffer
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
412 * condition changed.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
413 * FD_NOT_READY : The function is called while the callback is
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
414 * activated and still not terminated.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
415 * FD_INTERNAL_ERR : Internal problems with the hardware.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
416 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
417 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
418
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
419 C_EXTERN T_FDRET UAF_WriteData (T_fd_UartId uartNo,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
420 T_suspendMode suspend,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
421 void (writeInFunc (SYS_BOOL cldFromIrq,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
422 T_reInstMode *reInstall,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
423 SYS_UWORD8 ndest,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
424 SYS_UWORD8 *dest[],
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
425 SYS_UWORD16 size[])));
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
426
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
427 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
428 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
429 * UAF_StopRec
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
430 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
431 * Purpose : If a flow control mode is set, this function tells the terminal
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
432 * equipment that no more data can be received.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
433 * XON/XOFF: XOFF is sent.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
434 * DTR/DSR : DTR is desactivated.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
435 * RTS/CTS : RTS is deactivated.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
436 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
437 * Arguments: In : uartNo: Used UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
438 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
439 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
440 * Returns : FD_OK : Successful operation.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
441 * FD_NOT_SUPPORTED: Wrong UART number.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
442 * FD_INTERNAL_ERR : Internal problem with the hardware.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
443 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
444 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
445
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
446 C_EXTERN T_FDRET UAF_StopRec (T_fd_UartId uartNo);
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
447
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
448 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
449 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
450 * UAF_StartRec
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
451 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
452 * Purpose : If a flow control mode is set, this function tells the terminal
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
453 * equipment that the receiver is again able to receive more data.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
454 * If the buffer has already reached the high water mark the driver
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
455 * sends the signal only if the buffer drains to a low water mark.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
456 * XON/XOFF: XON is sent.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
457 * DTR/DSR : DTR is activated.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
458 * RTS/CTS : RTS is activated.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
459 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
460 * Arguments: In : uartNo: Used UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
461 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
462 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
463 * Returns : FD_OK : Successful operation.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
464 * FD_NOT_SUPPORTED: Wrong UART number.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
465 * FD_INTERNAL_ERR : Internal problem with the hardware.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
466 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
467 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
468
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
469 C_EXTERN T_FDRET UAF_StartRec (T_fd_UartId uartNo);
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
470
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
471 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
472 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
473 * UAF_GetLineState
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
474 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
475 * Purpose : Returns the state of the V.24 lines, the flow control state and
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
476 * the result of the break/escape detection process as a bit field.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
477 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
478 * Arguments: In : uartNo: Used UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
479 * Out: state : State of the V.24 lines, the flow control state and
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
480 * the result of the break/escape sequence detection
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
481 * process as a bit field.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
482 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
483 * Returns : FD_OK : Successful operation.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
484 * FD_NOT_SUPPORTED: Wrong UART number.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
485 * FD_NOT_READY : The function is called while the callback of
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
486 * the readOutFunc function is activated and still
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
487 * not terminated.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
488 * FD_INTERNAL_ERR : Internal problem with the hardware.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
489 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
490 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
491
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
492 C_EXTERN T_FDRET UAF_GetLineState (T_fd_UartId uartNo,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
493 SYS_UWORD32 *state);
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
494
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
495 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
496 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
497 * UAF_SetLineState
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
498 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
499 * Purpose : Sets the states of the V.24 status lines according to the bit
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
500 * field of the parameter state.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
501 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
502 * Arguments: In : uartNo: Used UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
503 * state : Bit field. Only the signals which are marked with
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
504 * the 'set' access can be used to change the state of
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
505 * the signal.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
506 * mask : Bit field with the same structure as state. Each bit
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
507 * in state corresponds to a bit in mask. Settabled
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
508 * bits marked by a 1 are manipulated by the driver.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
509 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
510 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
511 * Returns : FD_OK : Successful operation.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
512 * FD_NOT_SUPPORTED: Wrong UART number.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
513 * FD_INTERNAL_ERR : Internal problem with the hardware.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
514 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
515 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
516
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
517 C_EXTERN T_FDRET UAF_SetLineState (T_fd_UartId uartNo,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
518 SYS_UWORD32 state,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
519 SYS_UWORD32 mask);
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
520
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
521 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
522 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
523 * UAF_InterruptHandler
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
524 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
525 * Purpose : Interrupt handler.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
526 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
527 * Arguments: In : uart_id : origin of interrupt
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
528 * interrupt_status: source of interrupt
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
529 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
530 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
531 * Returns : none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
532 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
533 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
534
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
535 C_EXTERN void UAF_InterruptHandler (T_fd_UartId uart_id,
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
536 SYS_UWORD8 interrupt_status);
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
537
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
538 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
539 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
540 * UAF_CheckXEmpty
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
541 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
542 * Purpose : Checks the empty condition of the Transmitter.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
543 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
544 * Arguments: In : uartNo: Used UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
545 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
546 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
547 * Returns : FD_OK : Empty condition OK.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
548 * FD_NOT_SUPPORTED: Wrong UART number.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
549 * FD_NOT_READY : Empty condition not OK.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
550 * FD_INTERNAL_ERR : Internal problem with the hardware.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
551 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
552 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
553
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
554 C_EXTERN T_FDRET UAF_CheckXEmpty (T_fd_UartId uartNo);
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
555
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
556 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
557 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
558 * UAF_DTRInterruptHandler
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
559 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
560 * Purpose : This function is only used on C-Sample. On this platform, the DTR
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
561 * signal is controlled with an I/O. A change of state of this signal
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
562 * is detected with an interrupt. This function is called when this
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
563 * interrupt occurs.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
564 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
565 * Arguments: In : none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
566 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
567 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
568 * Returns : none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
569 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
570 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
571
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
572 void UAF_DTRInterruptHandler (void);
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
573
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
574 /*******************************************************************************
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
575 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
576 * UAF_Exit
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
577 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
578 * Purpose :
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
579 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
580 * Arguments: In : uartNo: Used UART.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
581 * Out: none
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
582 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
583 * Returns : FD_OK : Successful operation.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
584 * FD_NOT_SUPPORTED: Wrong UART number.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
585 * FD_INTERNAL_ERR : Internal problem.
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
586 *
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
587 ******************************************************************************/
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
588
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
589 T_FDRET UAF_Exit (T_fd_UartId uartNo);
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
590
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
591 #undef C_EXTERN
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
592
22c8199e08af started integrating TI's serial code
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
593 #endif /* __UARTFAX_H__ */