Move global interrupt enable/disable functions out to Common.h and document them.

This commit is contained in:
Dean Camera 2011-04-08 05:40:25 +00:00
parent de9bd767dc
commit c263ea837a
13 changed files with 127 additions and 104 deletions

View file

@ -115,8 +115,8 @@ void USB_Device_ProcessControlRequest(void)
static void USB_Device_SetAddress(void)
{
uint8_t DeviceAddress = (USB_ControlRequest.wValue & 0x7F);
uint_reg_t CurrentGlobalInt = USB_INT_GetGlobalEnableState();
USB_INT_GlobalDisable();
uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
GlobalInterruptDisable();
Endpoint_ClearSETUP();
@ -127,7 +127,7 @@ static void USB_Device_SetAddress(void)
USB_Device_SetDeviceAddress(DeviceAddress);
USB_DeviceState = (DeviceAddress) ? DEVICE_STATE_Addressed : DEVICE_STATE_Default;
USB_INT_SetGlobalEnableState(CurrentGlobalInt);
SetGlobalInterruptMask(CurrentGlobalInt);
}
static void USB_Device_SetConfiguration(void)