usbhcdcserial.h
Go to the documentation of this file.
1 //*****************************************************************************
2 //
3 // usbhcdcserial.h - USB CDC host class driver.
4 //
5 // Copyright (c) 2008-2017 Texas Instruments Incorporated. All rights reserved.
6 // Software License Agreement
7 //
8 // Texas Instruments (TI) is supplying this software for use solely and
9 // TI and/or its suppliers, and is protected under applicable copyright
10 // laws. You may not combine this software with "viral" open-source
11 // software in order to form a larger program.
12 //
13 // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
14 // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
15 // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
16 // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
17 // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
18 // DAMAGES, FOR ANY REASON WHATSOEVER.
19 //
20 //
21 //*****************************************************************************
22 #ifndef __USBHCDCSERIAL_H__
23 #define __USBHCDCSERIAL_H__
24 
25 //*****************************************************************************
26 //
27 // If building with a C++ compiler, make all of the definitions in this header
28 // have a C binding.
29 //
30 //*****************************************************************************
31 #ifdef __cplusplus
32 extern "C"
33 {
34 #endif
35 
36 
37 //*****************************************************************************
38 //
41 //
42 //*****************************************************************************
43 
44 //*****************************************************************************
45 //
46 // These are the flags for the ui32CDCFlags member variable.
47 //
48 //*****************************************************************************
49 #define USBHCDC_DEVICE_PRESENT 0x00000001
50 
51 
53 
54 //*****************************************************************************
55 //
56 // The prototype for the host USB CDC driver callback function.
57 //
58 //*****************************************************************************
59 typedef void (*tUSBHCDCSerialCallback)(tUSBHCDCSerial *psCdcSerialInstance,
60  uint32_t ui32Event,
61  uint32_t ui32MsgParam,
62  void *pvMsgData);
63 
65 
66 extern uint32_t USBHCDCSerialClose(tUSBHCDCSerial *psCdcInstance);
67 
68 extern uint32_t USBHCDCSerialInit(tUSBHCDCSerial *psCdcInstance);
69 
70 extern uint32_t USBHCDCGetDataFromDevice(tUSBHCDCSerial *psCdcSerialInstance, uint32_t ui32Interface);
71 extern uint32_t USBHCDCProcessData(tUSBHCDCSerial *psCdcSerialInstance, uint8_t ui8ArrayIndex);
72 extern uint32_t USBHCDCSendDataToDevice(tUSBHCDCSerial *psCdcSerialInstance, uint32_t ui32Interface,
73  uint8_t *ui8SendBuffer, uint8_t byteSize);
74 //*****************************************************************************
75 //
76 // Mark the end of the C bindings section for C++ compilers.
77 //
78 //*****************************************************************************
79 #ifdef __cplusplus
80 }
81 #endif
82 
83 #endif
tUSBHCDCSerial * USBHCDCSerialOpen(tUSBHCDCSerialCallback pfnCallback)
Definition: usbhcdcserial.c:121
uint32_t USBHCDCSerialClose(tUSBHCDCSerial *psCdcSerialInstance)
Definition: usbhcdcserial.c:154
uint32_t USBHCDCSerialInit(tUSBHCDCSerial *psCdcInstance)
Definition: usbhcdcserial.c:254
void(* tUSBHCDCSerialCallback)(tUSBHCDCSerial *psCdcSerialInstance, uint32_t ui32Event, uint32_t ui32MsgParam, void *pvMsgData)
Definition: usbhcdcserial.h:59
uint32_t USBHCDCGetDataFromDevice(tUSBHCDCSerial *psCdcSerialInstance, uint32_t ui32Interface)
Definition: usbhcdcserial.c:302
uint32_t USBHCDCProcessData(tUSBHCDCSerial *psCdcSerialInstance, uint8_t ui8ArrayIndex)
Definition: usbhcdcserial.c:395
struct tUSBHCDCSerial tUSBHCDCSerial
Definition: usbhcdcserial.h:52
uint32_t USBHCDCSendDataToDevice(tUSBHCDCSerial *psCdcSerialInstance, uint32_t ui32Interface, uint8_t *ui8SendBuffer, uint8_t byteSize)
Definition: usbhcdcserial.c:350
Copyright 2018, Texas Instruments Incorporated