aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/OTG/TestApp/TestEvents.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-05-18 10:05:21 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-05-18 10:05:21 +0000
commit2ee9fc707784e115d744dbc229bdc893f4bb6bc1 (patch)
tree1f4de5f6d8e2a9bfe89d3263f19f9b9ebf855812 /Demos/OTG/TestApp/TestEvents.h
parent72c2922e38a2dfd14eb2d8e3692171704b5508f4 (diff)
downloadlufa-2ee9fc707784e115d744dbc229bdc893f4bb6bc1.tar.gz
lufa-2ee9fc707784e115d744dbc229bdc893f4bb6bc1.tar.bz2
lufa-2ee9fc707784e115d744dbc229bdc893f4bb6bc1.zip
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.
Diffstat (limited to 'Demos/OTG/TestApp/TestEvents.h')
-rw-r--r--Demos/OTG/TestApp/TestEvents.h71
1 files changed, 19 insertions, 52 deletions
diff --git a/Demos/OTG/TestApp/TestEvents.h b/Demos/OTG/TestApp/TestEvents.h
index a1f149f47..656c070ea 100644
--- a/Demos/OTG/TestApp/TestEvents.h
+++ b/Demos/OTG/TestApp/TestEvents.h
@@ -46,58 +46,6 @@
#include <LUFA/Drivers/Misc/TerminalCodes.h> // ANSI Terminal Escape Codes
#include <LUFA/Scheduler/Scheduler.h> // Simple scheduler for task management
- /* Event Catch List: */
- /** Indicates that this module will catch the USB_VBUSChange event when thrown by the library. */
- HANDLES_EVENT(USB_VBUSChange);
-
- /** Indicates that this module will catch the USB_VBUSConnect event when thrown by the library. */
- HANDLES_EVENT(USB_VBUSConnect);
-
- /** Indicates that this module will catch the USB_VBUSDisconnect event when thrown by the library. */
- HANDLES_EVENT(USB_VBUSDisconnect);
-
- /** Indicates that this module will catch the USB_Connect event when thrown by the library. */
- HANDLES_EVENT(USB_Connect);
-
- /** Indicates that this module will catch the USB_Disconnect event when thrown by the library. */
- HANDLES_EVENT(USB_Disconnect);
-
- /** Indicates that this module will catch the USB_Suspend event when thrown by the library. */
- HANDLES_EVENT(USB_Suspend);
-
- /** Indicates that this module will catch the USB_WakeUp event when thrown by the library. */
- HANDLES_EVENT(USB_WakeUp);
-
- /** Indicates that this module will catch the USB_Reset event when thrown by the library. */
- HANDLES_EVENT(USB_Reset);
-
- /** Indicates that this module will catch the USB_UIDChange event when thrown by the library. */
- HANDLES_EVENT(USB_UIDChange);
-
- /** Indicates that this module will catch the USB_InitFailure event when thrown by the library. */
- HANDLES_EVENT(USB_InitFailure);
-
- /** Indicates that this module will catch the USB_HostError event when thrown by the library. */
- HANDLES_EVENT(USB_HostError);
-
- /** Indicates that this module will catch the USB_DeviceEnumerationFailed event when thrown by the library. */
- HANDLES_EVENT(USB_DeviceEnumerationFailed);
-
- /** Indicates that this module will catch the USB_DeviceError event when thrown by the library. */
- HANDLES_EVENT(USB_DeviceError);
-
- /** Indicates that this module will catch the USB_UnhandledControlPacket event when thrown by the library. */
- HANDLES_EVENT(USB_UnhandledControlPacket);
-
- /** Indicates that this module will catch the USB_ConfigurationChanged event when thrown by the library. */
- HANDLES_EVENT(USB_ConfigurationChanged);
-
- /** Indicates that this module will catch the USB_DeviceAttached event when thrown by the library. */
- HANDLES_EVENT(USB_DeviceAttached);
-
- /** Indicates that this module will catch the USB_DeviceUnattached event when thrown by the library. */
- HANDLES_EVENT(USB_DeviceUnattached);
-
/* Macros: */
/** Prefix sent through the USART when an even fires before the actual event message. */
#define EVENT_PREFIX ESC_INVERSE_ON "EVENT:" ESC_INVERSE_OFF " "
@@ -107,4 +55,23 @@
static void Abort_Program(void) ATTR_NO_RETURN;
#endif
+ void EVENT_USB_VBUSChange(void);
+ void EVENT_USB_VBUSConnect(void);
+ void EVENT_USB_VBUSDisconnect(void);
+ void EVENT_USB_Connect(void);
+ void EVENT_USB_Disconnect(void);
+ void EVENT_USB_InitFailure(const uint8_t ErrorCode);
+ void EVENT_USB_UIDChange(void);
+ 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 EVENT_USB_UnhandledControlPacket(void);
+ void EVENT_USB_ConfigurationChanged(void);
+ void EVENT_USB_Suspend(void);
+ void EVENT_USB_WakeUp(void);
+ void EVENT_USB_Reset(void);
+ void EVENT_USB_DeviceError(const uint8_t ErrorCode);
+
#endif