Add missing function attributes.

This commit is contained in:
Dean Camera 2011-07-12 05:13:31 +00:00
parent 065ed4da20
commit 7207b05695
16 changed files with 80 additions and 47 deletions

View file

@ -212,6 +212,7 @@
}
#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();

View file

@ -877,7 +877,7 @@
* \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__)

View file

@ -132,7 +132,7 @@
*
* \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
@ -151,7 +151,7 @@
*/
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
@ -165,7 +165,7 @@
*
* \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.
*

View file

@ -167,7 +167,7 @@
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

View file

@ -198,6 +198,7 @@
}
#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();

View file

@ -877,7 +877,7 @@
* \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__)