USB manual PLL control
parent
f240bb24d1
commit
454619bfd4
|
|
@ -7,7 +7,7 @@
|
|||
#define FIXED_NUM_CONFIGURATIONS 1
|
||||
#define INTERRUPT_CONTROL_ENDPOINT
|
||||
#define USE_FLASH_DESCRIPTORS
|
||||
#define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)
|
||||
#define USE_STATIC_OPTIONS (USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_MANUAL_PLL)
|
||||
#define NO_INTERNAL_SERIAL
|
||||
#define NO_DEVICE_SELF_POWER
|
||||
#define NO_DEVICE_REMOTE_WAKEUP
|
||||
|
|
|
|||
|
|
@ -90,6 +90,14 @@ namespace usb {
|
|||
CDC cdc;
|
||||
|
||||
void CDC::Init() {
|
||||
#if defined(USE_STATIC_OPTIONS) && (USE_STATIC_OPTIONS & USB_OPT_MANUAL_PLL)
|
||||
#if defined(USB_SERIES_4_AVR)
|
||||
PLLFRQ = ((1 << PLLUSB) | (1 << PDIV3) | (1 << PDIV1));
|
||||
#endif
|
||||
USB_PLL_On();
|
||||
while (!(USB_PLL_IsReady()));
|
||||
#endif
|
||||
|
||||
USB_Init();
|
||||
|
||||
/* Create a regular character stream for the interface so that it can be used with the stdio.h functions */
|
||||
|
|
|
|||
Loading…
Reference in New Issue