diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-10-07 11:55:20 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-10-07 11:55:20 +0000 |
| commit | 9810cbdd156afc5100449e509ad5bfa11e31088e (patch) | |
| tree | 5c8507c30b7feccf1e5ac500e14cd301440bfdd7 /LUFA/Drivers/USB/LowLevel/Host.h | |
| parent | ce7ae17fd93dbd2a6c0667c0091b217b7752e425 (diff) | |
Added new NO_SOF_EVENTS compile time option, enabled in the bootloaders to reduce the compiled binary size.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1516 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel/Host.h')
| -rw-r--r-- | LUFA/Drivers/USB/LowLevel/Host.h | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/Host.h b/LUFA/Drivers/USB/LowLevel/Host.h index 3bfc4419..b1188397 100644 --- a/LUFA/Drivers/USB/LowLevel/Host.h +++ b/LUFA/Drivers/USB/LowLevel/Host.h @@ -253,25 +253,31 @@ return UHFNUM; } - /** Enables the host mode Start Of Frame events. When enabled, this causes the - * \ref EVENT_USB_Host_StartOfFrame() event to fire once per millisecond, synchronized to the USB bus, - * at the start of each USB frame when a device is enumerated while in host mode. - */ - static inline void USB_Host_EnableSOFEvents(void) ATTR_ALWAYS_INLINE; - static inline void USB_Host_EnableSOFEvents(void) - { - USB_INT_Enable(USB_INT_HSOFI); - } - - /** Disables the host mode Start Of Frame events. When disabled, this stops the firing of the - * \ref EVENT_USB_Host_StartOfFrame() event when enumerated in host mode. - */ - static inline void USB_Host_DisableSOFEvents(void) ATTR_ALWAYS_INLINE; - static inline void USB_Host_DisableSOFEvents(void) - { - USB_INT_Disable(USB_INT_HSOFI); - } - + #if !defined(NO_SOF_EVENTS) + /** Enables the host mode Start Of Frame events. When enabled, this causes the + * \ref EVENT_USB_Host_StartOfFrame() event to fire once per millisecond, synchronized to the USB bus, + * at the start of each USB frame when a device is enumerated while in host mode. + * + * \note Not available when the NO_SOF_EVENTS compile time token is defined. + */ + static inline void USB_Host_EnableSOFEvents(void) ATTR_ALWAYS_INLINE; + static inline void USB_Host_EnableSOFEvents(void) + { + USB_INT_Enable(USB_INT_HSOFI); + } + + /** Disables the host mode Start Of Frame events. When disabled, this stops the firing of the + * \ref EVENT_USB_Host_StartOfFrame() event when enumerated in host mode. + * + * \note Not available when the NO_SOF_EVENTS compile time token is defined. + */ + static inline void USB_Host_DisableSOFEvents(void) ATTR_ALWAYS_INLINE; + static inline void USB_Host_DisableSOFEvents(void) + { + USB_INT_Disable(USB_INT_HSOFI); + } + #endif + /** Resets the USB bus, including the endpoints in any attached device and pipes on the AVR host. * USB bus resets leave the default control pipe configured (if already configured). * |
