X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/6a10d6b465be27db090d760dc0fbe722c94e4344..ba7cd3f22e0ec8c2fc7fd5dae3620aa75d926fd3:/LUFA/Drivers/USB/HighLevel/Events.h diff --git a/LUFA/Drivers/USB/HighLevel/Events.h b/LUFA/Drivers/USB/HighLevel/Events.h index eeb0ed37a..9638afee3 100644 --- a/LUFA/Drivers/USB/HighLevel/Events.h +++ b/LUFA/Drivers/USB/HighLevel/Events.h @@ -28,16 +28,21 @@ this software. */ -/** Library events module. 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. +/** \ingroup Group_USB + * @defgroup Group_Events USB Events + * + * 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 using the EVENT_HANDLER() and HANDLES_EVENT() macros. If an * event with no associated handler is fired within the library, it by default fires an internal empty stub * function. This is achieved through the use of the GCC compiler's "alias" attribute. * * Each event must only have one associated event handler, but can be raised by multiple sources. + * + * @{ */ #ifndef __USBEVENTS_H__ @@ -47,7 +52,7 @@ #include #include "../../../Common/Common.h" - #include "../LowLevel/USBMode.h" + #include "USBMode.h" /* Enable C linkage for C++ Compilers: */ #if defined(__cplusplus) @@ -58,7 +63,7 @@ /* Macros: */ /** Raises a given event name, with the specified parameters. For events with no parameters the * only argument to the macro is the event name, events with parameters list the parameter values - * after the name as a comma seperated list. + * after the name as a comma separated list. * * When a given event is fired, its corresponding event handler code is executed. * @@ -75,7 +80,7 @@ */ #define RAISE_EVENT(e, ...) Event_ ## e (__VA_ARGS__) - /** Indicates that a given module can raise a given event. This is the equivelent of putting the + /** Indicates that a given module can raise a given event. This is the equivalent of putting the * event function's prototype into the module, but in a cleaner way. Each event which may be * fired via the RAISE_EVENT macro in the module should have an accompanying RAISES_EVENT * prototype in the module's header file. @@ -100,7 +105,7 @@ * * Only one event handler may be defined in any user project for each individual event. Events may * or may not have parameters - for each event, refer to its documentation elsewhere in this module - * to determine the presense and purpose of any event parameters. + * to determine the presence and purpose of any event parameters. * * Usage Example: * \code @@ -115,7 +120,7 @@ */ #define EVENT_HANDLER(e) void Event_ ## e e ## _P - /** Indicates that a given module handles an event. This is the equivelent of putting the + /** Indicates that a given module handles an event. This is the equivalent of putting the * event function's prototype into the module, but in a cleaner way. Each event which may be * handled via the EVENT_HANDLER macro in the module should have an accompanying HANDLES_EVENT * prototype in the module's header file. @@ -136,7 +141,7 @@ */ #define HANDLES_EVENT(e) EVENT_HANDLER(e) - /* Psudo-Functions for Doxygen: */ + /* Pseudo-Functions for Doxygen: */ #if defined(__DOXYGEN__) /** Event for VBUS level change. This event fires when the VBUS line of the USB AVR changes from * high to low or vice-versa. @@ -165,7 +170,7 @@ * has been attached (but not yet fully enumerated), or when in device mode and the device is connected * to a host, beginning the enumeration process. * - * When in device mode, this can be used to progmatically start the USB management task to reduce + * When in device mode, this can be used to programmatically start the USB management task to reduce * CPU usage. * * \note For the smaller USB AVRs (AT90USBXX2) with limited USB controllers, VBUS is not available to the USB controller. @@ -183,7 +188,7 @@ * attached and enumerated device has been disconnected, or when in device mode and the device is * disconnected from the host. * - * When in device mode, this can be used to progmatically stop the USB management task to reduce + * When in device mode, this can be used to programmatically stop the USB management task to reduce * CPU usage. * * \note For the smaller USB AVRs (AT90USBXX2) with limited USB controllers, VBUS is not available to the USB controller. @@ -231,7 +236,7 @@ /** Event for USB device attachment. This event fires when a the USB interface is in host mode, and * a USB device has been connected to the USB interface. This is interrupt driven, thus fires before - * the standard USB_DeviceConnect event and so can be used to programatically start the USB management + * the standard USB_DeviceConnect event and so can be used to programmatically start the USB management * task to reduce CPU consumption. * * \note This event only exists on USB AVR models which supports host mode. @@ -245,7 +250,7 @@ /** Event for USB device removal. This event fires when a the USB interface is in host mode, and * a USB device has been removed the USB interface whether or not it has been enumerated. This - * can be used to programatically stop the USB management task to reduce CPU consumption. + * can be used to programmatically stop the USB management task to reduce CPU consumption. * * \note This event only exists on USB AVR models which supports host mode. * @@ -436,5 +441,7 @@ #if defined(__cplusplus) } #endif - + #endif + +/** @} */