From 1d2369e9be57ceee8ba415655ce5f13d9ae8da84 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 7 Feb 2016 15:42:39 +1100 Subject: Remove legacy AVRISP-MKII clone compatibility compile options. --- Projects/AVRISP-MKII/AVRISP-MKII.c | 6 +- Projects/AVRISP-MKII/AVRISP-MKII.h | 5 +- Projects/AVRISP-MKII/AVRISP-MKII.txt | 83 +++++------------------ Projects/AVRISP-MKII/AVRISPDescriptors.c | 105 +----------------------------- Projects/AVRISP-MKII/AVRISPDescriptors.h | 36 ++-------- Projects/AVRISP-MKII/Config/AppConfig.h | 4 +- Projects/AVRISP-MKII/Config/LUFAConfig.h | 2 +- Projects/XPLAINBridge/Config/AppConfig.h | 2 - Projects/XPLAINBridge/Config/LUFAConfig.h | 2 +- Projects/XPLAINBridge/USARTDescriptors.c | 5 +- Projects/XPLAINBridge/USARTDescriptors.h | 3 +- Projects/XPLAINBridge/XPLAINBridge.c | 8 +-- Projects/XPLAINBridge/XPLAINBridge.h | 5 +- Projects/XPLAINBridge/XPLAINBridge.txt | 20 ------ 14 files changed, 37 insertions(+), 249 deletions(-) (limited to 'Projects') diff --git a/Projects/AVRISP-MKII/AVRISP-MKII.c b/Projects/AVRISP-MKII/AVRISP-MKII.c index 502d76504..f8099a898 100644 --- a/Projects/AVRISP-MKII/AVRISP-MKII.c +++ b/Projects/AVRISP-MKII/AVRISP-MKII.c @@ -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); } diff --git a/Projects/AVRISP-MKII/AVRISP-MKII.h b/Projects/AVRISP-MKII/AVRISP-MKII.h index f1ea64505..1f3c22823 100644 --- a/Projects/AVRISP-MKII/AVRISP-MKII.h +++ b/Projects/AVRISP-MKII/AVRISP-MKII.h @@ -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 diff --git a/Projects/AVRISP-MKII/AVRISP-MKII.txt b/Projects/AVRISP-MKII/AVRISP-MKII.txt index 1ac602bdf..1975f462f 100644 --- a/Projects/AVRISP-MKII/AVRISP-MKII.txt +++ b/Projects/AVRISP-MKII/AVRISP-MKII.txt @@ -44,16 +44,24 @@ * * \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: + * + * - Windows: Atmel Studio 7, with alternative driver + * - Windows: AVRDUDE 6.2, with alternative driver + * - Linux: AVRDUDE 6.1 + * + * Note that this clone requires an alternative driver under Windows, 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 @@ -69,23 +77,11 @@ * * \section Sec_KnownIssues Known Issues: * - * \par Incompatible with newer AVRDUDE releases. - * Due to a change in 6.0.1 and never AVRDUDE releases, - * 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. * LUFA issue tracker entry. * - * \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. * @@ -95,36 +91,9 @@ * 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: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
Serial Number:Compatibility Mode:
000200012345Jungo (Atmel Studio) Compatibility
000200112345libUSB Compatibility
+ * 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): @@ -351,26 +320,6 @@ * \n \n Ignored when compiled for targets lacking an ADC, or when NO_VTARGET_DETECT is defined. * * - * LIBUSB_DRIVER_COMPAT - * AppConfig.h - * 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. - * - * - * RESET_TOGGLES_LIBUSB_COMPAT - * AppConfig.h - * 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. - * - * * XCK_RESCUE_CLOCK_ENABLE * AppConfig.h * 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 diff --git a/Projects/AVRISP-MKII/AVRISPDescriptors.c b/Projects/AVRISP-MKII/AVRISPDescriptors.c index cb18a82c2..58a92078b 100644 --- a/Projects/AVRISP-MKII/AVRISPDescriptors.c +++ b/Projects/AVRISP-MKII/AVRISPDescriptors.c @@ -37,17 +37,6 @@ #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 diff --git a/Projects/AVRISP-MKII/AVRISPDescriptors.h b/Projects/AVRISP-MKII/AVRISPDescriptors.h index e80f6adae..04ff20a18 100644 --- a/Projects/AVRISP-MKII/AVRISPDescriptors.h +++ b/Projects/AVRISP-MKII/AVRISPDescriptors.h @@ -44,29 +44,12 @@ #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 @@ -107,22 +90,11 @@ 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 diff --git a/Projects/AVRISP-MKII/Config/AppConfig.h b/Projects/AVRISP-MKII/Config/AppConfig.h index a53605af2..ee3b94b49 100644 --- a/Projects/AVRISP-MKII/Config/AppConfig.h +++ b/Projects/AVRISP-MKII/Config/AppConfig.h @@ -59,12 +59,10 @@ #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 diff --git a/Projects/AVRISP-MKII/Config/LUFAConfig.h b/Projects/AVRISP-MKII/Config/LUFAConfig.h index 9c0d74dd9..8da61fcd2 100644 --- a/Projects/AVRISP-MKII/Config/LUFAConfig.h +++ b/Projects/AVRISP-MKII/Config/LUFAConfig.h @@ -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 diff --git a/Projects/XPLAINBridge/Config/AppConfig.h b/Projects/XPLAINBridge/Config/AppConfig.h index 8682696ba..ec4fbf929 100644 --- a/Projects/XPLAINBridge/Config/AppConfig.h +++ b/Projects/XPLAINBridge/Config/AppConfig.h @@ -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 diff --git a/Projects/XPLAINBridge/Config/LUFAConfig.h b/Projects/XPLAINBridge/Config/LUFAConfig.h index c069717fb..ee7bb4085 100644 --- a/Projects/XPLAINBridge/Config/LUFAConfig.h +++ b/Projects/XPLAINBridge/Config/LUFAConfig.h @@ -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 diff --git a/Projects/XPLAINBridge/USARTDescriptors.c b/Projects/XPLAINBridge/USARTDescriptors.c index 4bbb2c45a..76da7c22e 100644 --- a/Projects/XPLAINBridge/USARTDescriptors.c +++ b/Projects/XPLAINBridge/USARTDescriptors.c @@ -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: diff --git a/Projects/XPLAINBridge/USARTDescriptors.h b/Projects/XPLAINBridge/USARTDescriptors.h index 1eccdac99..e44503dfe 100644 --- a/Projects/XPLAINBridge/USARTDescriptors.h +++ b/Projects/XPLAINBridge/USARTDescriptors.h @@ -105,8 +105,7 @@ /* 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 diff --git a/Projects/XPLAINBridge/XPLAINBridge.c b/Projects/XPLAINBridge/XPLAINBridge.c index 5188e56ea..b5450c109 100644 --- a/Projects/XPLAINBridge/XPLAINBridge.c +++ b/Projects/XPLAINBridge/XPLAINBridge.c @@ -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); } diff --git a/Projects/XPLAINBridge/XPLAINBridge.h b/Projects/XPLAINBridge/XPLAINBridge.h index 302ee869f..79858b27d 100644 --- a/Projects/XPLAINBridge/XPLAINBridge.h +++ b/Projects/XPLAINBridge/XPLAINBridge.h @@ -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 diff --git a/Projects/XPLAINBridge/XPLAINBridge.txt b/Projects/XPLAINBridge/XPLAINBridge.txt index 45557ef97..0cf59a67d 100644 --- a/Projects/XPLAINBridge/XPLAINBridge.txt +++ b/Projects/XPLAINBridge/XPLAINBridge.txt @@ -79,26 +79,6 @@ * Description: * * - * LIBUSB_DRIVER_COMPAT - * AppConfig.h - * 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. - * - * - * RESET_TOGGLES_LIBUSB_COMPAT - * Makefile LUFA_OPTS - * 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. - * - * * FIRMWARE_VERSION_MINOR * AppConfig.h * Define to set the minor firmware revision nunber reported to the host on request. By default this will use a firmware version compatible -- cgit v1.2.3