diff options
Diffstat (limited to 'LUFA/Drivers')
-rw-r--r-- | LUFA/Drivers/Board/CULV3/Buttons.h | 4 | ||||
-rw-r--r-- | LUFA/Drivers/Board/CULV3/LEDs.h | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Device.h | 42 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Host.h | 44 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/USBInterrupt.c | 4 |
5 files changed, 56 insertions, 40 deletions
diff --git a/LUFA/Drivers/Board/CULV3/Buttons.h b/LUFA/Drivers/Board/CULV3/Buttons.h index 0ee8ae9f9..770ba54fc 100644 --- a/LUFA/Drivers/Board/CULV3/Buttons.h +++ b/LUFA/Drivers/Board/CULV3/Buttons.h @@ -29,7 +29,7 @@ */ /** \file - * \brief Board specific LED driver header for the Busware CUL V3. + * \brief Board specific LED driver header for the Busware CULV3. * * Board specific LED driver header for the Busware CUL V3 (http://busware.de/tiki-index.php?page=CUL). * @@ -38,7 +38,7 @@ */ /** \ingroup Group_LEDs - * @defgroup Group_LEDs_CULV3 CUL V3 + * @defgroup Group_LEDs_CULV3 CULV3 * * Board specific LED driver header for the Busware CUL V3 (http://busware.de/tiki-index.php?page=CUL). * diff --git a/LUFA/Drivers/Board/CULV3/LEDs.h b/LUFA/Drivers/Board/CULV3/LEDs.h index 1561aea7b..cb5f93490 100644 --- a/LUFA/Drivers/Board/CULV3/LEDs.h +++ b/LUFA/Drivers/Board/CULV3/LEDs.h @@ -38,7 +38,7 @@ */ /** \ingroup Group_LEDs - * @defgroup Group_LEDs_CULV3 CUL V3 + * @defgroup Group_LEDs_CULV3 CULV3 * * Board specific LED driver header for the Busware CUL V3 (http://busware.de/tiki-index.php?page=CUL). * diff --git a/LUFA/Drivers/USB/LowLevel/Device.h b/LUFA/Drivers/USB/LowLevel/Device.h index 2f54d1dd4..03440d28f 100644 --- a/LUFA/Drivers/USB/LowLevel/Device.h +++ b/LUFA/Drivers/USB/LowLevel/Device.h @@ -148,24 +148,30 @@ return UDFNUM; } - /** Enables the device mode Start Of Frame events. When enabled, this causes the - * \ref EVENT_USB_Device_StartOfFrame() event to fire once per millisecond, synchronized to the USB bus, - * at the start of each USB frame when enumerated in device mode. - */ - static inline void USB_Device_EnableSOFEvents(void) ATTR_ALWAYS_INLINE; - static inline void USB_Device_EnableSOFEvents(void) - { - USB_INT_Enable(USB_INT_SOFI); - } - - /** Disables the device mode Start Of Frame events. When disabled, this stops the firing of the - * \ref EVENT_USB_Device_StartOfFrame() event when enumerated in device mode. - */ - static inline void USB_Device_DisableSOFEvents(void) ATTR_ALWAYS_INLINE; - static inline void USB_Device_DisableSOFEvents(void) - { - USB_INT_Disable(USB_INT_SOFI); - } + #if !defined(NO_SOF_EVENTS) + /** Enables the device mode Start Of Frame events. When enabled, this causes the + * \ref EVENT_USB_Device_StartOfFrame() event to fire once per millisecond, synchronized to the USB bus, + * at the start of each USB frame when enumerated in device mode. + * + * \note Not available when the NO_SOF_EVENTS compile time token is defined. + */ + static inline void USB_Device_EnableSOFEvents(void) ATTR_ALWAYS_INLINE; + static inline void USB_Device_EnableSOFEvents(void) + { + USB_INT_Enable(USB_INT_SOFI); + } + + /** Disables the device mode Start Of Frame events. When disabled, this stops the firing of the + * \ref EVENT_USB_Device_StartOfFrame() event when enumerated in device mode. + * + * \note Not available when the NO_SOF_EVENTS compile time token is defined. + */ + static inline void USB_Device_DisableSOFEvents(void) ATTR_ALWAYS_INLINE; + static inline void USB_Device_DisableSOFEvents(void) + { + USB_INT_Disable(USB_INT_SOFI); + } + #endif /* Function Prototypes: */ /** Function to retrieve a given descriptor's size and memory location from the given descriptor type value, diff --git a/LUFA/Drivers/USB/LowLevel/Host.h b/LUFA/Drivers/USB/LowLevel/Host.h index 3bfc44199..b11883974 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). * diff --git a/LUFA/Drivers/USB/LowLevel/USBInterrupt.c b/LUFA/Drivers/USB/LowLevel/USBInterrupt.c index 21b0a9bb1..54983c09e 100644 --- a/LUFA/Drivers/USB/LowLevel/USBInterrupt.c +++ b/LUFA/Drivers/USB/LowLevel/USBInterrupt.c @@ -162,12 +162,14 @@ ISR(USB_GEN_vect, ISR_BLOCK) EVENT_USB_Device_Reset(); } + #if !defined(NO_SOF_EVENTS) if (USB_INT_HasOccurred(USB_INT_SOFI) && USB_INT_IsEnabled(USB_INT_SOFI)) { USB_INT_Clear(USB_INT_SOFI); EVENT_USB_Device_StartOfFrame(); } + #endif #endif #if defined(USB_CAN_BE_HOST) @@ -217,6 +219,7 @@ ISR(USB_GEN_vect, ISR_BLOCK) USB_ResetInterface(); } + #if !defined(NO_SOF_EVENTS) if (USB_INT_HasOccurred(USB_INT_HSOFI) && USB_INT_IsEnabled(USB_INT_HSOFI)) { USB_INT_Clear(USB_INT_HSOFI); @@ -224,6 +227,7 @@ ISR(USB_GEN_vect, ISR_BLOCK) EVENT_USB_Host_StartOfFrame(); } #endif + #endif #if defined(USB_CAN_BE_BOTH) if (USB_INT_HasOccurred(USB_INT_IDTI) && USB_INT_IsEnabled(USB_INT_IDTI)) |