aboutsummaryrefslogtreecommitdiff
path: root/Projects/XPLAINBridge/XPLAINBridge.c
diff options
context:
space:
mode:
authorDean Camera <[email protected]>2010-03-31 09:20:24 +0000
committerDean Camera <[email protected]>2010-03-31 09:20:24 +0000
commitc9148f9b473187163f9b1384b993315e39a14711 (patch)
tree2ba2e20b8efb6662876a960e899c26fe516a5382 /Projects/XPLAINBridge/XPLAINBridge.c
parentce46257ff297d19958b6303f30f69dd053fd9fa1 (diff)
downloadqmk_firmware-c9148f9b473187163f9b1384b993315e39a14711.tar.gz
qmk_firmware-c9148f9b473187163f9b1384b993315e39a14711.zip
Added WIN_LIBUSB_COMPAT compile time option to the AVRISP programmer project to make the code compatible with Windows builds of avrdude at the expense of AVRStudio compatibility.
Diffstat (limited to 'Projects/XPLAINBridge/XPLAINBridge.c')
-rw-r--r--Projects/XPLAINBridge/XPLAINBridge.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/Projects/XPLAINBridge/XPLAINBridge.c b/Projects/XPLAINBridge/XPLAINBridge.c
index e5b282ee50..7ca94b273f 100644
--- a/Projects/XPLAINBridge/XPLAINBridge.c
+++ b/Projects/XPLAINBridge/XPLAINBridge.c
@@ -99,7 +99,7 @@ void AVRISP_Task(void)
if (USB_DeviceState != DEVICE_STATE_Configured)
return;
- Endpoint_SelectEndpoint(AVRISP_DATA_EPNUM);
+ Endpoint_SelectEndpoint(AVRISP_DATA_OUT_EPNUM);
/* Check to see if a V2 Protocol command has been received */
if (Endpoint_IsOUTReceived())
@@ -178,18 +178,24 @@ void SetupHardware(void)
/** Event handler for the library USB Configuration Changed event. */
void EVENT_USB_Device_ConfigurationChanged(void)
{
- bool EndpointConfigSuccess;
+ bool EndpointConfigSuccess = true;
/* Configure the device endpoints according to the selected mode */
if (CurrentFirmwareMode == MODE_USART_BRIDGE)
{
- EndpointConfigSuccess = CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface);
+ EndpointConfigSuccess &= CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface);
}
else
{
- EndpointConfigSuccess = Endpoint_ConfigureEndpoint(AVRISP_DATA_EPNUM, EP_TYPE_BULK,
- ENDPOINT_DIR_OUT, AVRISP_DATA_EPSIZE,
- ENDPOINT_BANK_SINGLE);
+ EndpointConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPNUM, EP_TYPE_BULK,
+ ENDPOINT_DIR_OUT, AVRISP_DATA_EPSIZE,
+ ENDPOINT_BANK_SINGLE);
+
+ #if defined(WIN_LIBUSB_COMPAT)
+ EndpointConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPNUM, EP_TYPE_BULK,
+ ENDPOINT_DIR_IN, AVRISP_DATA_EPSIZE,
+ ENDPOINT_BANK_SINGLE);
+ #endif
}
if (EndpointConfigSuccess)