mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-06-07 00:42:50 +00:00
Fix AVRISP-MKII clone and XPLAINBridge projects not properly configuring the AVRISP IN endpoint when needed if RESET_TOGGLES_LIBUSB_COMPAT compile time option is used.
This commit is contained in:
parent
615d34f1b7
commit
aba30ac2a0
@ -97,12 +97,12 @@ void EVENT_USB_Device_ConfigurationChanged(void)
|
|||||||
{
|
{
|
||||||
bool ConfigSuccess = true;
|
bool ConfigSuccess = true;
|
||||||
|
|
||||||
/* Setup AVRISP Data Endpoint(s) */
|
/* Setup AVRISP Data OUT endpoint */
|
||||||
ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
|
ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
|
||||||
|
|
||||||
#if defined(LIBUSB_DRIVER_COMPAT)
|
/* Setup AVRISP Data IN endpoint if it is using a physically different endpoint */
|
||||||
ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
|
if (AVRISP_DATA_IN_EPADDR != AVRISP_DATA_OUT_EPADDR)
|
||||||
#endif
|
ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
|
||||||
|
|
||||||
/* Indicate endpoint configuration success or failure */
|
/* Indicate endpoint configuration success or failure */
|
||||||
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
|
LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
|
||||||
|
@ -226,9 +226,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
|
|||||||
{
|
{
|
||||||
ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
|
ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_OUT_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
|
||||||
|
|
||||||
#if defined(LIBUSB_DRIVER_COMPAT)
|
if (AVRISP_DATA_IN_EPADDR != AVRISP_DATA_OUT_EPADDR)
|
||||||
ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
|
ConfigSuccess &= Endpoint_ConfigureEndpoint(AVRISP_DATA_IN_EPADDR, EP_TYPE_BULK, AVRISP_DATA_EPSIZE, 1);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Configure the V2 protocol packet handler */
|
/* Configure the V2 protocol packet handler */
|
||||||
V2Protocol_Init();
|
V2Protocol_Init();
|
||||||
|
Loading…
Reference in New Issue
Block a user