forked from mfulz_github/qmk_firmware
Add missing const qualifier to the parameters of the USB_GetNextDescriptorComp() function.
Reduce spacing of the structure elements in StdDescriptors.h to make the code more readable.
This commit is contained in:
parent
f9bcac5e00
commit
5f57785404
|
@ -114,7 +114,7 @@ void USB_GetNextDescriptorOfTypeAfter(uint16_t* const BytesRem,
|
|||
USB_GetNextDescriptorOfType(BytesRem, CurrConfigLoc, Type);
|
||||
}
|
||||
|
||||
uint8_t USB_GetNextDescriptorComp(uint16_t* BytesRem, void** const CurrConfigLoc, ConfigComparatorPtr_t const ComparatorRoutine)
|
||||
uint8_t USB_GetNextDescriptorComp(uint16_t* const BytesRem, void** const CurrConfigLoc, ConfigComparatorPtr_t const ComparatorRoutine)
|
||||
{
|
||||
uint8_t ErrorCode;
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@
|
|||
* }
|
||||
* \endcode
|
||||
*/
|
||||
uint8_t USB_GetNextDescriptorComp(uint16_t* BytesRem, void** const CurrConfigLoc, ConfigComparatorPtr_t const ComparatorRoutine);
|
||||
uint8_t USB_GetNextDescriptorComp(uint16_t* const BytesRem, void** const CurrConfigLoc, ConfigComparatorPtr_t const ComparatorRoutine);
|
||||
|
||||
/* Inline Functions: */
|
||||
/** Skips over the current sub-descriptor inside the configuration descriptor, so that the pointer then
|
||||
|
|
|
@ -421,9 +421,7 @@
|
|||
uint8_t SubClass; /**< Interface subclass ID. */
|
||||
uint8_t Protocol; /**< Interface protocol ID. */
|
||||
|
||||
uint8_t InterfaceStrIndex; /**< Index of the string descriptor describing the
|
||||
* interface.
|
||||
*/
|
||||
uint8_t InterfaceStrIndex; /**< Index of the string descriptor describing the interface. */
|
||||
} USB_Descriptor_Interface_t;
|
||||
|
||||
/** \brief Standard USB Interface Descriptor (USB-IF naming conventions).
|
||||
|
@ -524,20 +522,17 @@
|
|||
{
|
||||
USB_Descriptor_Header_t Header; /**< Descriptor header, including type and size. */
|
||||
|
||||
uint8_t EndpointAddress; /**< Logical address of the endpoint within the device
|
||||
* for the current configuration, including direction
|
||||
* mask.
|
||||
uint8_t EndpointAddress; /**< Logical address of the endpoint within the device for the current
|
||||
* configuration, including direction mask.
|
||||
*/
|
||||
uint8_t Attributes; /**< Endpoint attributes, comprised of a mask of the
|
||||
* endpoint type (EP_TYPE_*) and attributes (ENDPOINT_ATTR_*)
|
||||
* masks.
|
||||
uint8_t Attributes; /**< Endpoint attributes, comprised of a mask of the endpoint type (EP_TYPE_*)
|
||||
* and attributes (ENDPOINT_ATTR_*) masks.
|
||||
*/
|
||||
uint16_t EndpointSize; /**< Size of the endpoint bank, in bytes. This indicates the
|
||||
* maximum packet size that the endpoint can receive at a time.
|
||||
uint16_t EndpointSize; /**< Size of the endpoint bank, in bytes. This indicates the maximum packet
|
||||
* size that the endpoint can receive at a time.
|
||||
*/
|
||||
|
||||
uint8_t PollingIntervalMS; /**< Polling interval in milliseconds for the endpoint
|
||||
* if it is an INTERRUPT or ISOCHRONOUS type.
|
||||
uint8_t PollingIntervalMS; /**< Polling interval in milliseconds for the endpoint if it is an INTERRUPT
|
||||
* or ISOCHRONOUS type.
|
||||
*/
|
||||
} USB_Descriptor_Endpoint_t;
|
||||
|
||||
|
@ -552,22 +547,20 @@
|
|||
typedef struct
|
||||
{
|
||||
uint8_t bLength; /**< Size of the descriptor, in bytes. */
|
||||
uint8_t bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a value
|
||||
* given by the specific class.
|
||||
uint8_t bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t or a
|
||||
* value given by the specific class.
|
||||
*/
|
||||
uint8_t bEndpointAddress; /**< Logical address of the endpoint within the device
|
||||
* for the current configuration, including direction
|
||||
* mask.
|
||||
uint8_t bEndpointAddress; /**< Logical address of the endpoint within the device for the current
|
||||
* configuration, including direction mask.
|
||||
*/
|
||||
uint8_t bmAttributes; /**< Endpoint attributes, comprised of a mask of the
|
||||
* endpoint type (EP_TYPE_*) and attributes (ENDPOINT_ATTR_*)
|
||||
* masks.
|
||||
uint8_t bmAttributes; /**< Endpoint attributes, comprised of a mask of the endpoint type (EP_TYPE_*)
|
||||
* and attributes (ENDPOINT_ATTR_*) masks.
|
||||
*/
|
||||
uint16_t wMaxPacketSize; /**< Size of the endpoint bank, in bytes. This indicates the
|
||||
* maximum packet size that the endpoint can receive at a time.
|
||||
uint16_t wMaxPacketSize; /**< Size of the endpoint bank, in bytes. This indicates the maximum packet size
|
||||
* that the endpoint can receive at a time.
|
||||
*/
|
||||
uint8_t bInterval; /**< Polling interval in milliseconds for the endpoint
|
||||
* if it is an INTERRUPT or ISOCHRONOUS type.
|
||||
uint8_t bInterval; /**< Polling interval in milliseconds for the endpoint if it is an INTERRUPT or
|
||||
* ISOCHRONOUS type.
|
||||
*/
|
||||
} USB_StdDescriptor_Endpoint_t;
|
||||
|
||||
|
@ -618,20 +611,17 @@
|
|||
typedef struct
|
||||
{
|
||||
uint8_t bLength; /**< Size of the descriptor, in bytes. */
|
||||
uint8_t bDescriptorType; /**< Type of the descriptor, either a value in
|
||||
* \ref USB_DescriptorTypes_t or a value
|
||||
* given by the specific class.
|
||||
uint8_t bDescriptorType; /**< Type of the descriptor, either a value in \ref USB_DescriptorTypes_t
|
||||
* or a value given by the specific class.
|
||||
*/
|
||||
int16_t bString[]; /**< String data, as unicode characters (alternatively,
|
||||
* string language IDs). If normal ASCII characters are
|
||||
* to be used, they must be added as an array of characters
|
||||
* rather than a normal C string so that they are widened to
|
||||
int16_t bString[]; /**< String data, as unicode characters (alternatively, string language IDs).
|
||||
* If normal ASCII characters are to be used, they must be added as an array
|
||||
* of characters rather than a normal C string so that they are widened to
|
||||
* Unicode size.
|
||||
*
|
||||
* Under GCC, strings prefixed with the "L" character (before
|
||||
* the opening string quotation mark) are considered to be
|
||||
* Unicode strings, and may be used instead of an explicit
|
||||
* array of ASCII characters.
|
||||
* Under GCC, strings prefixed with the "L" character (before the opening string
|
||||
* quotation mark) are considered to be Unicode strings, and may be used instead
|
||||
* of an explicit array of ASCII characters.
|
||||
*/
|
||||
} USB_StdDescriptor_String_t;
|
||||
|
||||
|
|
Loading…
Reference in New Issue