From 417d34385c9568f04e4cbbf5cc2444981815fbe0 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Sun, 18 Feb 2018 17:49:50 +1100 Subject: Ensure USE_INTERNAL_SERIAL is set to NO_DESCRIPTOR if internal serial is disabled. --- LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h') diff --git a/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h b/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h index 526fae0c4..65b24a9ae 100644 --- a/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h +++ b/LUFA/Drivers/USB/Core/XMEGA/Device_XMEGA.h @@ -111,23 +111,24 @@ * number for the device. */ #ifndef USE_INTERNAL_SERIAL - #define USE_INTERNAL_SERIAL 0xDC + #define USE_INTERNAL_SERIAL 0xDC #endif /** Length of the device's unique internal serial number, in bits, if present on the selected microcontroller * model. */ - #define INTERNAL_SERIAL_LENGTH_BITS (8 * (1 + (offsetof(NVM_PROD_SIGNATURES_t, COORDY1) - offsetof(NVM_PROD_SIGNATURES_t, LOTNUM0)))) + #define INTERNAL_SERIAL_LENGTH_BITS (8 * (1 + (offsetof(NVM_PROD_SIGNATURES_t, COORDY1) - offsetof(NVM_PROD_SIGNATURES_t, LOTNUM0)))) /** Start address of the internal serial number, in the appropriate address space, if present on the selected microcontroller * model. */ - #define INTERNAL_SERIAL_START_ADDRESS offsetof(NVM_PROD_SIGNATURES_t, LOTNUM0) + #define INTERNAL_SERIAL_START_ADDRESS offsetof(NVM_PROD_SIGNATURES_t, LOTNUM0) #else - #define USE_INTERNAL_SERIAL NO_DESCRIPTOR + #undef USE_INTERNAL_SERIAL + #define USE_INTERNAL_SERIAL NO_DESCRIPTOR - #define INTERNAL_SERIAL_LENGTH_BITS 0 - #define INTERNAL_SERIAL_START_ADDRESS 0 + #define INTERNAL_SERIAL_LENGTH_BITS 0 + #define INTERNAL_SERIAL_START_ADDRESS 0 #endif /* Function Prototypes: */ -- cgit v1.2.3