From 27f015ea00c0b4b94d46d0455bd9d7202cf46084 Mon Sep 17 00:00:00 2001 From: klaute Date: Wed, 17 Aug 2016 08:33:57 +0200 Subject: [PATCH] Function declaration fixed. Makefile is correct configured now. --- src/Descriptors.c | 2 +- src/Descriptors.h | 2 +- src/USB2SerialMux.c | 1 - src/makefile | 14 ++++++++++---- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/Descriptors.c b/src/Descriptors.c index 741e76b..612bcd6 100755 --- a/src/Descriptors.c +++ b/src/Descriptors.c @@ -315,7 +315,7 @@ const USB_Descriptor_String_t PROGMEM ProductString = USB_STRING_DESCRIPTOR(L"LU * USB host. */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, - const uint8_t wIndex, + const uint16_t wIndex, const void** const DescriptorAddress) { const uint8_t DescriptorType = (wValue >> 8); diff --git a/src/Descriptors.h b/src/Descriptors.h index c2649d0..bc96ef4 100755 --- a/src/Descriptors.h +++ b/src/Descriptors.h @@ -127,7 +127,7 @@ /* Function Prototypes: */ uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, - const uint8_t wIndex, + const uint16_t wIndex, const void** const DescriptorAddress) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3); diff --git a/src/USB2SerialMux.c b/src/USB2SerialMux.c index 341d99b..954748b 100755 --- a/src/USB2SerialMux.c +++ b/src/USB2SerialMux.c @@ -240,7 +240,6 @@ void CDC1_Task(void) // { // call(cmd) // } - } } //=========================================================================== diff --git a/src/makefile b/src/makefile index 4dbf09e..dec5d5f 100755 --- a/src/makefile +++ b/src/makefile @@ -13,19 +13,25 @@ MCU = atmega32u4 ARCH = AVR8 -BOARD = USBKEY -F_CPU = 16000000UL +#BOARD = USBKEY +F_CPU = 16000000 F_USB = $(F_CPU) OPTIMIZATION = s TARGET = USB2SerialMux -SRC = $(TARGET).c Descriptors.c $(LUFA_SRC_USB) uart/uart.c -LUFA_PATH = ../LUFA +SRC = $(TARGET).c Descriptors.c uart/uart.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) +LUFA_PATH = ../LUFA/LUFA CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -Iuart/ LD_FLAGS = +PROGRAMMER = dfu-programmer # Default target all: +program: + $(PROGRAMMER) $(MCU) erase + $(PROGRAMMER) $(MCU) flash $(TARGET).hex + $(PROGRAMMER) $(MCU) reset + # Include LUFA build script makefiles include $(LUFA_PATH)/Build/lufa_core.mk include $(LUFA_PATH)/Build/lufa_sources.mk