Rewritten event system to remove all macros, to make user code clearer.

Fixed incorrect ENDPOINT_EPNUM_MASK mask preventing endpoints above EP3 from being selected (thanks to Jonathan Oakley).

Removed STREAM_CALLBACK() macro - callbacks now use regular function definitions to clarify user code.

Removed DESCRIPTOR_COMPARATOR() macro - comparators should now use regular function definitions to clarify user code.
This commit is contained in:
Dean Camera 2009-05-18 10:05:21 +00:00
parent 72c2922e38
commit 2ee9fc7077
116 changed files with 596 additions and 1124 deletions

View file

@ -90,7 +90,7 @@ void USB_Host_ProcessNextHostState(void)
USB_INT_Enable(USB_INT_VBERRI);
USB_IsConnected = true;
RAISE_EVENT(USB_Connect);
EVENT_USB_Connect();
USB_Host_ResumeBus();
Pipe_ClearPipes();
@ -184,7 +184,7 @@ void USB_Host_ProcessNextHostState(void)
case HOST_STATE_Default_PostAddressSet:
USB_Host_SetDeviceAddress(USB_HOST_DEVICEADDRESS);
RAISE_EVENT(USB_DeviceEnumerationComplete);
EVENT_USB_DeviceEnumerationComplete();
USB_HostState = HOST_STATE_Addressed;
break;
@ -192,14 +192,14 @@ void USB_Host_ProcessNextHostState(void)
if ((ErrorCode != HOST_ENUMERROR_NoError) && (USB_HostState != HOST_STATE_Unattached))
{
RAISE_EVENT(USB_DeviceEnumerationFailed, ErrorCode, SubErrorCode);
EVENT_USB_DeviceEnumerationFailed(ErrorCode, SubErrorCode);
USB_Host_VBUS_Auto_Off();
RAISE_EVENT(USB_DeviceUnattached);
EVENT_USB_DeviceUnattached();
if (USB_IsConnected)
RAISE_EVENT(USB_Disconnect);
EVENT_USB_Disconnect();
USB_ResetInterface();
}