usb_serial_structs.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. #ifndef _USB_SERIAL_STRUCTS_H_
  24. #define _USB_SERIAL_STRUCTS_H_
  25. //*****************************************************************************
  26. //
  27. // The size of the transmit and receive buffers used for the redirected UART.
  28. // This number should be a power of 2 for best performance. 256 is chosen
  29. // pretty much at random though the buffer should be at least twice the size of
  30. // a maxmum-sized USB packet.
  31. //
  32. //*****************************************************************************
  33. #define UART_BUFFER_SIZE 0x0001
  34. extern uint32 RxHandler(void *pvCBData, uint32 ulEvent,
  35. uint32 ulMsgValue, void *pvMsgData);
  36. extern uint32 TxHandler(void *pvlCBData, uint32 ulEvent,
  37. uint32 ulMsgValue, void *pvMsgData);
  38. extern const tUSBBuffer g_sTxBuffer;
  39. extern const tUSBBuffer g_sRxBuffer;
  40. extern const tUSBDCDCDevice g_sCDCDevice;
  41. extern uint8 g_pucUSBTxBuffer[];
  42. extern uint8 g_pucUSBRxBuffer[];
  43. #endif