Buffer_Initialize(&UARTtoUSB_Buffer);\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+ sei();\r
\r
for (;;)\r
{\r
if (USB_DeviceState != DEVICE_STATE_Configured)\r
return;\r
\r
- Endpoint_SelectEndpoint(AVRISP_DATA_EPNUM);\r
+ Endpoint_SelectEndpoint(AVRISP_DATA_OUT_EPNUM);\r
\r
/* Check to see if a V2 Protocol command has been received */\r
if (Endpoint_IsOUTReceived())\r
/** Event handler for the library USB Configuration Changed event. */\r
void EVENT_USB_Device_ConfigurationChanged(void)\r
{\r
- bool EndpointConfigSuccess;\r
+ bool EndpointConfigSuccess = true;\r
\r
/* Configure the device endpoints according to the selected mode */\r
if (CurrentFirmwareMode == MODE_USART_BRIDGE)\r
{\r
- EndpointConfigSuccess = CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface);\r
+ EndpointConfigSuccess &= CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface);\r
}\r
else\r
{\r
- EndpointConfigSuccess = Endpoint_ConfigureEndpoint(AVRISP_DATA_EPNUM, EP_TYPE_BULK,\r
- ENDPOINT_DIR_OUT, AVRISP_DATA_EPSIZE,\r
- ENDPOINT_BANK_SINGLE);\r
+ EndpointConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPNUM, EP_TYPE_BULK,\r
+ ENDPOINT_DIR_OUT, AVRISP_DATA_EPSIZE,\r
+ ENDPOINT_BANK_SINGLE);\r
+\r
+ #if defined(LIBUSB_FILTERDRV_COMPAT)\r
+ EndpointConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPNUM, EP_TYPE_BULK,\r
+ ENDPOINT_DIR_IN, AVRISP_DATA_EPSIZE,\r
+ ENDPOINT_BANK_SINGLE);\r
+ #endif\r
}\r
\r
if (EndpointConfigSuccess)\r