diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2016-01-02 17:22:18 +1100 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2016-01-02 17:22:18 +1100 |
commit | 25b2027544a69a31d11573631b21ff41a6e89784 (patch) | |
tree | 571716c9e6f524e89fb6f104c413f57425fd24f7 | |
parent | 2fcd50ada8e0916d1ed5addb2567b4bfcee8497c (diff) | |
parent | a86b502294ebda621fa8f3cce20a8238ea15eebc (diff) | |
download | lufa-25b2027544a69a31d11573631b21ff41a6e89784.tar.gz lufa-25b2027544a69a31d11573631b21ff41a6e89784.tar.bz2 lufa-25b2027544a69a31d11573631b21ff41a6e89784.zip |
Merge branch 'master' into dmbs
-rw-r--r-- | Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c | 9 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c | 2 | ||||
-rw-r--r-- | Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.c | 2 | ||||
-rw-r--r-- | Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.c | 2 | ||||
-rw-r--r-- | LUFA/DoxygenPages/ChangeLog.txt | 4 | ||||
-rw-r--r-- | LUFA/DoxygenPages/SoftwareBootloaderJump.txt | 2 | ||||
-rw-r--r-- | LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c | 4 | ||||
-rw-r--r-- | LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.c | 4 |
8 files changed, 20 insertions, 9 deletions
diff --git a/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c b/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c index cdee1c30c..b54f943b1 100644 --- a/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c +++ b/Bootloaders/HID/HostLoaderApp/hid_bootloader_cli.c @@ -921,15 +921,16 @@ void ihex_get_data(int addr, int len, unsigned char *bytes) int printf_verbose(const char *format, ...) { va_list ap; - int r; + int r = 0; va_start(ap, format); if (verbose) { r = vprintf(format, ap); fflush(stdout); - return r; } - return 0; + va_end(ap); + + return r; } void delay(double seconds) @@ -948,6 +949,8 @@ void die(const char *str, ...) va_start(ap, str); vfprintf(stderr, str, ap); fprintf(stderr, "\n"); + va_end(ap); + exit(1); } diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c index 57e71cb77..c9db1f0ee 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c +++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.c @@ -244,7 +244,7 @@ void DecodeUDPHeader(void* InDataStart) void DecodeDHCPHeader(void* InDataStart) { #if !defined(NO_DECODE_DHCP) - uint8_t* DHCPOptions = (InDataStart + sizeof(DHCP_Header_t)); + uint8_t* DHCPOptions = ((uint8_t*)InDataStart + sizeof(DHCP_Header_t)); printf_P(PSTR(" \\\r\n DHCP\r\n")); diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.c b/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.c index cc4e96132..e1d41ebde 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.c +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.c @@ -244,7 +244,7 @@ void DecodeUDPHeader(void* InDataStart) void DecodeDHCPHeader(void* InDataStart) { #if !defined(NO_DECODE_DHCP) - uint8_t* DHCPOptions = (InDataStart + sizeof(DHCP_Header_t)); + uint8_t* DHCPOptions = ((uint8_t*)InDataStart + sizeof(DHCP_Header_t)); printf_P(PSTR(" \\\r\n DHCP\r\n")); diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.c b/Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.c index 08ec74aa9..be13ce277 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.c +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/RNDIS.c @@ -380,7 +380,7 @@ static bool ProcessNDISSet(uint32_t OId, void* SetData, uint16_t SetSize) CurrPacketFilter = *((uint32_t*)SetData); /* Set the RNDIS state to initialized if the packet filter is non-zero */ - CurrRNDISState = ((CurrPacketFilter) ? RNDIS_Data_Initialized : RNDIS_Data_Initialized); + CurrRNDISState = ((CurrPacketFilter) ? RNDIS_Data_Initialized : RNDIS_Initialized); return true; case OID_802_3_MULTICAST_LIST: diff --git a/LUFA/DoxygenPages/ChangeLog.txt b/LUFA/DoxygenPages/ChangeLog.txt index eac7d429c..16102fb95 100644 --- a/LUFA/DoxygenPages/ChangeLog.txt +++ b/LUFA/DoxygenPages/ChangeLog.txt @@ -13,6 +13,10 @@ * parameter, instead of uint16_t (thanks to Matlo) * - Fixed broken USE_RAM_DESCRIPTORS compile time option when the FIXED_NUM_CONFIGURATIONS compile time option is not enabled * in a user application (thanks to Matlo) + * - Fixed missing \c va_end() calls in the HID bootloader CLI app which could cause portability issues + * - Fixed void pointer arithmetic in the \c Serial_SendData() functions for AVR8 and XMEGA architectures + * - Fixed void pointer arithmetic in the low level and class driver RNDIS demo protocol decoders + * - Fixed low level RNDIS demo incorrectly setting the RNDIS state when a null packet filter was requested * * \section Sec_ChangeLog151115 Version 151115 * <b>New:</b> diff --git a/LUFA/DoxygenPages/SoftwareBootloaderJump.txt b/LUFA/DoxygenPages/SoftwareBootloaderJump.txt index 0b69612b6..f8c2523d7 100644 --- a/LUFA/DoxygenPages/SoftwareBootloaderJump.txt +++ b/LUFA/DoxygenPages/SoftwareBootloaderJump.txt @@ -31,7 +31,7 @@ * * uint32_t Boot_Key ATTR_NO_INIT; * - * #define MAGIC_BOOT_KEY 0xDC42ACCA + * #define MAGIC_BOOT_KEY 0xBADCAFE5 * #define BOOTLOADER_START_ADDRESS ((FLASH_SIZE_BYTES - BOOTLOADER_SEC_SIZE_BYTES) >> 1) * * void Bootloader_Jump_Check(void) ATTR_INIT_SECTION(3); diff --git a/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c b/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c index 3df39814e..6680a6ba6 100644 --- a/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c +++ b/LUFA/Drivers/Peripheral/AVR8/Serial_AVR8.c @@ -88,8 +88,10 @@ void Serial_SendString(const char* StringPtr) void Serial_SendData(const void* Buffer, uint16_t Length) { + uint8_t* CurrByte = (uint8_t*)Buffer; + while (Length--) - Serial_SendByte(*((uint8_t*)Buffer++)); + Serial_SendByte(*(CurrByte++)); } void Serial_CreateStream(FILE* Stream) diff --git a/LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.c b/LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.c index f86bd9789..b7a39d3c2 100644 --- a/LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.c +++ b/LUFA/Drivers/Peripheral/XMEGA/Serial_XMEGA.c @@ -91,8 +91,10 @@ void Serial_SendData(USART_t* const USART, const void* Buffer, uint16_t Length) { + uint8_t* CurrByte = (uint8_t*)Buffer; + while (Length--) - Serial_SendByte(USART, *((uint8_t*)Buffer++)); + Serial_SendByte(USART, *(CurrByte++)); } void Serial_CreateStream(USART_t* USART, FILE* Stream) |