Merge pull request #16 from hansmi/master

AVR8: Add option to keep 3.3V regulator enabled.
pull/1469/head
Dean Camera 11 years ago
commit 9965b2ca0a

@ -11,6 +11,7 @@
* - Library Applications: * - Library Applications:
* - Added new Bulk Vendor low level device demo * - Added new Bulk Vendor low level device demo
* - Added new libUSB host Python and NodeJS application examples for the class driver GenericHID demo (thanks to Laszlo Monda) * - Added new libUSB host Python and NodeJS application examples for the class driver GenericHID demo (thanks to Laszlo Monda)
* - Added new AVR8 USB option to keep 3.3V regulator enabled
* *
* <b>Changed:</b> * <b>Changed:</b>
* - Library Applications: * - Library Applications:

@ -112,6 +112,7 @@ void USB_Disable(void)
if (!(USB_Options & USB_OPT_MANUAL_PLL)) if (!(USB_Options & USB_OPT_MANUAL_PLL))
USB_PLL_Off(); USB_PLL_Off();
if (!(USB_Options & USB_OPT_REG_KEEP_ENABLED))
USB_REG_Off(); USB_REG_Off();
#if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR) #if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)

@ -133,6 +133,14 @@
*/ */
#define USB_OPT_REG_ENABLED (0 << 1) #define USB_OPT_REG_ENABLED (0 << 1)
/** Option mask for \ref USB_Init() to keep regulator enabled at all times. Indicates that \ref USB_Disable()
* should not disable the regulator as it would otherwise. Has no effect if regulator is disabled using
* \ref USB_OPT_REG_DISABLED.
*
* \note See USB AVR data sheet for more information on the internal pad regulator.
*/
#define USB_OPT_REG_KEEP_ENABLED (1 << 3)
/** Manual PLL control option mask for \ref USB_Init(). This indicates to the library that the user application /** Manual PLL control option mask for \ref USB_Init(). This indicates to the library that the user application
* will take full responsibility for controlling the AVR's PLL (used to generate the high frequency clock * will take full responsibility for controlling the AVR's PLL (used to generate the high frequency clock
* that the USB controller requires) and ensuring that it is locked at the correct frequency for USB operations. * that the USB controller requires) and ensuring that it is locked at the correct frequency for USB operations.

Loading…
Cancel
Save