Skip to content
Snippets Groups Projects
Commit 544027da authored by Dean Camera's avatar Dean Camera
Browse files

Fix RESET_TOGGLES_LIBUSB_COMPAT option not being applied in the AVRISP-MKII descriptors.

parent 61b5740a
No related branches found
No related tags found
No related merge requests found
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "AVRISPDescriptors.h" #include "AVRISPDescriptors.h"
#if defined(RESET_TOGGLES_LIBUSB_COMPAT) || defined(__DOXYGEN__) #if defined(RESET_TOGGLES_LIBUSB_COMPAT) || defined(__DOXYGEN__)
/** Indicates if an external reset has ocurred and the compatibility mode needs to be altered */
static bool AVRISP_NeedCompatibilitySwitch ATTR_NO_INIT; static bool AVRISP_NeedCompatibilitySwitch ATTR_NO_INIT;
/** Current AVRISP data IN endpoint address. */ /** Current AVRISP data IN endpoint address. */
...@@ -208,6 +209,7 @@ uint16_t AVRISP_GetDescriptor(const uint16_t wValue, ...@@ -208,6 +209,7 @@ uint16_t AVRISP_GetDescriptor(const uint16_t wValue,
case DTYPE_Configuration: case DTYPE_Configuration:
*DescriptorMemorySpace = MEMSPACE_RAM; *DescriptorMemorySpace = MEMSPACE_RAM;
#if defined(RESET_TOGGLES_LIBUSB_COMPAT) #if defined(RESET_TOGGLES_LIBUSB_COMPAT)
/* Update the configuration descriptor with the current endpoint address */
AVRISP_ConfigurationDescriptor.AVRISP_DataInEndpoint.EndpointAddress = AVRISP_CurrDataINEndpointAddress; AVRISP_ConfigurationDescriptor.AVRISP_DataInEndpoint.EndpointAddress = AVRISP_CurrDataINEndpointAddress;
#endif #endif
...@@ -307,5 +309,7 @@ void UpdateCurrentCompatibilityMode(void) ...@@ -307,5 +309,7 @@ void UpdateCurrentCompatibilityMode(void)
} }
break; break;
} }
Delay_MS(500);
} }
#endif #endif
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
#include <LUFA/Drivers/USB/USB.h> #include <LUFA/Drivers/USB/USB.h>
#include <LUFA/Drivers/Board/LEDs.h> #include <LUFA/Drivers/Board/LEDs.h>
#include "Config/AppConfig.h"
/* Preprocessor Checks: */ /* Preprocessor Checks: */
#if defined(LIBUSB_DRIVER_COMPAT) && defined(RESET_TOGGLES_LIBUSB_COMPAT) #if defined(LIBUSB_DRIVER_COMPAT) && defined(RESET_TOGGLES_LIBUSB_COMPAT)
#error LIBUSB_DRIVER_COMPAT and RESET_TOGGLES_LIBUSB_COMPAT are mutually exclusive. #error LIBUSB_DRIVER_COMPAT and RESET_TOGGLES_LIBUSB_COMPAT are mutually exclusive.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment