Remove legacy AVRISP-MKII clone compatibility compile options.
authorDean Camera <dean@fourwalledcubicle.com>
Sun, 7 Feb 2016 04:42:39 +0000 (15:42 +1100)
committerDean Camera <dean@fourwalledcubicle.com>
Sun, 7 Feb 2016 04:42:39 +0000 (15:42 +1100)
14 files changed:
Projects/AVRISP-MKII/AVRISP-MKII.c
Projects/AVRISP-MKII/AVRISP-MKII.h
Projects/AVRISP-MKII/AVRISP-MKII.txt
Projects/AVRISP-MKII/AVRISPDescriptors.c
Projects/AVRISP-MKII/AVRISPDescriptors.h
Projects/AVRISP-MKII/Config/AppConfig.h
Projects/AVRISP-MKII/Config/LUFAConfig.h
Projects/XPLAINBridge/Config/AppConfig.h
Projects/XPLAINBridge/Config/LUFAConfig.h
Projects/XPLAINBridge/USARTDescriptors.c
Projects/XPLAINBridge/USARTDescriptors.h
Projects/XPLAINBridge/XPLAINBridge.c
Projects/XPLAINBridge/XPLAINBridge.h
Projects/XPLAINBridge/XPLAINBridge.txt

index 502d765..f8099a8 100644 (file)
@@ -152,15 +152,13 @@ void AVRISP_Task(void)
  *  \param[in]  wValue                 Descriptor type and index to retrieve
  *  \param[in]  wIndex                 Sub-index to retrieve (such as a localized string language)
  *  \param[out] DescriptorAddress      Address of the retrieved descriptor
- *  \param[out] DescriptorMemorySpace  Memory space that the descriptor is stored in
  *
  *  \return Length of the retrieved descriptor in bytes, or NO_DESCRIPTOR if the descriptor was not found
  */
 uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
                                     const uint16_t wIndex,
-                                    const void** const DescriptorAddress,
-                                    uint8_t* DescriptorMemorySpace)
+                                    const void** const DescriptorAddress)
 {
-       return AVRISP_GetDescriptor(wValue, wIndex, DescriptorAddress, DescriptorMemorySpace);
+       return AVRISP_GetDescriptor(wValue, wIndex, DescriptorAddress);
 }
 
index f1ea645..1f3c228 100644 (file)
@@ -83,9 +83,8 @@
 
                uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
                                                    const uint16_t wIndex,
-                                                   const void** const DescriptorAddress,
-                                                   uint8_t* const DescriptorMemorySpace)
-                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3) ATTR_NON_NULL_PTR_ARG(4);
+                                                   const void** const DescriptorAddress)
+                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
 
index 1ac602b..1975f46 100644 (file)
  *
  *  \section Sec_Description Project Description
  *
- *  Firmware for an Atmel Studio/AVR Studio compatible AVRISP-MKII clone programmer. This project will enable the USB
+ *  Firmware for an Atmel Studio compatible AVRISP-MKII clone programmer. This project will enable the USB
  *  AVR series of microcontrollers to act as a clone of the official Atmel AVRISP-MKII programmer, usable within
- *  Atmel Studio/AVR Studio or with any software capable of driving a real Atmel AVRISP-MKII programmer. In its most
- *  basic form, it allows for the programming of AVR TINY, MEGA and XMEGA devices aat the programmer's VCC voltage from
- *  within Atmel Studio/AVR Studio with no special hardware other than the USB AVR and the parts needed for the USB
+ *  Atmel Studio or with any software capable of driving a real Atmel AVRISP-MKII programmer. In its most
+ *  basic form, it allows for the programming of AVR TINY, MEGA and XMEGA devices at the programmer's VCC voltage from
+ *  within Atmel Studio with no special hardware other than the USB AVR and the parts needed for the USB
  *  interface. If the user desires, more advanced circuits incorporating level conversion can be made to allow for the
  *  programming of target AVRs running at a different voltage to the programmer.
  *
  *  This device spoofs Atmel's official AVRISP-MKII device PID so that it remains compatible with Atmel's AVRISP-MKII
- *  drivers. When prompted, direct your OS to install Atmel's AVRISP-MKII drivers provided with Atmel Studio/AVR Studio.
+ *  drivers. It is currently tested working under the following configurations:
+ *
+ *    - <b>Windows:</b> Atmel Studio 7, with alternative driver
+ *    - <b>Windows:</b> AVRDUDE 6.2, with alternative driver
+ *    - <b>Linux:</b> AVRDUDE 6.1
+ *
+ *  <b>Note that this clone requires an alternative driver under Windows,</b> due to an incompatible change in the official
+ *  Jungo based driver. The alternative driver given here will function with both real and clone AVRISP devices in Atmel
+ *  Studio 7 onwards under Windows - and as a bonus, also provides AVRDude access to the programmer.
  *
  *  Note that this design currently has the following limitations:
  *    - No reversed/shorted target connector detection and notification
  *
  *  \section Sec_KnownIssues Known Issues:
  *
- *  \par Incompatible with newer AVRDUDE releases.
- *  Due to <a href="http://savannah.nongnu.org/bugs/index.php?40831">a change in 6.0.1 and never AVRDUDE releases</a>,
- *  these builds are incompatible with the AVRISP-MKII clone project. Use an older 5.x release until AVRDUDE is patched.
- *
  *  \par XMEGA EEPROM programming fails in some cases.
  *  Several users have reported that XMEGA EEPROM programming fails unless the chip is erased first. If a non-blank EEPROM
  *  is present, writing further EEPROM data causes corruption.
  *  <a href="https://github.com/abcminiuser/lufa/issues/25">LUFA issue tracker entry</a>.
  *
- *  \par Does not work with Atmel Studio 6.2 or newer in some cases.
- *  If the libUSB filter driver is used to bind both libUSB and Jungo drivers to the clone device at the same time, it will
- *  no longer work in Atmel Studio 6.2 and newer. This is due to a change in the latter; Atmel Studio now supports both
- *  drivers for various tools, but while the libUSB driver is given preference the inner workings of Atmel Studio cannot
- *  communicate with the AVR-ISP MKII with libUSB (this is true for the genuine tool also). Uninstall the filter driver and
- *  install only the standard libUSB driver, or Jungo driver. The \c RESET_TOGGLES_LIBUSB_COMPAT compile option (detailed
- *  below) is a suitable workaround to this issue.
- *
  *  \section Sec_Installation Installation
  *  The programmer supports multiple platforms, both Windows and Linux.
  *
  *  is compatible with the free open source AVRDude programming software project.
  *
  *  \subsection SSec_WindowsInstallation Windows Installation
- *  On Windows systems, due to an unfortunate limitation of the USB AVR devices and the driver used in the official AVR
- *  Studio/Atmel Studio platform, the programmer cannot be made compatible with AVRDude and AVR Studio/Atmel Studio at the
- *  same time. Instead, the programmer will be compatible with the official Atmel software by default, with a recompilation
- *  with the \c LIBUSB_DRIVER_COMPAT token (see \ref Sec_Options) being required to use the alternative libUSB driver
- *  compatibility mode that will allow the programmer to work under AVRDude on Windows.
- *
- *  If compiled for Atmel Studio/AVR Studio compatibility, install the Jungo device drivers that ship with the Atmel software.
- *  If compiled in the alternative libUSB compatibility mode for AVRDude use, install the libUSB drivers that are included
- *  with your compiled copy of AVRDude, or create them using the libUSB-Win32 (http://sourceforge.net/projects/libusb-win32)
- *  project.
- *
- *  For convenience, the programmer will report two different serial numbers depending on the firmware compatibility mode, so
- *  that the correct driver can be installed for the matching firmware. If the \c RESET_TOGGLES_LIBUSB_COMPAT compile option
- *  is used (see \ref Sec_Options) this allows for an easy way to automatically switch device drivers along with the firmware
- *  compatibility mode. The serials are:
- *
- *  <table>
- *   <tr>
- *    <th><b>Serial Number:</b></th>
- *    <th><b>Compatibility Mode:</b></th>
- *   </tr>
- *   <tr>
- *    <td>000200012345</td>
- *    <td>Jungo (Atmel Studio) Compatibility</td>
- *   </tr>
- *   <tr>
- *    <td>000200112345</td>
- *    <td>libUSB Compatibility</td>
- *   </tr>
- *  </table>
+ *  On Windows systems, due to an unfortunate limitation of the USB AVR devices and the Atmel Studio platform, the programmer
+ *  requires an alternative libUSB based driver. Uninstall the existing Jungo driver for the device (if installed) and replace
+ *  it with the driver that ships with this project, to enable access to the programmer in Atmel Studio and AVRDUDE.
  *
  *  \section Sec_ISP ISP Connections
  *  Connections to the device for SPI programming (when enabled):
  *        \n \n <i>Ignored when compiled for targets lacking an ADC, or when NO_VTARGET_DETECT is defined.</i></td>
  *   </tr>
  *   <tr>
- *    <td>LIBUSB_DRIVER_COMPAT</td>
- *    <td>AppConfig.h</td>
- *    <td>Define to switch to a non-standard endpoint scheme, breaking compatibility with Atmel Studio/AVR Studio under Windows but
- *        making the code compatible with software such as avrdude (all platforms) that use the libUSB driver.
- *
- *        \note This option is incompatible with \c RESET_TOGGLES_LIBUSB_COMPAT.</td>
- *   </tr>
- *   <tr>
- *    <td>RESET_TOGGLES_LIBUSB_COMPAT</td>
- *    <td>AppConfig.h</td>
- *    <td>Define to make the /RESET line of the AVR toggle between Jungo and libUSB driver compatibility modes. Each time the AVR is
- *        reset externally via the reset pin, the compatibility mode will be toggled. The compatibility mode is preserved between
- *        power cycles and is not toggled via other forms of reset such as Watchdog or Brown Out.
- *
- *        When this option is enabled, all board LEDs will flash twice on startup for Jungo compatibility mode, and five times for
- *        libUSB compatibility mode.
- *
- *        \note This option is incompatible with \c LIBUSB_DRIVER_COMPAT.</td>
- *   </tr>
- *   <tr>
  *    <td>XCK_RESCUE_CLOCK_ENABLE</td>
  *    <td>AppConfig.h</td>
  *    <td>Define to move the ISP rescue clock to the AVR's XCK pin instead of the OCR1A output pin. This is useful for existing programming
index cb18a82..58a9207 100644 (file)
 
 #include "AVRISPDescriptors.h"
 
-#if defined(RESET_TOGGLES_LIBUSB_COMPAT) || defined(__DOXYGEN__)
-       /** Indicates if an external reset has occurred and the compatibility mode needs to be altered */
-       static bool AVRISP_NeedCompatibilitySwitch ATTR_NO_INIT;
-
-       /** Current AVRISP data IN endpoint address. */
-       uint8_t AVRISP_CurrDataINEndpointAddress;
-
-       /** Saved AVRISP data IN endpoint address in EEPROM. */
-       uint8_t AVRISP_CurrDataINEndpointAddress_EEPROM EEMEM;
-#endif
-
 /** Device descriptor structure. This descriptor, located in FLASH memory, describes the overall
  *  device characteristics, including the supported USB version, control endpoint size and the
  *  number of device configurations. The descriptor is read out by the USB host when the enumeration
@@ -80,7 +69,7 @@ const USB_Descriptor_Device_t PROGMEM AVRISP_DeviceDescriptor =
  *  and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting
  *  a configuration so that the host may correctly communicate with the USB device.
  */
-AVRISP_USB_Descriptor_Configuration_t AVRISP_ConfigurationDescriptor =
+const AVRISP_USB_Descriptor_Configuration_t PROGMEM AVRISP_ConfigurationDescriptor =
 {
        .Config =
                {
@@ -117,11 +106,7 @@ AVRISP_USB_Descriptor_Configuration_t AVRISP_ConfigurationDescriptor =
                {
                        .Header                 = {.Size = sizeof(USB_Descriptor_Endpoint_t), .Type = DTYPE_Endpoint},
 
-#if defined(RESET_TOGGLES_LIBUSB_COMPAT)
-                       .EndpointAddress        = 0,
-#else
                        .EndpointAddress        = AVRISP_DATA_IN_EPADDR,
-#endif
                        .Attributes             = (EP_TYPE_BULK | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA),
                        .EndpointSize           = AVRISP_DATA_EPSIZE,
                        .PollingIntervalMS      = 0x0A
@@ -159,7 +144,7 @@ const USB_Descriptor_String_t PROGMEM AVRISP_ProductString = USB_STRING_DESCRIPT
 /** Serial number string. This is a Unicode string containing the device's unique serial number, expressed as a
  *  series of uppercase hexadecimal digits.
  */
-USB_Descriptor_String_t AVRISP_SerialString = USB_STRING_DESCRIPTOR(L"000200012345\0"
+const USB_Descriptor_String_t PROGMEM AVRISP_SerialString = USB_STRING_DESCRIPTOR(L"000200012345\0"
     // Note: Real AVRISP-MKII has the embedded NUL byte, bug in firmware?
 );
 
@@ -171,8 +156,7 @@ USB_Descriptor_String_t AVRISP_SerialString = USB_STRING_DESCRIPTOR(L"0002000123
  */
 uint16_t AVRISP_GetDescriptor(const uint16_t wValue,
                               const uint16_t wIndex,
-                              const void** const DescriptorAddress,
-                              uint8_t* DescriptorMemorySpace)
+                              const void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
@@ -180,8 +164,6 @@ uint16_t AVRISP_GetDescriptor(const uint16_t wValue,
        const void* Address = NULL;
        uint16_t    Size    = NO_DESCRIPTOR;
 
-       *DescriptorMemorySpace = MEMSPACE_FLASH;
-
        switch (DescriptorType)
        {
                case DTYPE_Device:
@@ -189,12 +171,6 @@ uint16_t AVRISP_GetDescriptor(const uint16_t wValue,
                        Size    = sizeof(USB_Descriptor_Device_t);
                        break;
                case DTYPE_Configuration:
-                       *DescriptorMemorySpace = MEMSPACE_RAM;
-                       #if defined(RESET_TOGGLES_LIBUSB_COMPAT)
-                               /* Update the configuration descriptor with the current endpoint address */
-                               AVRISP_ConfigurationDescriptor.AVRISP_DataInEndpoint.EndpointAddress = AVRISP_CurrDataINEndpointAddress;
-                       #endif
-
                        Address = &AVRISP_ConfigurationDescriptor;
                        Size    = sizeof(AVRISP_USB_Descriptor_Configuration_t);
                        break;
@@ -216,11 +192,6 @@ uint16_t AVRISP_GetDescriptor(const uint16_t wValue,
                                case AVRISP_STRING_ID_Serial:
                                        Address = &AVRISP_SerialString;
                                        Size    = AVRISP_SerialString.Header.Size;
-
-                                       /* Update serial number to have a different serial based on the current endpoint address */
-                                       ((uint16_t*)&AVRISP_SerialString.UnicodeString)[6] = cpu_to_le16('0' + (AVRISP_DATA_IN_EPADDR & ENDPOINT_EPNUM_MASK));
-
-                                       *DescriptorMemorySpace = MEMSPACE_RAM;
                                        break;
                        }
 
@@ -230,73 +201,3 @@ uint16_t AVRISP_GetDescriptor(const uint16_t wValue,
        *DescriptorAddress = Address;
        return Size;
 }
-
-#if defined(RESET_TOGGLES_LIBUSB_COMPAT) || defined(__DOXYGEN__)
-/** Checks the state of the system status register MCUSR and indicates via a flag if
- *  the current AVRISP driver compatibility mode needs to be reset.
- *
- *  When the \c RESET_TOGGLES_LIBUSB_COMPAT compile time option is enabled, pulling
- *  the reset line of the AVR low will toggle between Jungo and libUSB compatibility
- *  modes. Other forms of reset (such as power on or watchdog) will not force a mode
- *  change.
- */
-void CheckExternalReset(void)
-{
-       /* If an external reset occurred, we need to change compatibility mode */
-       AVRISP_NeedCompatibilitySwitch = (MCUSR == (1 << EXTRF));
-
-       MCUSR = 0;
-}
-
-/** Updates the device descriptors so that the correct compatibility mode is used
- *  when the \c RESET_TOGGLES_LIBUSB_COMPAT compile time option is enabled. This
- *  configures the programmer for either Jungo or libUSB driver compatibility. Each
- *  time the AVR is reset via pulling the reset line low the compatibility mode will
- *  be toggled. The current mode is stored in EEPROM and preserved through power
- *  cycles of the AVR.
- */
-void UpdateCurrentCompatibilityMode(void)
-{
-       /* Load the current IN endpoint address stored in EEPROM */
-       AVRISP_CurrDataINEndpointAddress = eeprom_read_byte(&AVRISP_CurrDataINEndpointAddress_EEPROM);
-
-       /* Check if we need to switch compatibility modes */
-       if (AVRISP_NeedCompatibilitySwitch)
-       {
-               /* Toggle between compatibility modes */
-               AVRISP_CurrDataINEndpointAddress = (AVRISP_CurrDataINEndpointAddress == AVRISP_DATA_IN_EPADDR_LIBUSB) ?
-                               AVRISP_DATA_IN_EPADDR_JUNGO : AVRISP_DATA_IN_EPADDR_LIBUSB;
-
-               /* Save the new mode into EEPROM */
-               eeprom_update_byte(&AVRISP_CurrDataINEndpointAddress_EEPROM, AVRISP_CurrDataINEndpointAddress);
-       }
-
-       LEDs_SetAllLEDs(LEDS_NO_LEDS);
-
-       /* Validate IN endpoint address and indicate current mode via LED flashes */
-       switch (AVRISP_CurrDataINEndpointAddress)
-       {
-               default:
-                       /* Default to Jungo compatibility mode if saved EEPROM is invalid */
-                       AVRISP_CurrDataINEndpointAddress = AVRISP_DATA_IN_EPADDR_JUNGO;
-               case AVRISP_DATA_IN_EPADDR_JUNGO:
-                       /* Two flashes for Jungo compatibility mode */
-                       for (uint8_t i = 0; i < 4; i++)
-                       {
-                               LEDs_ToggleLEDs(LEDS_ALL_LEDS);
-                               Delay_MS(100);
-                       }
-                       break;
-               case AVRISP_DATA_IN_EPADDR_LIBUSB:
-                       /* Five flashes for libUSB compatibility mode */
-                       for (uint8_t i = 0; i < 10; i++)
-                       {
-                               LEDs_ToggleLEDs(LEDS_ALL_LEDS);
-                               Delay_MS(100);
-                       }
-                       break;
-       }
-
-       Delay_MS(500);
-}
-#endif
index e80f6ad..04ff20a 100644 (file)
 
                #include "Config/AppConfig.h"
 
-       /* Preprocessor Checks: */
-               #if defined(LIBUSB_DRIVER_COMPAT) && defined(RESET_TOGGLES_LIBUSB_COMPAT)
-                       #error LIBUSB_DRIVER_COMPAT and RESET_TOGGLES_LIBUSB_COMPAT are mutually exclusive.
-               #endif
-
        /* Macros: */
                /** Endpoint address of the AVRISP data OUT endpoint. */
                #define AVRISP_DATA_OUT_EPADDR         (ENDPOINT_DIR_OUT | 2)
 
-               /** Endpoint address of the AVRISP data IN endpoint, when in Jungo driver compatibility mode. */
-               #define AVRISP_DATA_IN_EPADDR_JUNGO    (ENDPOINT_DIR_IN  | 2)
-
-               /** Endpoint address of the AVRISP data IN endpoint, when in LibUSB driver compatibility mode. */
-               #define AVRISP_DATA_IN_EPADDR_LIBUSB   (ENDPOINT_DIR_IN  | 3)
-
-               #if defined(RESET_TOGGLES_LIBUSB_COMPAT)
-                       #define AVRISP_DATA_IN_EPADDR      AVRISP_CurrDataINEndpointAddress
-               #elif defined(LIBUSB_DRIVER_COMPAT)
-                       #define AVRISP_DATA_IN_EPADDR      AVRISP_DATA_IN_EPADDR_LIBUSB
-               #else
-                       /** Endpoint address of the AVRISP data IN endpoint. */
-                       #define AVRISP_DATA_IN_EPADDR      AVRISP_DATA_IN_EPADDR_JUNGO
-               #endif
+               /** Endpoint address of the AVRISP data IN endpoint. */
+               #define AVRISP_DATA_IN_EPADDR          (ENDPOINT_DIR_IN  | 2)
 
                /** Size in bytes of the AVRISP data endpoint. */
                #define AVRISP_DATA_EPSIZE             64
                        AVRISP_STRING_ID_Serial       = 3, /**< Serial number string ID */
                };
 
-       /* External Variables: */
-               #if defined(RESET_TOGGLES_LIBUSB_COMPAT)
-                       extern uint8_t AVRISP_CurrDataINEndpointAddress;
-               #endif
-
        /* Function Prototypes: */
                uint16_t AVRISP_GetDescriptor(const uint16_t wValue,
                                              const uint16_t wIndex,
-                                             const void** const DescriptorAddress,
-                                             uint8_t* const DescriptorMemorySpace)
-                                             ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3) ATTR_NON_NULL_PTR_ARG(4);
-
-               #if defined(RESET_TOGGLES_LIBUSB_COMPAT)
-               void CheckExternalReset(void) ATTR_NAKED ATTR_INIT_SECTION(3);
-               void UpdateCurrentCompatibilityMode(void);
-               #endif
+                                             const void** const DescriptorAddress)
+                                             ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
 
index a53605a..ee3b94b 100644 (file)
        #define VTARGET_REF_VOLTS          5
        #define VTARGET_SCALE_FACTOR       1
 //     #define VTARGET_USE_INTERNAL_REF
-//     #define NO_VTARGET_DETECT
+       #define NO_VTARGET_DETECT
 //     #define XCK_RESCUE_CLOCK_ENABLE
 //     #define INVERTED_ISP_MISO
 
-//     #define LIBUSB_DRIVER_COMPAT
-//     #define RESET_TOGGLES_LIBUSB_COMPAT
 //     #define FIRMWARE_VERSION_MINOR     0x11
 
 #endif
index 9c0d74d..8da61fc 100644 (file)
@@ -67,7 +67,7 @@
 
                /* USB Device Mode Driver Related Tokens: */
 //             #define USE_RAM_DESCRIPTORS
-//             #define USE_FLASH_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
 //             #define USE_EEPROM_DESCRIPTORS
                #define NO_INTERNAL_SERIAL
                #define FIXED_CONTROL_ENDPOINT_SIZE      16
index 8682696..ec4fbf9 100644 (file)
@@ -59,8 +59,6 @@
 //     #define XCK_RESCUE_CLOCK_ENABLE
 //     #define INVERTED_ISP_MISO
 
-//     #define LIBUSB_DRIVER_COMPAT
-//     #define RESET_TOGGLES_LIBUSB_COMPAT
 //     #define FIRMWARE_VERSION_MINOR     0x11
 
 #endif
index c069717..ee7bb40 100644 (file)
@@ -67,7 +67,7 @@
 
                /* USB Device Mode Driver Related Tokens: */
 //             #define USE_RAM_DESCRIPTORS
-//             #define USE_FLASH_DESCRIPTORS
+               #define USE_FLASH_DESCRIPTORS
 //             #define USE_EEPROM_DESCRIPTORS
 //             #define NO_INTERNAL_SERIAL
                #define FIXED_CONTROL_ENDPOINT_SIZE      16
index 4bbb2c4..76da7c2 100644 (file)
@@ -198,8 +198,7 @@ const USB_Descriptor_String_t PROGMEM USART_ProductString = USB_STRING_DESCRIPTO
  */
 uint16_t USART_GetDescriptor(const uint16_t wValue,
                              const uint16_t wIndex,
-                             const void** const DescriptorAddress,
-                             uint8_t* const DescriptorMemorySpace)
+                             const void** const DescriptorAddress)
 {
        const uint8_t  DescriptorType   = (wValue >> 8);
        const uint8_t  DescriptorNumber = (wValue & 0xFF);
@@ -207,8 +206,6 @@ uint16_t USART_GetDescriptor(const uint16_t wValue,
        const void* Address = NULL;
        uint16_t    Size    = NO_DESCRIPTOR;
 
-       *DescriptorMemorySpace = MEMSPACE_FLASH;
-
        switch (DescriptorType)
        {
                case DTYPE_Device:
index 1eccdac..e44503d 100644 (file)
        /* Function Prototypes: */
                uint16_t USART_GetDescriptor(const uint16_t wValue,
                                             const uint16_t wIndex,
-                                            const void** const DescriptorAddress,
-                                            uint8_t* const DescriptorMemorySpace);
+                                            const void** const DescriptorAddress);
 
 #endif
 
index 5188e56..b5450c1 100644 (file)
@@ -276,19 +276,17 @@ void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCI
  *  \param[in]  wValue                 Descriptor type and index to retrieve
  *  \param[in]  wIndex                 Sub-index to retrieve (such as a localized string language)
  *  \param[out] DescriptorAddress      Address of the retrieved descriptor
- *  \param[out] DescriptorMemorySpace  Memory space that the descriptor is stored in
  *
  *  \return Length of the retrieved descriptor in bytes, or NO_DESCRIPTOR if the descriptor was not found
  */
 uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
                                     const uint16_t wIndex,
-                                    const void** const DescriptorAddress,
-                                           uint8_t* const DescriptorMemorySpace)
+                                    const void** const DescriptorAddress)
 {
        /* Return the correct descriptors based on the selected mode */
        if (CurrentFirmwareMode == MODE_USART_BRIDGE)
-         return USART_GetDescriptor(wValue, wIndex, DescriptorAddress, DescriptorMemorySpace);
+         return USART_GetDescriptor(wValue, wIndex, DescriptorAddress);
        else
-         return AVRISP_GetDescriptor(wValue, wIndex, DescriptorAddress, DescriptorMemorySpace);
+         return AVRISP_GetDescriptor(wValue, wIndex, DescriptorAddress);
 }
 
index 302ee86..79858b2 100644 (file)
@@ -96,9 +96,8 @@
 
                uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
                                                    const uint16_t wIndex,
-                                                   const void** const DescriptorAddress,
-                                                   uint8_t* const DescriptorMemorySpace)
-                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3) ATTR_NON_NULL_PTR_ARG(4);
+                                                   const void** const DescriptorAddress)
+                                                   ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
 
 #endif
 
index 45557ef..0cf59a6 100644 (file)
  *    <th><b>Description:</b></th>
  *   </tr>
  *   <tr>
- *    <td>LIBUSB_DRIVER_COMPAT</td>
- *    <td>AppConfig.h</td>
- *    <td>Define to switch to a non-standard endpoint scheme, breaking compatibility with AVRStudio under Windows but making
- *        the code compatible with software such as avrdude (all platforms) that use the libUSB driver.
- *
- *        \note This option is incompatible with \c RESET_TOGGLES_LIBUSB_COMPAT.</td>
- *   </tr>
- *   <tr>
- *    <td>RESET_TOGGLES_LIBUSB_COMPAT</td>
- *    <td>Makefile LUFA_OPTS</td>
- *    <td>Define to make the /RESET line of the AVR toggle between Jungo and libUSB driver compatibility modes. Each time the AVR is
- *        reset externally via the reset pin, the compatibility mode will be toggled. The compatibility mode is preserved between
- *        power cycles and is not toggled via other forms of reset such as Watchdog or Brown Out.
- *
- *        When this option is enabled, all board LEDs will flash twice on startup for Jungo compatibility mode, and five times for
- *        libUSB compatibility mode.
- *
- *        \note This option is incompatible with \c LIBUSB_DRIVER_COMPAT.</td>
- *   </tr>
- *   <tr>
  *    <td>FIRMWARE_VERSION_MINOR</td>
  *    <td>AppConfig.h</td>
  *    <td>Define to set the minor firmware revision nunber reported to the host on request. By default this will use a firmware version compatible