Tool/software: Code Composer Studio
Looks like the usb_dev_bulk example put the data into TxBuffer once it receives a character by calling EchoNewDataToHost().
If I understand right, can I do it in a different way, which is, the device only puts data into TxBuffer when host requests it?
Is there a related EVENT can be put into TxHandler like this?
uint32_t
TxHandler(void *pvCBData, uint32_t ulEvent, uint32_t ulMsgValue,
void *pvMsgData)
{
//
// No action is required in response to any transmit event in this example.
// All that is done is to update the transmit counter.
//
if(ulEvent == USB_EVENT_TX_COMPLETE)
{
g_ulTxCount += ulMsgValue;
}
return(0);
}
uint32_t
TxHandler(void *pvCBData, uint32_t ulEvent, uint32_t ulMsgValue,
void *pvMsgData)
{
switch(ulEvent)
//
// No action is required in response to any transmit event in this example.
// All that is done is to update the transmit counter.
//
case USB_EVENT_TX_COMPLETE:
{
g_ulTxCount += ulMsgValue;
break;
}
//
case USB_EVENT_TX_REQUEST:
{
usbdatatx();
break;
}
return(0);
}
Thanks in advance