forked from mirror/qmk_firmware
Add missing "used" attribute to ATTR_INIT_SECTION to ensure functions declared with that meta-attribute are not discarded by the linker.
Add missing function and definition documentation.
This commit is contained in:
@@ -148,6 +148,8 @@
|
||||
/* Inline Functions: */
|
||||
/** 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.
|
||||
*
|
||||
* \return Current USB frame number from the USB controller.
|
||||
*/
|
||||
static inline uint16_t USB_Device_GetFrameNumber(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint16_t USB_Device_GetFrameNumber(void)
|
||||
|
||||
@@ -128,6 +128,8 @@
|
||||
/* Inline Functions: */
|
||||
/** 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.
|
||||
*
|
||||
* \return Current USB frame number from the USB controller.
|
||||
*/
|
||||
static inline uint16_t USB_Host_GetFrameNumber(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
|
||||
static inline uint16_t USB_Host_GetFrameNumber(void)
|
||||
|
||||
@@ -48,11 +48,18 @@ bool USB_Device_RemoteWakeupEnabled;
|
||||
|
||||
void USB_Device_ProcessControlRequest(void)
|
||||
{
|
||||
#if defined(ARCH_BIG_ENDIAN)
|
||||
USB_ControlRequest.bmRequestType = Endpoint_Read_8();
|
||||
USB_ControlRequest.bRequest = Endpoint_Read_8();
|
||||
USB_ControlRequest.wValue = Endpoint_Read_16_LE();
|
||||
USB_ControlRequest.wIndex = Endpoint_Read_16_LE();
|
||||
USB_ControlRequest.wLength = Endpoint_Read_16_LE();
|
||||
#else
|
||||
uint8_t* RequestHeader = (uint8_t*)&USB_ControlRequest;
|
||||
|
||||
for (uint8_t RequestHeaderByte = 0; RequestHeaderByte < sizeof(USB_Request_Header_t); RequestHeaderByte++)
|
||||
*(RequestHeader++) = Endpoint_Read_8();
|
||||
#endif
|
||||
|
||||
EVENT_USB_Device_ControlRequest();
|
||||
|
||||
|
||||
@@ -669,7 +669,7 @@
|
||||
{
|
||||
USB_Descriptor_Header_t Header; /**< Descriptor header, including type and size. */
|
||||
|
||||
#if ((ARCH == ARCH_AVR8) || (ARCH == ARCH_XMEGA))
|
||||
#if (((ARCH == ARCH_AVR8) || (ARCH == ARCH_XMEGA)) && !defined(__DOXYGEN__))
|
||||
wchar_t UnicodeString[];
|
||||
#else
|
||||
uint16_t UnicodeString[]; /**< String data, as unicode characters (alternatively,
|
||||
|
||||
@@ -145,6 +145,8 @@
|
||||
/* Inline Functions: */
|
||||
/** 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.
|
||||
*
|
||||
* \return Current USB frame number from the USB controller.
|
||||
*/
|
||||
static inline uint16_t USB_Device_GetFrameNumber(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint16_t USB_Device_GetFrameNumber(void)
|
||||
|
||||
@@ -129,6 +129,8 @@
|
||||
/* Inline Functions: */
|
||||
/** 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.
|
||||
*
|
||||
* \return Current USB frame number from the USB controller.
|
||||
*/
|
||||
static inline uint16_t USB_Host_GetFrameNumber(void) ATTR_WARN_UNUSED_RESULT ATTR_ALWAYS_INLINE;
|
||||
static inline uint16_t USB_Host_GetFrameNumber(void)
|
||||
|
||||
@@ -136,6 +136,8 @@
|
||||
/* Inline Functions: */
|
||||
/** 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.
|
||||
*
|
||||
* \return Current USB frame number from the USB controller.
|
||||
*/
|
||||
static inline uint16_t USB_Device_GetFrameNumber(void) ATTR_ALWAYS_INLINE ATTR_WARN_UNUSED_RESULT;
|
||||
static inline uint16_t USB_Device_GetFrameNumber(void)
|
||||
|
||||
Reference in New Issue
Block a user