Add missing function attributes to the pipe/endpoint functions for all architectures.
Perform endianness correction in the HID report parser for big-endian platforms.
This commit is contained in:
parent
852b5e612d
commit
995195a2b0
14 changed files with 40 additions and 24 deletions
|
|
@ -127,6 +127,7 @@
|
|||
/** Returns the current USB frame number, when in device mode. Every millisecond the USB bus is active (i.e. enumerated to a host)
|
||||
* the frame number is incremented by one.
|
||||
*/
|
||||
static inline uint16_t USB_Device_GetFrameNumber(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint16_t USB_Device_GetFrameNumber(void)
|
||||
{
|
||||
return AVR32_USBB.UDFNUM.fnum;
|
||||
|
|
@ -179,7 +180,7 @@
|
|||
AVR32_USBB.UDCON.adden = true;
|
||||
}
|
||||
|
||||
static inline bool USB_Device_IsAddressSet(void) ATTR_ALWAYS_INLINE;
|
||||
static inline bool USB_Device_IsAddressSet(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
|
||||
static inline bool USB_Device_IsAddressSet(void)
|
||||
{
|
||||
return AVR32_USBB.UDCON.adden;
|
||||
|
|
|
|||
|
|
@ -402,6 +402,7 @@
|
|||
*
|
||||
* \return Total number of busy banks in the selected endpoint.
|
||||
*/
|
||||
static inline uint8_t Endpoint_GetBusyBanks(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint8_t Endpoint_GetBusyBanks(void)
|
||||
{
|
||||
return (&AVR32_USBB.UESTA0)[USB_SelectedEndpoint].nbusybk;
|
||||
|
|
|
|||
|
|
@ -141,6 +141,7 @@
|
|||
/** Returns the current USB frame number, when in host mode. Every millisecond the USB bus is active (i.e. not suspended)
|
||||
* the frame number is incremented by one.
|
||||
*/
|
||||
static inline uint16_t USB_Host_GetFrameNumber(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
|
||||
static inline uint16_t USB_Host_GetFrameNumber(void)
|
||||
{
|
||||
return AVR32_USBB_UHFNUM;
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@
|
|||
*
|
||||
* \return The current pipe token, as a \c PIPE_TOKEN_* mask.
|
||||
*/
|
||||
static inline uint8_t Pipe_GetPipeToken(void) ATTR_ALWAYS_INLINE;
|
||||
static inline uint8_t Pipe_GetPipeToken(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
|
||||
static inline uint8_t Pipe_GetPipeToken(void)
|
||||
{
|
||||
return (&AVR32_USBB.UPCFG0)[USB_SelectedPipe].ptoken;
|
||||
|
|
@ -451,6 +451,7 @@
|
|||
*
|
||||
* \return Total number of busy banks in the selected pipe.
|
||||
*/
|
||||
static inline uint8_t Pipe_GetBusyBanks(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
|
||||
static inline uint8_t Pipe_GetBusyBanks(void)
|
||||
{
|
||||
return (&AVR32_USBB.UPSTA0)[USB_SelectedPipe].nbusybk;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue