aboutsummaryrefslogtreecommitdiff
path: root/LUFA/Drivers/USB/Core/AVR8
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-05-27 03:33:40 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2011-05-27 03:33:40 +0000
commitd62e9a7debc6ec46bc9391ab3ead969be257f7a9 (patch)
treee659843a1038393b9e7023c08665af3d7ec5603c /LUFA/Drivers/USB/Core/AVR8
parent01f728dc3d8f2f912583a893ed8f6f89c2bee36c (diff)
Merge over trunk changes to the 110528 BETA to form the 110528 release.
git-svn-id: http://lufa-lib.googlecode.com/svn/tags/LUFA-110528@1768 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Drivers/USB/Core/AVR8')
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h22
-rw-r--r--LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h5
2 files changed, 18 insertions, 9 deletions
diff --git a/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
index f88c2f1b..c98e17cd 100644
--- a/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
+++ b/LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
@@ -99,16 +99,22 @@
* On unsupported devices, this will evaluate to \ref NO_DESCRIPTOR and so will force the host to create a pseudo-serial
* number for the device.
*/
- #define USE_INTERNAL_SERIAL 0xDC
+ #define USE_INTERNAL_SERIAL 0xDC
/** Length of the device's unique internal serial number, in bits, if present on the selected microcontroller
* model.
*/
- #define INTERNAL_SERIAL_LENGTH_BITS 80
+ #define INTERNAL_SERIAL_LENGTH_BITS 80
+
+ /** Start address of the internal serial number, in the appropriate address space, if present on the selected microcontroller
+ * model.
+ */
+ #define INTERNAL_SERIAL_START_ADDRESS 0x0E
#else
- #define USE_INTERNAL_SERIAL NO_DESCRIPTOR
+ #define USE_INTERNAL_SERIAL NO_DESCRIPTOR
- #define INTERNAL_SERIAL_LENGTH_BITS 0
+ #define INTERNAL_SERIAL_LENGTH_BITS 0
+ #define INTERNAL_SERIAL_START_ADDRESS 0
#endif
/* Function Prototypes: */
@@ -198,12 +204,13 @@
return (UDADDR & (1 << ADDEN));
}
- static inline void USB_Device_GetSerialString(uint16_t* UnicodeString)
+ #if (USE_INTERNAL_SERIAL != NO_DESCRIPTOR)
+ static inline void USB_Device_GetSerialString(uint16_t* const UnicodeString)
{
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
- uint8_t SigReadAddress = 0x0E;
+ uint8_t SigReadAddress = INTERNAL_SERIAL_START_ADDRESS;
for (uint8_t SerialCharNum = 0; SerialCharNum < (INTERNAL_SERIAL_LENGTH_BITS / 4); SerialCharNum++)
{
@@ -223,7 +230,8 @@
SetGlobalInterruptMask(CurrentGlobalInt);
}
-
+ #endif
+
#endif
#endif
diff --git a/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h b/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h
index a6e0067e..6be41fd9 100644
--- a/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h
+++ b/LUFA/Drivers/USB/Core/AVR8/USBController_AVR8.h
@@ -119,14 +119,15 @@
/** \name USB Controller Option Masks */
//@{
/** Regulator disable option mask for \ref USB_Init(). This indicates that the internal 3.3V USB data pad
- * regulator should be enabled to regulate the data pin voltages to within the USB standard.
+ * regulator should be disabled and the AVR's VCC level used for the data pads.
*
* \note See USB AVR data sheet for more information on the internal pad regulator.
*/
#define USB_OPT_REG_DISABLED (1 << 1)
/** Regulator enable option mask for \ref USB_Init(). This indicates that the internal 3.3V USB data pad
- * regulator should be disabled and the AVR's VCC level used for the data pads.
+ * regulator should be enabled to regulate the data pin voltages from the VBUS level down to a level within
+ * the range allowable by the USB standard.
*
* \note See USB AVR data sheet for more information on the internal pad regulator.
*/