From 2ee9fc707784e115d744dbc229bdc893f4bb6bc1 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Mon, 18 May 2009 10:05:21 +0000 Subject: 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. --- Demos/Host/GenericHIDHost/GenericHIDHost.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'Demos/Host/GenericHIDHost/GenericHIDHost.h') diff --git a/Demos/Host/GenericHIDHost/GenericHIDHost.h b/Demos/Host/GenericHIDHost/GenericHIDHost.h index 3ae473e00..7e2f8b822 100644 --- a/Demos/Host/GenericHIDHost/GenericHIDHost.h +++ b/Demos/Host/GenericHIDHost/GenericHIDHost.h @@ -82,15 +82,14 @@ Status_EnumerationError = 3, /**< Software error while enumerating the attached USB device */ Status_HardwareError = 4, /**< Hardware error while enumerating the attached USB device */ }; - - /* Event Handlers: */ - HANDLES_EVENT(USB_DeviceAttached); - HANDLES_EVENT(USB_DeviceUnattached); - HANDLES_EVENT(USB_DeviceEnumerationComplete); - HANDLES_EVENT(USB_HostError); - HANDLES_EVENT(USB_DeviceEnumerationFailed); /* Function Prototypes: */ + void EVENT_USB_HostError(const uint8_t ErrorCode); + void EVENT_USB_DeviceAttached(void); + void EVENT_USB_DeviceUnattached(void); + void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode, const uint8_t SubErrorCode); + void EVENT_USB_DeviceEnumerationComplete(void); + void UpdateStatus(uint8_t CurrentStatus); void ReadNextReport(void); void WriteNextReport(uint8_t* ReportOUTData, uint8_t ReportIndex, uint8_t ReportType, uint16_t ReportLength); -- cgit v1.2.3