Add missing function attributes.
authorDean Camera <dean@fourwalledcubicle.com>
Tue, 12 Jul 2011 05:13:31 +0000 (05:13 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Tue, 12 Jul 2011 05:13:31 +0000 (05:13 +0000)
16 files changed:
LUFA/Drivers/Peripheral/AVR8/SPI_AVR8.h
LUFA/Drivers/USB/Class/Host/Audio.h
LUFA/Drivers/USB/Class/Host/CDC.h
LUFA/Drivers/USB/Class/Host/HID.c
LUFA/Drivers/USB/Class/Host/HID.h
LUFA/Drivers/USB/Class/Host/MIDI.h
LUFA/Drivers/USB/Class/Host/MassStorage.h
LUFA/Drivers/USB/Class/Host/Printer.h
LUFA/Drivers/USB/Class/Host/RNDIS.h
LUFA/Drivers/USB/Class/Host/StillImage.h
LUFA/Drivers/USB/Core/AVR8/Device_AVR8.h
LUFA/Drivers/USB/Core/AVR8/Pipe_AVR8.h
LUFA/Drivers/USB/Core/HostStandardReq.h
LUFA/Drivers/USB/Core/StdRequestType.h
LUFA/Drivers/USB/Core/UC3/Device_UC3.h
LUFA/Drivers/USB/Core/UC3/Pipe_UC3.h

index fd42c50..48b8740 100644 (file)
                         *
                         *  \return \ref SPI_MODE_MASTER if the interface is currently in SPI Master mode, \ref SPI_MODE_SLAVE otherwise
                         */
                         *
                         *  \return \ref SPI_MODE_MASTER if the interface is currently in SPI Master mode, \ref SPI_MODE_SLAVE otherwise
                         */
+                       static inline uint8_t SPI_GetCurrentMode(void) ATTR_ALWAYS_INLINE;
                        static inline uint8_t SPI_GetCurrentMode(void)
                        {
                                return (SPCR & SPI_MODE_MASTER);
                        static inline uint8_t SPI_GetCurrentMode(void)
                        {
                                return (SPCR & SPI_MODE_MASTER);
index dafe9e6..2c78b41 100644 (file)
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum.
                         */
                        uint8_t Audio_Host_StartStopStreaming(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum.
                         */
                        uint8_t Audio_Host_StartStopStreaming(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
+                                                             const bool EnableStreaming) ATTR_NON_NULL_PTR_ARG(1);
+                       uint8_t Audio_Host_StartStopStreaming(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
                                                              const bool EnableStreaming);
 
                        /** Gets or sets the specified property of a streaming audio class endpoint that is bound to a pipe in the given
                                                              const bool EnableStreaming);
 
                        /** Gets or sets the specified property of a streaming audio class endpoint that is bound to a pipe in the given
                         *                                     the retrieved data is to be stored for GET operations.
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum.
                         *                                     the retrieved data is to be stored for GET operations.
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum.
-                        */                     
+                        */
+                       uint8_t Audio_Host_GetSetEndpointProperty(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
+                                                                 const uint8_t DataPipeIndex,
+                                                                 const uint8_t EndpointProperty,
+                                                                 const uint8_t EndpointControl,
+                                                                 const uint16_t DataLength,
+                                                                 void* const Data) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(6);
                        uint8_t Audio_Host_GetSetEndpointProperty(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
                                                                  const uint8_t DataPipeIndex,
                                                                  const uint8_t EndpointProperty,
                        uint8_t Audio_Host_GetSetEndpointProperty(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
                                                                  const uint8_t DataPipeIndex,
                                                                  const uint8_t EndpointProperty,
                         *
                         *  \param[in,out] AudioInterfaceInfo  Pointer to a structure containing an Audio Class host configuration and state.
                         */
                         *
                         *  \param[in,out] AudioInterfaceInfo  Pointer to a structure containing an Audio Class host configuration and state.
                         */
-                       static inline void Audio_Host_USBTask(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo);
+                       static inline void Audio_Host_USBTask(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
+                                                             ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
                        static inline void Audio_Host_USBTask(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
                        {
                                (void)AudioInterfaceInfo;
                        static inline void Audio_Host_USBTask(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
                        {
                                (void)AudioInterfaceInfo;
                         *  \return Boolean \c true if the given Audio interface has a sample to be read, \c false otherwise.
                         */
                        static inline bool Audio_Host_IsSampleReceived(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
                         *  \return Boolean \c true if the given Audio interface has a sample to be read, \c false otherwise.
                         */
                        static inline bool Audio_Host_IsSampleReceived(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
-                                                                        ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
+                                                                      ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
                        static inline bool Audio_Host_IsSampleReceived(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
                        {
                                if ((USB_HostState != HOST_STATE_Configured) || !(AudioInterfaceInfo->State.IsActive))
                        static inline bool Audio_Host_IsSampleReceived(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
                        {
                                if ((USB_HostState != HOST_STATE_Configured) || !(AudioInterfaceInfo->State.IsActive))
                         *  \return Boolean \c true if the given Audio interface is ready to accept the next sample, \c false otherwise.
                         */
                        static inline bool Audio_Host_IsReadyForNextSample(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
                         *  \return Boolean \c true if the given Audio interface is ready to accept the next sample, \c false otherwise.
                         */
                        static inline bool Audio_Host_IsReadyForNextSample(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
-                                                                            ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
+                                                                          ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
                        static inline bool Audio_Host_IsReadyForNextSample(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
                        {
                                if ((USB_HostState != HOST_STATE_Configured) || !(AudioInterfaceInfo->State.IsActive))
                        static inline bool Audio_Host_IsReadyForNextSample(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
                        {
                                if ((USB_HostState != HOST_STATE_Configured) || !(AudioInterfaceInfo->State.IsActive))
                         *  \return  Signed 8-bit audio sample from the audio interface.
                         */
                        static inline int8_t Audio_Host_ReadSample8(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
                         *  \return  Signed 8-bit audio sample from the audio interface.
                         */
                        static inline int8_t Audio_Host_ReadSample8(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
-                                                                     ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
+                                                                   ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
                        static inline int8_t Audio_Host_ReadSample8(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
                        {
                                int8_t Sample;
                        static inline int8_t Audio_Host_ReadSample8(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
                        {
                                int8_t Sample;
                         *  \return  Signed 16-bit audio sample from the audio interface.
                         */
                        static inline int16_t Audio_Host_ReadSample16(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
                         *  \return  Signed 16-bit audio sample from the audio interface.
                         */
                        static inline int16_t Audio_Host_ReadSample16(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
-                                                                       ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
+                                                                     ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
                        static inline int16_t Audio_Host_ReadSample16(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
                        {
                                int16_t Sample;
                        static inline int16_t Audio_Host_ReadSample16(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
                        {
                                int16_t Sample;
                         *  \return Signed 24-bit audio sample from the audio interface.
                         */
                        static inline int32_t Audio_Host_ReadSample24(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
                         *  \return Signed 24-bit audio sample from the audio interface.
                         */
                        static inline int32_t Audio_Host_ReadSample24(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
-                                                                       ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
+                                                                     ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
                        static inline int32_t Audio_Host_ReadSample24(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
                        {
                                int32_t Sample;
                        static inline int32_t Audio_Host_ReadSample24(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo)
                        {
                                int32_t Sample;
                         *  \param[in]     Sample              Signed 8-bit audio sample.
                         */
                        static inline void Audio_Host_WriteSample8(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
                         *  \param[in]     Sample              Signed 8-bit audio sample.
                         */
                        static inline void Audio_Host_WriteSample8(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
-                                                                    const int8_t Sample) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
+                                                                  const int8_t Sample) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
                        static inline void Audio_Host_WriteSample8(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
                        static inline void Audio_Host_WriteSample8(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
-                                                                    const int8_t Sample)
+                                                                  const int8_t Sample)
                        {
                                Pipe_Write_8(Sample);
 
                        {
                                Pipe_Write_8(Sample);
 
                         *  \param[in]     Sample              Signed 16-bit audio sample.
                         */
                        static inline void Audio_Host_WriteSample16(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
                         *  \param[in]     Sample              Signed 16-bit audio sample.
                         */
                        static inline void Audio_Host_WriteSample16(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
-                                                                     const int16_t Sample) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
+                                                                   const int16_t Sample) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
                        static inline void Audio_Host_WriteSample16(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
                        static inline void Audio_Host_WriteSample16(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
-                                                                     const int16_t Sample)
+                                                                   const int16_t Sample)
                        {
                                Pipe_Write_16_LE(Sample);
 
                        {
                                Pipe_Write_16_LE(Sample);
 
                         *  \param[in]     Sample              Signed 24-bit audio sample.
                         */
                        static inline void Audio_Host_WriteSample24(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
                         *  \param[in]     Sample              Signed 24-bit audio sample.
                         */
                        static inline void Audio_Host_WriteSample24(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
-                                                                     const int32_t Sample) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
+                                                                   const int32_t Sample) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
                        static inline void Audio_Host_WriteSample24(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
                        static inline void Audio_Host_WriteSample24(USB_ClassInfo_Audio_Host_t* const AudioInterfaceInfo,
-                                                                     const int32_t Sample)
+                                                                   const int32_t Sample)
                        {
                                Pipe_Write_16_LE(Sample);
                                Pipe_Write_8(Sample >> 16);
                        {
                                Pipe_Write_16_LE(Sample);
                                Pipe_Write_8(Sample >> 16);
        #if !defined(__DOXYGEN__)
                /* Function Prototypes: */
                        #if defined(__INCLUDE_FROM_AUDIO_HOST_C)
        #if !defined(__DOXYGEN__)
                /* Function Prototypes: */
                        #if defined(__INCLUDE_FROM_AUDIO_HOST_C)
-                               static uint8_t DCOMP_Audio_Host_NextAudioControlInterface(void* CurrentDescriptor);
-                               static uint8_t DCOMP_Audio_Host_NextAudioStreamInterface(void* CurrentDescriptor);
-                               static uint8_t DCOMP_Audio_Host_NextAudioInterfaceDataEndpoint(void* CurrentDescriptor);
+                               static uint8_t DCOMP_Audio_Host_NextAudioControlInterface(void* CurrentDescriptor)
+                                                                                         ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_Audio_Host_NextAudioStreamInterface(void* CurrentDescriptor)
+                                                                                        ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_Audio_Host_NextAudioInterfaceDataEndpoint(void* CurrentDescriptor)
+                                                                                              ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
                        #endif
        #endif
 
                        #endif
        #endif
 
index 9be6094..59ec137 100644 (file)
                                #endif
 
                                void CDC_Host_Event_Stub(void) ATTR_CONST;
                                #endif
 
                                void CDC_Host_Event_Stub(void) ATTR_CONST;
+                               
                                void EVENT_CDC_Host_ControLineStateChanged(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo)
                                                                           ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(CDC_Host_Event_Stub);
 
                                void EVENT_CDC_Host_ControLineStateChanged(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo)
                                                                           ATTR_WEAK ATTR_NON_NULL_PTR_ARG(1) ATTR_ALIAS(CDC_Host_Event_Stub);
 
-                               static uint8_t DCOMP_CDC_Host_NextCDCControlInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
-                               static uint8_t DCOMP_CDC_Host_NextCDCDataInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
-                               static uint8_t DCOMP_CDC_Host_NextCDCInterfaceEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_CDC_Host_NextCDCControlInterface(void* const CurrentDescriptor)
+                                                                                     ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_CDC_Host_NextCDCDataInterface(void* const CurrentDescriptor)
+                                                                                  ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_CDC_Host_NextCDCInterfaceEndpoint(void* const CurrentDescriptor)
+                                                                                      ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
                        #endif
        #endif
 
                        #endif
        #endif
 
index 08fb666..512480b 100644 (file)
@@ -73,7 +73,7 @@ uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo
                                         (HIDInterface->Protocol != HIDInterfaceInfo->Config.HIDInterfaceProtocol));
 
                        if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
                                         (HIDInterface->Protocol != HIDInterfaceInfo->Config.HIDInterfaceProtocol));
 
                        if (USB_GetNextDescriptorComp(&ConfigDescriptorSize, &ConfigDescriptorData,
-                                                     DCOMP_HID_Host_NextHID) != DESCRIPTOR_SEARCH_COMP_Found)
+                                                     DCOMP_HID_Host_NextHIDDescriptor) != DESCRIPTOR_SEARCH_COMP_Found)
                        {
                                return HID_ENUMERROR_NoCompatibleInterfaceFound;
                        }
                        {
                                return HID_ENUMERROR_NoCompatibleInterfaceFound;
                        }
@@ -168,7 +168,7 @@ static uint8_t DCOMP_HID_Host_NextHIDInterface(void* const CurrentDescriptor)
        return DESCRIPTOR_SEARCH_NotFound;
 }
 
        return DESCRIPTOR_SEARCH_NotFound;
 }
 
-static uint8_t DCOMP_HID_Host_NextHID(void* const CurrentDescriptor)
+static uint8_t DCOMP_HID_Host_NextHIDDescriptor(void* const CurrentDescriptor)
 {
        USB_Descriptor_Header_t* Header = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Header_t);
 
 {
        USB_Descriptor_Header_t* Header = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Header_t);
 
index a0bef78..08410f2 100644 (file)
                         *
                         *  \param[in,out] HIDInterfaceInfo  Pointer to a structure containing a HID Class host configuration and state.
                         */
                         *
                         *  \param[in,out] HIDInterfaceInfo  Pointer to a structure containing a HID Class host configuration and state.
                         */
-                       static inline void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo);
+                       static inline void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
                        static inline void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo)
                        {
                                (void)HIDInterfaceInfo;
                        static inline void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo)
                        {
                                (void)HIDInterfaceInfo;
        #if !defined(__DOXYGEN__)
                /* Function Prototypes: */
                        #if defined(__INCLUDE_FROM_HID_HOST_C)
        #if !defined(__DOXYGEN__)
                /* Function Prototypes: */
                        #if defined(__INCLUDE_FROM_HID_HOST_C)
-                               static uint8_t DCOMP_HID_Host_NextHIDInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
-                               static uint8_t DCOMP_HID_Host_NextHID(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
-                               static uint8_t DCOMP_HID_Host_NextHIDInterfaceEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_HID_Host_NextHIDInterface(void* const CurrentDescriptor)
+                                                                              ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_HID_Host_NextHIDDescriptor(void* const CurrentDescriptor)
+                                                                               ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_HID_Host_NextHIDInterfaceEndpoint(void* const CurrentDescriptor)
+                                                                                      ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
                        #endif
        #endif
 
                        #endif
        #endif
 
index 28bdbfd..c4451b1 100644 (file)
        #if !defined(__DOXYGEN__)
                /* Function Prototypes: */
                        #if defined(__INCLUDE_FROM_MIDI_HOST_C)
        #if !defined(__DOXYGEN__)
                /* Function Prototypes: */
                        #if defined(__INCLUDE_FROM_MIDI_HOST_C)
-                               static uint8_t DCOMP_MIDI_Host_NextMIDIStreamingInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
-                               static uint8_t DCOMP_MIDI_Host_NextMIDIStreamingDataEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_MIDI_Host_NextMIDIStreamingInterface(void* const CurrentDescriptor)
+                                                                                         ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_MIDI_Host_NextMIDIStreamingDataEndpoint(void* const CurrentDescriptor)
+                                                                                            ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
                        #endif
        #endif
 
                        #endif
        #endif
 
index 3476e4f..4976297 100644 (file)
                         *
                         *  \param[in,out] MSInterfaceInfo  Pointer to a structure containing an Mass Storage Class host configuration and state.
                         */
                         *
                         *  \param[in,out] MSInterfaceInfo  Pointer to a structure containing an Mass Storage Class host configuration and state.
                         */
-                       static inline void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo);
+                       static inline void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
                        static inline void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo)
                        {
                                (void)MSInterfaceInfo;
                        static inline void MS_Host_USBTask(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo)
                        {
                                (void)MSInterfaceInfo;
 
                /* Function Prototypes: */
                        #if defined(__INCLUDE_FROM_MASSSTORAGE_HOST_C)
 
                /* Function Prototypes: */
                        #if defined(__INCLUDE_FROM_MASSSTORAGE_HOST_C)
-                               static uint8_t DCOMP_MS_Host_NextMSInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
-                               static uint8_t DCOMP_MS_Host_NextMSInterfaceEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
-
                                static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
                                                                   MS_CommandBlockWrapper_t* const SCSICommandBlock,
                                                                   const void* const BufferPtr) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
                                static uint8_t MS_Host_WaitForDataReceived(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
                                static uint8_t MS_Host_SendReceiveData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
                                                                       MS_CommandBlockWrapper_t* const SCSICommandBlock,
                                static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
                                                                   MS_CommandBlockWrapper_t* const SCSICommandBlock,
                                                                   const void* const BufferPtr) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
                                static uint8_t MS_Host_WaitForDataReceived(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
                                static uint8_t MS_Host_SendReceiveData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
                                                                       MS_CommandBlockWrapper_t* const SCSICommandBlock,
-                                                                      void* BufferPtr) ATTR_NON_NULL_PTR_ARG(1)  ATTR_NON_NULL_PTR_ARG(2);
+                                                                      void* BufferPtr) ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
                                static uint8_t MS_Host_GetReturnedStatus(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
                                                                         MS_CommandStatusWrapper_t* const SCSICommandStatus)
                                                                         ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
                                static uint8_t MS_Host_GetReturnedStatus(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
                                                                         MS_CommandStatusWrapper_t* const SCSICommandStatus)
                                                                         ATTR_NON_NULL_PTR_ARG(1) ATTR_NON_NULL_PTR_ARG(2);
+
+                               static uint8_t DCOMP_MS_Host_NextMSInterface(void* const CurrentDescriptor)
+                                                                            ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_MS_Host_NextMSInterfaceEndpoint(void* const CurrentDescriptor)
+                                                                                    ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
                        #endif
        #endif
 
                        #endif
        #endif
 
index 585142d..d9de036 100644 (file)
        #if !defined(__DOXYGEN__)
                /* Function Prototypes: */
                        #if defined(__INCLUDE_FROM_PRINTER_HOST_C)
        #if !defined(__DOXYGEN__)
                /* Function Prototypes: */
                        #if defined(__INCLUDE_FROM_PRINTER_HOST_C)
-                               static uint8_t DCOMP_PRNT_Host_NextPRNTInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
-                               static uint8_t DCOMP_PRNT_Host_NextPRNTInterfaceEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_PRNT_Host_NextPRNTInterface(void* const CurrentDescriptor)
+                                                                                ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_PRNT_Host_NextPRNTInterfaceEndpoint(void* const CurrentDescriptor)
+                                                                                        ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
                        #endif
        #endif
 
                        #endif
        #endif
 
index 97c8a5b..f90ed41 100644 (file)
                         *
                         *  \param[in,out] RNDISInterfaceInfo  Pointer to a structure containing an RNDIS Class host configuration and state.
                         */
                         *
                         *  \param[in,out] RNDISInterfaceInfo  Pointer to a structure containing an RNDIS Class host configuration and state.
                         */
-                       static inline void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
+                       static inline void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
                        static inline void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo)
                        {
                                (void)RNDISInterfaceInfo;
                        static inline void RNDIS_Host_USBTask(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo)
                        {
                                (void)RNDISInterfaceInfo;
                                                                             const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1)
                                                                             ATTR_NON_NULL_PTR_ARG(2);
 
                                                                             const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1)
                                                                             ATTR_NON_NULL_PTR_ARG(2);
 
-                               static uint8_t DCOMP_RNDIS_Host_NextRNDISControlInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
-                               static uint8_t DCOMP_RNDIS_Host_NextRNDISDataInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
-                               static uint8_t DCOMP_RNDIS_Host_NextRNDISInterfaceEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_RNDIS_Host_NextRNDISControlInterface(void* const CurrentDescriptor)
+                                                                                         ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_RNDIS_Host_NextRNDISDataInterface(void* const CurrentDescriptor)
+                                                                                      ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_RNDIS_Host_NextRNDISInterfaceEndpoint(void* const CurrentDescriptor)
+                                                                                          ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
                        #endif
        #endif
 
                        #endif
        #endif
 
index 66266ef..2c5c6b1 100644 (file)
                         *
                         *  \param[in,out] SIInterfaceInfo  Pointer to a structure containing a Still Image Class host configuration and state.
                         */
                         *
                         *  \param[in,out] SIInterfaceInfo  Pointer to a structure containing a Still Image Class host configuration and state.
                         */
-                       static inline void SI_Host_USBTask(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
+                       static inline void SI_Host_USBTask(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
                        static inline void SI_Host_USBTask(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo)
                        {
                                (void)SIInterfaceInfo;
                        static inline void SI_Host_USBTask(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo)
                        {
                                (void)SIInterfaceInfo;
 
                /* Function Prototypes: */
                        #if defined(__INCLUDE_FROM_STILLIMAGE_HOST_C)
 
                /* Function Prototypes: */
                        #if defined(__INCLUDE_FROM_STILLIMAGE_HOST_C)
-                               static uint8_t DCOMP_SI_Host_NextSIInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
-                               static uint8_t DCOMP_SI_Host_NextSIInterfaceEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_SI_Host_NextSIInterface(void* const CurrentDescriptor)
+                                                                            ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
+                               static uint8_t DCOMP_SI_Host_NextSIInterfaceEndpoint(void* const CurrentDescriptor)
+                                                                                    ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(1);
                        #endif
        #endif
 
                        #endif
        #endif
 
index b5dc7e4..39b4cf7 100644 (file)
                        }
                
                        #if (USE_INTERNAL_SERIAL != NO_DESCRIPTOR)
                        }
                
                        #if (USE_INTERNAL_SERIAL != NO_DESCRIPTOR)
+                       static inline void USB_Device_GetSerialString(uint16_t* const UnicodeString) ATTR_NON_NULL_PTR_ARG(1);
                        static inline void USB_Device_GetSerialString(uint16_t* const UnicodeString)
                        {
                                uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
                        static inline void USB_Device_GetSerialString(uint16_t* const UnicodeString)
                        {
                                uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();
index efe0ef1..2d99722 100644 (file)
                         *  \return Boolean \c true if a pipe bound to the given endpoint address of the specified direction is found,
                         *          \c false otherwise.
                         */
                         *  \return Boolean \c true if a pipe bound to the given endpoint address of the specified direction is found,
                         *          \c false otherwise.
                         */
-                       bool Pipe_IsEndpointBound(const uint8_t EndpointAddress);
+                       bool Pipe_IsEndpointBound(const uint8_t EndpointAddress) ATTR_WARN_UNUSED_RESULT;
 
        /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
 
        /* Private Interface - For use in library only: */
        #if !defined(__DOXYGEN__)
index caa42e3..7ef439d 100644 (file)
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
                         */
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
                         */
-                       uint8_t USB_Host_GetDeviceDescriptor(void* const DeviceDescriptorPtr);
+                       uint8_t USB_Host_GetDeviceDescriptor(void* const DeviceDescriptorPtr) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Sends a GET DESCRIPTOR standard request to the attached device, requesting the string descriptor
                         *  of the specified index. This can be used to easily retrieve string descriptors from the device by
 
                        /** Sends a GET DESCRIPTOR standard request to the attached device, requesting the string descriptor
                         *  of the specified index. This can be used to easily retrieve string descriptors from the device by
                         */
                        uint8_t USB_Host_GetDeviceStringDescriptor(const uint8_t Index,
                                                                   void* const Buffer,
                         */
                        uint8_t USB_Host_GetDeviceStringDescriptor(const uint8_t Index,
                                                                   void* const Buffer,
-                                                                  const uint8_t BufferLength);
+                                                                  const uint8_t BufferLength) ATTR_NON_NULL_PTR_ARG(2);
 
                        /** Retrieves the current feature status of the attached device, via a GET STATUS standard request. The
                         *  retrieved feature status can then be examined by masking the retrieved value with the various
 
                        /** Retrieves the current feature status of the attached device, via a GET STATUS standard request. The
                         *  retrieved feature status can then be examined by masking the retrieved value with the various
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
                         */
                         *
                         *  \return A value from the \ref USB_Host_SendControlErrorCodes_t enum to indicate the result.
                         */
-                       uint8_t USB_Host_GetDeviceStatus(uint8_t* const FeatureStatus);
+                       uint8_t USB_Host_GetDeviceStatus(uint8_t* const FeatureStatus) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Clears a stall condition on the given pipe, via a CLEAR FEATURE standard request to the attached device.
                         *
 
                        /** Clears a stall condition on the given pipe, via a CLEAR FEATURE standard request to the attached device.
                         *
index 356606e..e5cadfe 100644 (file)
                                uint16_t wValue; /**< wValue parameter of the request. */
                                uint16_t wIndex; /**< wIndex parameter of the request. */
                                uint16_t wLength; /**< Length of the data to transfer in bytes. */
                                uint16_t wValue; /**< wValue parameter of the request. */
                                uint16_t wIndex; /**< wIndex parameter of the request. */
                                uint16_t wLength; /**< Length of the data to transfer in bytes. */
-                       } USB_Request_Header_t;
+                       } ATTR_PACKED USB_Request_Header_t;
 
                /* Enums: */
                        /** Enumeration for the various standard request commands. These commands are applicable when the
 
                /* Enums: */
                        /** Enumeration for the various standard request commands. These commands are applicable when the
index 5ed8661..55e4b0c 100644 (file)
                        }\r
 \r
                        #if (USE_INTERNAL_SERIAL != NO_DESCRIPTOR)\r
                        }\r
 \r
                        #if (USE_INTERNAL_SERIAL != NO_DESCRIPTOR)\r
+                       static inline void USB_Device_GetSerialString(uint16_t* const UnicodeString) ATTR_NON_NULL_PTR_ARG(1);\r
                        static inline void USB_Device_GetSerialString(uint16_t* const UnicodeString)\r
                        {\r
                                uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();\r
                        static inline void USB_Device_GetSerialString(uint16_t* const UnicodeString)\r
                        {\r
                                uint_reg_t CurrentGlobalInt = GetGlobalInterruptMask();\r
index c9f9eaa..ae8f036 100644 (file)
                         *  \return Boolean \c true if a pipe bound to the given endpoint address of the specified direction is found,\r
                         *          \c false otherwise.\r
                         */\r
                         *  \return Boolean \c true if a pipe bound to the given endpoint address of the specified direction is found,\r
                         *          \c false otherwise.\r
                         */\r
-                       bool Pipe_IsEndpointBound(const uint8_t EndpointAddress);\r
+                       bool Pipe_IsEndpointBound(const uint8_t EndpointAddress) ATTR_WARN_UNUSED_RESULT;\r
 \r
        /* Private Interface - For use in library only: */\r
        #if !defined(__DOXYGEN__)\r
 \r
        /* Private Interface - For use in library only: */\r
        #if !defined(__DOXYGEN__)\r