Hi,
I modified your example, usb_dev_serial to run without the UART. My program just echos back whatever I type on the serial terminal. I have attached the complete program below. I have the following questions.
I handle the event, USB_EVENT_DATA_REMAINING in the RxHandler just by returning 0 as follows. Is that OK?
// We are being asked how much unprocessed data we have still to
// process. We send 0 if USB Tx buffer can take data
case USB_EVENT_DATA_REMAINING:
{
return(0);
}
In the ControlHandler, I handle multiple events by ignoring them (see below). These were handling UART events in the example code.
case USBD_CDC_EVENT_GET_LINE_CODING:
case USBD_CDC_EVENT_SET_LINE_CODING:
case USBD_CDC_EVENT_SET_CONTROL_LINE_STATE:
break;
case USB_EVENT_DATA_REMAINING:
{
return(0);
}
Thank you,