00001 //***************************************************************************** 00002 // 00003 // usb_serial_structs.h - Data structures defining this USB CDC device. 00004 // 00005 // Copyright (c) 2012-2014 Texas Instruments Incorporated. All rights reserved. 00006 // Software License Agreement 00007 // 00008 // Texas Instruments (TI) is supplying this software for use solely and 00009 // exclusively on TI's microcontroller products. The software is owned by 00010 // TI and/or its suppliers, and is protected under applicable copyright 00011 // laws. You may not combine this software with "viral" open-source 00012 // software in order to form a larger program. 00013 // 00014 // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS. 00015 // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT 00016 // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00017 // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY 00018 // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL 00019 // DAMAGES, FOR ANY REASON WHATSOEVER. 00020 // 00021 // This is part of revision 2.1.0.12573 of the EK-TM4C123GXL Firmware Package. 00022 // 00023 //***************************************************************************** 00024 00025 #ifndef _USB_SERIAL_STRUCTS_H_ 00026 #define _USB_SERIAL_STRUCTS_H_ 00027 00028 //***************************************************************************** 00029 // 00030 // The size of the transmit and receive buffers used for the redirected UART. 00031 // This number should be a power of 2 for best performance. 256 is chosen 00032 // pretty much at random though the buffer should be at least twice the size of 00033 // a maxmum-sized USB packet. 00034 // 00035 //***************************************************************************** 00036 #ifdef __cpluspus 00037 extern "C" { 00038 #endif 00039 00040 #ifndef UART_BUFFER_SIZE 00041 #define UART_BUFFER_SIZE 256 00042 #endif 00043 00044 //***************************************************************************** 00045 // 00046 // CDC device callback function prototypes. 00047 // 00048 //***************************************************************************** 00049 uint32_t RxHandler(void *pvCBData, uint32_t ui32Event, 00050 uint32_t ui32MsgValue, void *pvMsgData); 00051 uint32_t TxHandler(void *pvCBData, uint32_t ui32Event, 00052 uint32_t ui32MsgValue, void *pvMsgData); 00053 uint32_t ControlHandler(void *pvCBData, uint32_t ui32Event, 00054 uint32_t ui32MsgValue, void *pvMsgData); 00055 00056 extern tUSBBuffer g_sTxBuffer; 00057 extern tUSBBuffer g_sRxBuffer; 00058 extern tUSBDCDCDevice g_sCDCDevice; 00059 extern uint8_t g_pui8USBTxBuffer[]; 00060 extern uint8_t g_pui8USBRxBuffer[]; 00061 00062 #ifdef __cpluspus 00063 } 00064 #endif 00065 00066 #endif