usb: Cleanup for multiplied defines
Some of defines are present in several header files. Those defines are the same with value but with different naming. Common defines are brought to usb_common.h Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
This commit is contained in:
parent
44c947ec3e
commit
c1f5e11bb6
8 changed files with 18 additions and 33 deletions
|
@ -39,13 +39,6 @@
|
|||
*/
|
||||
#define DATA_INTERFACE_CLASS 0x0A
|
||||
|
||||
/**
|
||||
* @brief Values for the bDescriptorType Field
|
||||
* @note CDC120-20101103-track.pdf, 5.2.3, Table 12
|
||||
*/
|
||||
#define CS_INTERFACE 0x24
|
||||
#define CS_ENDPOINT 0x25
|
||||
|
||||
/**
|
||||
* @brief bDescriptor SubType for Communications
|
||||
* Class Functional Descriptors
|
||||
|
|
|
@ -65,10 +65,14 @@
|
|||
#define USB_INTERFACE_DESC 0x04
|
||||
#define USB_ENDPOINT_DESC 0x05
|
||||
#define USB_DEVICE_QUAL_DESC 0x06
|
||||
#define USB_OTHER_SPEED 0x07
|
||||
#define USB_INTERFACE_POWER 0x08
|
||||
#define USB_INTERFACE_ASSOC_DESC 0x0B
|
||||
#define USB_DEVICE_CAPABILITY_DESC 0x10
|
||||
#define USB_HID_DESC 0x21
|
||||
#define USB_HID_REPORT_DESC 0x22
|
||||
#define CS_INTERFACE 0x24
|
||||
#define CS_ENDPOINT 0x25
|
||||
#define USB_DFU_FUNCTIONAL_DESC 0x21
|
||||
#define USB_ASSOCIATION_DESC 0x0B
|
||||
#define USB_BINARY_OBJECT_STORE_DESC 0x0F
|
||||
|
|
|
@ -84,18 +84,6 @@ struct usb_desc_header {
|
|||
u8_t bDescriptorType; /**< descriptor type */
|
||||
};
|
||||
|
||||
#define DESC_DEVICE 1
|
||||
#define DESC_CONFIGURATION 2
|
||||
#define DESC_STRING 3
|
||||
#define DESC_INTERFACE 4
|
||||
#define DESC_ENDPOINT 5
|
||||
#define DESC_DEVICE_QUALIFIER 6
|
||||
#define DESC_OTHER_SPEED 7
|
||||
#define DESC_INTERFACE_POWER 8
|
||||
|
||||
#define CS_INTERFACE 0x24
|
||||
#define CS_ENDPOINT 0x25
|
||||
|
||||
#define GET_DESC_TYPE(x) (((x)>>8)&0xFF)
|
||||
#define GET_DESC_INDEX(x) ((x)&0xFF)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue