Tool/software: TI-RTOS
Hi All,
TM4C1294KCPDT - Serial - CDC example.
In the USBDCDCInit() API, to initialize the CDC layer the structure parameter that is passed to it is tUSBDCDCDevice,as below :
typedef struct
{
const uint16_t ui16VID;
const uint16_t ui16PID;
const uint16_t ui16MaxPowermA;
const uint8_t ui8PwrAttributes;
const tUSBCallback pfnControlCallback;
void *pvControlCBData;
const tUSBCallback pfnRxCallback;
void *pvRxCBData;
const tUSBCallback pfnTxCallback;
void *pvTxCBData;
const uint8_t *const *ppui8StringDescriptors;
const uint32_t ui32NumStringDescriptors;
tCDCSerInstance sPrivateData;
}
tUSBDCDCDevice
The 7th and 9th params are function callbacks to be registered to notify on send and receive events.
It is observed in the sample project and also elsewhere that USBBufferEventCallback is registered which is a driver API.
Why is it so?
Isn't it that an application callback should be registered.?