LUFA Library  151115
Events.h File Reference

USB Event management definitions. More...

#include "../../../Common/Common.h"
#include "USBMode.h"

Functions

void EVENT_USB_Device_ConfigurationChanged (void)
 
void EVENT_USB_Device_Connect (void)
 
void EVENT_USB_Device_ControlRequest (void)
 
void EVENT_USB_Device_Disconnect (void)
 
void EVENT_USB_Device_Reset (void)
 
void EVENT_USB_Device_StartOfFrame (void)
 
void EVENT_USB_Device_Suspend (void)
 
void EVENT_USB_Device_WakeUp (void)
 
void EVENT_USB_Host_DeviceAttached (void)
 
void EVENT_USB_Host_DeviceEnumerationComplete (void)
 
void EVENT_USB_Host_DeviceEnumerationFailed (const uint8_t ErrorCode, const uint8_t SubErrorCode)
 
void EVENT_USB_Host_DeviceUnattached (void)
 
void EVENT_USB_Host_HostError (const uint8_t ErrorCode)
 
void EVENT_USB_Host_StartOfFrame (void)
 
void EVENT_USB_UIDChange (void)
 

Detailed Description

This module contains macros and functions relating to the management of library events, which are small pieces of code similar to ISRs which are run when a given condition is met. Each event can be fired from multiple places in the user or library code, which may or may not be inside an ISR, thus each handler should be written to be as small and fast as possible to prevent possible problems.

Events can be hooked by the user application by declaring a handler function with the same name and parameters listed here. If an event with no user-associated handler is fired within the library, it by default maps to an internal empty stub function.

Each event must only have one associated event handler, but can be raised by multiple sources by calling the event handler function (with any required event parameters).

Note
This file should not be included directly. It is automatically included as needed by the USB driver dispatch header located in LUFA/Drivers/USB/USB.h.