It is unnecessary to pack a structure that consists only of uint8_t data fields.
This commit is contained in:
parent
bd9b548914
commit
0bb7af549a
@ -588,20 +588,19 @@ struct cdc_funcdesc_s
|
||||
|
||||
/* Table 26: Class-Specific Descriptor Header Format */
|
||||
|
||||
begin_packed_struct struct cdc_hdr_funcdesc_s
|
||||
struct cdc_hdr_funcdesc_s
|
||||
{
|
||||
uint8_t size; /* bFunctionLength, Size of this descriptor */
|
||||
uint8_t type; /* bDescriptorType, USB_DESC_TYPE_CSINTERFACE */
|
||||
uint8_t subtype; /* bDescriptorSubType, CDC_DSUBTYPE_HDR as defined in Table 25 */
|
||||
uint8_t cdc[2]; /* bcdCDC, USB Class Definitions for Communication Devices Specification
|
||||
* release number in binary-coded decimal.
|
||||
*/
|
||||
} end_packed_struct;
|
||||
* release number in binary-coded decimal. */
|
||||
};
|
||||
#define SIZEOF_HDR_FUNCDESC 5
|
||||
|
||||
/* Table 27: Call Management Functional Descriptor */
|
||||
|
||||
begin_packed_struct struct cdc_callmgmt_funcdesc_s
|
||||
struct cdc_callmgmt_funcdesc_s
|
||||
{
|
||||
uint8_t size; /* bFunctionLength, Size of this descriptor */
|
||||
uint8_t type; /* bDescriptorType, USB_DESC_TYPE_CSINTERFACE */
|
||||
@ -610,18 +609,18 @@ begin_packed_struct struct cdc_callmgmt_funcdesc_s
|
||||
uint8_t ifno; /* bDataInterface, Interface number of Data Class interface
|
||||
* optionally used for call management
|
||||
*/
|
||||
} end_packed_struct;
|
||||
};
|
||||
#define SIZEOF_CALLMGMT_FUNCDESC 5
|
||||
|
||||
/* Table 28: Abstract Control Management Functional Descriptor */
|
||||
|
||||
begin_packed_struct struct cdc_acm_funcdesc_s
|
||||
struct cdc_acm_funcdesc_s
|
||||
{
|
||||
uint8_t size; /* bFunctionLength, Size of this descriptor */
|
||||
uint8_t type; /* bDescriptorType, USB_DESC_TYPE_CSINTERFACE */
|
||||
uint8_t subtype; /* bDescriptorSubType, CDC_DSUBTYPE_ACM as defined in Table 25 */
|
||||
uint8_t caps; /* bmCapabilities: Bit encoded */
|
||||
} end_packed_struct;
|
||||
};
|
||||
#define SIZEOF_ACM_FUNCDESC 4
|
||||
|
||||
/* Table 29: Direct Line Management Functional Descriptor */
|
||||
@ -673,7 +672,7 @@ struct cdc_tcmc_funcdesc_s
|
||||
|
||||
/* Table 33: Union Interface Functional Descriptor */
|
||||
|
||||
begin_packed_struct struct cdc_union_funcdesc_s
|
||||
struct cdc_union_funcdesc_s
|
||||
{
|
||||
uint8_t size; /* bFunctionLength, Size of this descriptor */
|
||||
uint8_t type; /* bDescriptorType, USB_DESC_TYPE_CSINTERFACE */
|
||||
@ -685,7 +684,7 @@ begin_packed_struct struct cdc_union_funcdesc_s
|
||||
uint8_t slave[1]; /* bSlaveInterfaceN: Interface number of N slave or associated
|
||||
* interface in the union
|
||||
*/
|
||||
} end_packed_struct;
|
||||
};
|
||||
#define SIZEOF_UNION_FUNCDESC(n) ((n)+4)
|
||||
|
||||
/* Table 34: Country Selection Functional Descriptor */
|
||||
|
@ -120,7 +120,8 @@ extern "C"
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR void *composite_initialize(uint8_t numDevices, struct composite_devdesc_s * pDevices);
|
||||
FAR void *composite_initialize(uint8_t ndevices,
|
||||
FAR struct composite_devdesc_s *pdevices);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: composite_uninitialize
|
||||
|
@ -306,7 +306,7 @@ struct usb_devdesc_s
|
||||
|
||||
/* Configuration descriptor */
|
||||
|
||||
begin_packed_struct struct usb_cfgdesc_s
|
||||
struct usb_cfgdesc_s
|
||||
{
|
||||
uint8_t len; /* Descriptor length */
|
||||
uint8_t type; /* Descriptor type */
|
||||
@ -316,7 +316,7 @@ begin_packed_struct struct usb_cfgdesc_s
|
||||
uint8_t icfg; /* Configuration */
|
||||
uint8_t attr; /* Attributes */
|
||||
uint8_t mxpower; /* Max power (mA/2) */
|
||||
} end_packed_struct;
|
||||
};
|
||||
#define USB_SIZEOF_CFGDESC 9
|
||||
|
||||
struct usb_otherspeedconfigdesc_s
|
||||
@ -343,7 +343,7 @@ struct usb_strdesc_s
|
||||
|
||||
/* Interface descriptor */
|
||||
|
||||
begin_packed_struct struct usb_ifdesc_s
|
||||
struct usb_ifdesc_s
|
||||
{
|
||||
uint8_t len; /* Descriptor length */
|
||||
uint8_t type; /* Descriptor type */
|
||||
@ -354,12 +354,12 @@ begin_packed_struct struct usb_ifdesc_s
|
||||
uint8_t subclass; /* Interface sub-class */
|
||||
uint8_t protocol; /* Interface protocol */
|
||||
uint8_t iif; /* iInterface */
|
||||
} end_packed_struct;
|
||||
};
|
||||
#define USB_SIZEOF_IFDESC 9
|
||||
|
||||
/* Endpoint descriptor */
|
||||
|
||||
begin_packed_struct struct usb_epdesc_s
|
||||
struct usb_epdesc_s
|
||||
{
|
||||
uint8_t len; /* Descriptor length */
|
||||
uint8_t type; /* Descriptor type */
|
||||
@ -367,7 +367,7 @@ begin_packed_struct struct usb_epdesc_s
|
||||
uint8_t attr; /* Endpoint attributes */
|
||||
uint8_t mxpacketsize[2]; /* Maximum packet size */
|
||||
uint8_t interval; /* Interval */
|
||||
} end_packed_struct;
|
||||
};
|
||||
#define USB_SIZEOF_EPDESC 7
|
||||
|
||||
struct usb_audioepdesc_s
|
||||
@ -404,7 +404,7 @@ struct usb_qualdesc_s
|
||||
* interfaces.
|
||||
*/
|
||||
|
||||
begin_packed_struct struct usb_iaddesc_s
|
||||
struct usb_iaddesc_s
|
||||
{
|
||||
uint8_t len; /* Descriptor length */
|
||||
uint8_t type; /* Descriptor type */
|
||||
@ -414,7 +414,7 @@ begin_packed_struct struct usb_iaddesc_s
|
||||
uint8_t subclass; /* Sub-class code */
|
||||
uint8_t protocol; /* Protocol code */
|
||||
uint8_t ifunction; /* Index to string identifying the function */
|
||||
} end_packed_struct;
|
||||
};
|
||||
#define USB_SIZEOF_IADDESC 8
|
||||
|
||||
/************************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user