Complete initial revision of the XMEGA Clock Management platform driver.
Start the USB clock source generator inside USB_ResetInterface() for XMEGA devices.
This commit is contained in:
parent
c8e5176465
commit
ffa8b430c1
6 changed files with 173 additions and 92 deletions
|
|
@ -43,7 +43,7 @@ bool Endpoint_ConfigureEndpoint_Prv(const uint8_t Number,
|
|||
const uint8_t UECFG0XData,
|
||||
const uint8_t UECFG1XData)
|
||||
{
|
||||
// TODO
|
||||
return false; // TODO
|
||||
}
|
||||
|
||||
void Endpoint_ClearEndpoints(void)
|
||||
|
|
|
|||
|
|
@ -78,6 +78,11 @@ void USB_Disable(void)
|
|||
|
||||
void USB_ResetInterface(void)
|
||||
{
|
||||
if (USB_Options & USB_DEVICE_OPT_LOWSPEED)
|
||||
CLK.USBCTRL = ((((F_USB / 6000000) - 1) << CLK_USBPSDIV_gp) | CLK_USBSRC_PLL_gc | CLK_USBEN_bm);
|
||||
else
|
||||
CLK.USBCTRL = ((((F_USB / 48000000) - 1) << CLK_USBPSDIV_gp) | CLK_USBSRC_PLL_gc | CLK_USBEN_bm);
|
||||
|
||||
USB_INT_DisableAllInterrupts();
|
||||
USB_INT_ClearAllInterrupts();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue