Rename internal suspend and wake up USB interrupt macros so that they follow the same naming scheme as the other USB ISR macros.

pull/1469/head
Dean Camera 14 years ago
parent d66a925786
commit ed7067e89f

@ -62,14 +62,12 @@ USB_ClassInfo_HID_Device_t Mouse_HID_Device_Interface =
/** Event handler for the library USB WakeUp event. */
void EVENT_USB_Device_Connect(void)
{
puts_P(PSTR("Device Connected.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
}
/** Event handler for the library USB Suspend event. */
void EVENT_USB_Device_Disconnect(void)
{
puts_P(PSTR("Device Disconnected.\r\n"));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
}

@ -139,8 +139,6 @@ static void USB_Device_SetAddress(void)
USB_DeviceState = (DeviceAddress) ? DEVICE_STATE_Addressed : DEVICE_STATE_Default;
USB_Device_SetDeviceAddress(DeviceAddress);
return;
}
static void USB_Device_SetConfiguration(void)

@ -203,7 +203,7 @@ static void USB_Init_Device(void)
ENDPOINT_DIR_OUT, USB_ControlEndpointSize,
ENDPOINT_BANK_SINGLE);
USB_INT_Enable(USB_INT_SUSPEND);
USB_INT_Enable(USB_INT_SUSPI);
USB_INT_Enable(USB_INT_EORSTI);
USB_Attach();

@ -92,12 +92,12 @@ ISR(USB_GEN_vect, ISR_BLOCK)
}
#endif
if (USB_INT_HasOccurred(USB_INT_SUSPEND) && USB_INT_IsEnabled(USB_INT_SUSPEND))
if (USB_INT_HasOccurred(USB_INT_SUSPI) && USB_INT_IsEnabled(USB_INT_SUSPI))
{
USB_INT_Clear(USB_INT_SUSPEND);
USB_INT_Clear(USB_INT_SUSPI);
USB_INT_Disable(USB_INT_SUSPEND);
USB_INT_Enable(USB_INT_WAKEUP);
USB_INT_Disable(USB_INT_SUSPI);
USB_INT_Enable(USB_INT_WAKEUPI);
USB_CLK_Freeze();
@ -113,7 +113,7 @@ ISR(USB_GEN_vect, ISR_BLOCK)
#endif
}
if (USB_INT_HasOccurred(USB_INT_WAKEUP) && USB_INT_IsEnabled(USB_INT_WAKEUP))
if (USB_INT_HasOccurred(USB_INT_WAKEUPI) && USB_INT_IsEnabled(USB_INT_WAKEUPI))
{
if (!(USB_Options & USB_OPT_MANUAL_PLL))
{
@ -123,10 +123,10 @@ ISR(USB_GEN_vect, ISR_BLOCK)
USB_CLK_Unfreeze();
USB_INT_Clear(USB_INT_WAKEUP);
USB_INT_Clear(USB_INT_WAKEUPI);
USB_INT_Disable(USB_INT_WAKEUP);
USB_INT_Enable(USB_INT_SUSPEND);
USB_INT_Disable(USB_INT_WAKEUPI);
USB_INT_Enable(USB_INT_SUSPI);
#if defined(USB_SERIES_2_AVR) && !defined(NO_LIMITED_CONTROLLER_CONNECT)
USB_DeviceState = (USB_ConfigurationNumber) ? DEVICE_STATE_Configured : DEVICE_STATE_Powered;
@ -144,9 +144,9 @@ ISR(USB_GEN_vect, ISR_BLOCK)
USB_DeviceState = DEVICE_STATE_Default;
USB_ConfigurationNumber = 0;
USB_INT_Clear(USB_INT_SUSPEND);
USB_INT_Disable(USB_INT_SUSPEND);
USB_INT_Enable(USB_INT_WAKEUP);
USB_INT_Clear(USB_INT_SUSPI);
USB_INT_Disable(USB_INT_SUSPI);
USB_INT_Enable(USB_INT_WAKEUPI);
Endpoint_ConfigureEndpoint(ENDPOINT_CONTROLEP, EP_TYPE_CONTROL,
ENDPOINT_DIR_OUT, USB_ControlEndpointSize,

@ -73,8 +73,8 @@
#define USB_INT_VBUS USBCON, (1 << VBUSTE) , USBINT, (1 << VBUSTI)
#define USB_INT_IDTI USBCON, (1 << IDTE) , USBINT, (1 << IDTI)
#define USB_INT_WAKEUP UDIEN , (1 << WAKEUPE), UDINT , (1 << WAKEUPI)
#define USB_INT_SUSPEND UDIEN , (1 << SUSPE) , UDINT , (1 << SUSPI)
#define USB_INT_WAKEUPI UDIEN , (1 << WAKEUPE), UDINT , (1 << WAKEUPI)
#define USB_INT_SUSPI UDIEN , (1 << SUSPE) , UDINT , (1 << SUSPI)
#define USB_INT_EORSTI UDIEN , (1 << EORSTE) , UDINT , (1 << EORSTI)
#define USB_INT_DCONNI UHIEN , (1 << DCONNE) , UHINT , (1 << DCONNI)
#define USB_INT_DDISCI UHIEN , (1 << DDISCE) , UHINT , (1 << DDISCI)

Loading…
Cancel
Save