1 //*****************************************************************************
2 //
3 // usb_serial_structs.h - Data structures defining this USB CDC device.
4 //
5 // Copyright (c) 2008-2010 Texas Instruments Incorporated.  All rights reserved.
6 // Software License Agreement
7 //
8 // Texas Instruments (TI) is supplying this software for use solely and
9 // exclusively on TI's microcontroller products. The software is owned by
10 // TI and/or its suppliers, and is protected under applicable copyright
11 // laws. You may not combine this software with "viral" open-source
12 // software in order to form a larger program.
13 //
14 // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
15 // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
16 // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17 // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
18 // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
19 // DAMAGES, FOR ANY REASON WHATSOEVER.
20 //
21 //
22 //*****************************************************************************
23 
24 #ifndef _USB_SERIAL_STRUCTS_H_
25 #define _USB_SERIAL_STRUCTS_H_
26 
27 //*****************************************************************************
28 //
29 // The size of the transmit and receive buffers used for the redirected UART.
30 // This number should be a power of 2 for best performance.  256 is chosen
31 // pretty much at random though the buffer should be at least twice the size of
32 // a maxmum-sized USB packet.
33 //
34 //*****************************************************************************
35 #define UART_BUFFER_SIZE 0x0001
36 
37 extern uint32 RxHandler(void *pvCBData, uint32 ulEvent,
38                                uint32 ulMsgValue, void *pvMsgData);
39 extern uint32 TxHandler(void *pvlCBData, uint32 ulEvent,
40                                uint32 ulMsgValue, void *pvMsgData);
41 
42 extern const tUSBBuffer g_sTxBuffer;
43 extern const tUSBBuffer g_sRxBuffer;
44 extern const tUSBDCDCDevice g_sCDCDevice;
45 extern uint8 g_pucUSBTxBuffer[];
46 extern uint8 g_pucUSBRxBuffer[];
47 
48 #endif
49