USBD ROM Stack  2.0
ROM based USB device stack
mw_usbd_desc.h
1 /***********************************************************************
2  * $Id:: mw_usbd_desc.h 2219 2015-12-08 22:18:38Z usb00423 $
3  *
4  * Project: USB device ROM Stack
5  *
6  * Description:
7  * USB Descriptors Definitions.
8  *
9  ***********************************************************************
10  * Copyright(C) 2011, NXP Semiconductor
11  * All rights reserved.
12  *
13  * Software that is described herein is for illustrative purposes only
14  * which provides customers with programming information regarding the
15  * products. This software is supplied "AS IS" without any warranties.
16  * NXP Semiconductors assumes no responsibility or liability for the
17  * use of the software, conveys no license or title under any patent,
18  * copyright, or mask work right to the product. NXP Semiconductors
19  * reserves the right to make changes in the software without
20  * notification. NXP Semiconductors also make no representation or
21  * warranty that such application will be suitable for the specified
22  * use without further testing or modification.
23  **********************************************************************/
24 
25 #ifndef __USBDESC_H__
26 #define __USBDESC_H__
27 
28 #include "mw_usbd.h"
29 
30 #define WBVAL(x) ((x) & 0xFF), (((x) >> 8) & 0xFF)
31 #define B3VAL(x) ((x) & 0xFF), (((x) >> 8) & 0xFF), (((x) >> 16) & 0xFF)
32 
33 #define USB_DEVICE_DESC_SIZE (sizeof(USB_DEVICE_DESCRIPTOR))
34 #define USB_CONFIGURATION_DESC_SIZE (sizeof(USB_CONFIGURATION_DESCRIPTOR))
35 #define USB_INTERFACE_DESC_SIZE (sizeof(USB_INTERFACE_DESCRIPTOR))
36 #define USB_ENDPOINT_DESC_SIZE (sizeof(USB_ENDPOINT_DESCRIPTOR))
37 #define USB_DEVICE_QUALI_SIZE (sizeof(USB_DEVICE_QUALIFIER_DESCRIPTOR))
38 #define USB_OTHER_SPEED_CONF_SIZE (sizeof(USB_OTHER_SPEED_CONFIGURATION))
39 #define USB_BOS_DESC_SIZE (sizeof(USB_BOS_DESCRIPTOR))
40 #define USB_SS_DEVICE_CAPABILITY_SIZE (sizeof(USB_SS_DEVICE_CAPABILITY_DESCRIPTOR))
41 #define USB_DEVICE_CAPABILITY_SIZE (sizeof(USB_DEVICE_CAPABILITY_DESCRIPTOR))
42 
43 #define HID_DESC_SIZE (sizeof(HID_DESCRIPTOR))
44 #define HID_REPORT_DESC_SIZE (sizeof(HID_ReportDescriptor))
45 
46 extern const uint8_t HID_ReportDescriptor[];
47 extern const uint16_t HID_ReportDescSize;
48 extern const uint16_t HID_DescOffset;
49 
50 #endif /* __USBDESC_H__ */
Common definitions and declarations for the USB stack.