Merge branch 'master' of github.com:abcminiuser/lufa
authorDean Camera <dean@fourwalledcubicle.com>
Sun, 27 Oct 2013 17:25:30 +0000 (18:25 +0100)
committerDean Camera <dean@fourwalledcubicle.com>
Sun, 27 Oct 2013 17:25:30 +0000 (18:25 +0100)
LUFA/Build/lufa_hid.mk
LUFA/Drivers/USB/Class/Common/AudioClassCommon.h
LUFA/Drivers/USB/Class/Common/CDCClassCommon.h
Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c

index a5a742d..6755e3f 100644 (file)
@@ -9,9 +9,9 @@
 LUFA_BUILD_MODULES         += HID
 LUFA_BUILD_TARGETS         += hid hid-ee teensy teensy-ee
 LUFA_BUILD_MANDATORY_VARS  += MCU TARGET
-LUFA_BUILD_OPTIONAL_VARS   += 
-LUFA_BUILD_PROVIDED_VARS   += 
-LUFA_BUILD_PROVIDED_MACROS += 
+LUFA_BUILD_OPTIONAL_VARS   +=
+LUFA_BUILD_PROVIDED_VARS   +=
+LUFA_BUILD_PROVIDED_MACROS +=
 
 # -----------------------------------------------------------------------------
 #               LUFA HID Bootloader Buildsystem Makefile Module.
@@ -76,7 +76,7 @@ hid-ee: $(TARGET).eep $(MAKEFILE_LIST)
        @echo $(MSG_OBJCPY_CMD) Converting \"$<\" to a binary file \"InputEEData.bin\"
        avr-objcopy -I ihex -O binary $< $(patsubst %/,%,$(LUFA_PATH))/Build/HID_EEPROM_Loader/InputEEData.bin
        @echo $(MSG_MAKE_CMD) Making EEPROM loader application for \"$<\"
-       make -C $(patsubst %/,%,$(LUFA_PATH))/Build/HID_EEPROM_Loader/ MCU=$(MCU) clean hid
+       $(MAKE) -C $(patsubst %/,%,$(LUFA_PATH))/Build/HID_EEPROM_Loader/ MCU=$(MCU) clean hid
 
 # Programs in the target FLASH memory using the TEENSY_BOOTLOADER_CLI tool
 teensy: $(TARGET).hex $(MAKEFILE_LIST)
@@ -88,7 +88,7 @@ teensy-ee: $(TARGET).hex $(MAKEFILE_LIST)
        @echo $(MSG_OBJCPY_CMD) Converting \"$<\" to a binary file \"InputEEData.bin\"
        avr-objcopy -I ihex -O binary $< $(patsubst %/,%,$(LUFA_PATH))/Build/HID_EEPROM_Loader/InputEEData.bin
        @echo $(MSG_MAKE_CMD) Making EEPROM loader application for \"$<\"
-       make -s -C $(patsubst %/,%,$(LUFA_PATH))/Build/HID_EEPROM_Loader/ MCU=$(MCU) clean hid-teensy
-       
+       $(MAKE) -s -C $(patsubst %/,%,$(LUFA_PATH))/Build/HID_EEPROM_Loader/ MCU=$(MCU) clean hid-teensy
+
 # Phony build targets for this module
 .PHONY: hid hid-ee teensy teensy-ee
index 6e40873..bd74ded 100644 (file)
 
                /** \brief 24-Bit Audio Frequency Structure.
                 *
-                *  Type define for a 24bit audio sample frequency structure. As GCC does not contain a built in 24-bit datatype,
+                *  Type define for a 24-bit audio sample frequency structure. As GCC does not contain a built in 24-bit datatype,
                 *  this this structure is used to build up the value instead. Fill this structure with the \ref AUDIO_SAMPLE_FREQ() macro.
                 *
                 *  \note Regardless of CPU architecture, these values should be stored as little endian.
index 5f451b0..5a862f2 100644 (file)
                                                          *   must be \ref CDC_DSUBTYPE_CSInterface_ACM.
                                                          */
                        uint8_t                 Capabilities; /**< Capabilities of the ACM interface, given as a bit mask. For most devices,
-                                                              *   this should be set to a fixed value of 0x06 - for other capabilities, refer
+                                                              *   this should be set to a fixed value of \c 0x06 - for other capabilities, refer
                                                               *   to the CDC ACM specification.
                                                               */
                } ATTR_PACKED USB_CDC_Descriptor_FunctionalACM_t;
index 06a4f72..43c540e 100644 (file)
@@ -240,9 +240,12 @@ bool XMEGANVM_ReadMemory(const uint32_t ReadAddress,
        XPROGTarget_SendByte(PDI_CMD_ST | (PDI_POINTER_DIRECT << 2) | PDI_DATSIZE_4BYTES);
        XMEGANVM_SendAddress(ReadAddress);
 
-       /* Send the REPEAT command with the specified number of bytes to read */
-       XPROGTarget_SendByte(PDI_CMD_REPEAT | PDI_DATSIZE_1BYTE);
-       XPROGTarget_SendByte(ReadSize - 1);
+       if (ReadSize > 1)
+       {
+               /* Send the REPEAT command with the specified number of bytes to read */
+               XPROGTarget_SendByte(PDI_CMD_REPEAT | PDI_DATSIZE_1BYTE);
+               XPROGTarget_SendByte(ReadSize - 1);
+       }
 
        /* Send a LD command with indirect access and post-increment to read out the bytes */
        XPROGTarget_SendByte(PDI_CMD_LD | (PDI_POINTER_INDIRECT_PI << 2) | PDI_DATSIZE_1BYTE);