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:
parent
72c2922e38
commit
2ee9fc7077
116 changed files with 596 additions and 1124 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue