2021-10-15 20:54:47 +00:00
|
|
|
#ifndef USBD_DESCRIPTORS_H
|
|
|
|
#define USBD_DESCRIPTORS_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#define USB_HID_CUSTOM_CONFIG_DESC_SIZ 34U
|
2021-10-28 18:16:54 +00:00
|
|
|
#define USB_HID_CUSTOM_DESC_SIZ 9U
|
|
|
|
#define USB_LEN_DEV_QUALIFIER_DESC 0x0AU
|
2021-10-15 20:54:47 +00:00
|
|
|
|
2021-10-28 18:16:54 +00:00
|
|
|
#define HID_DESCRIPTOR_TYPE 0x21
|
2021-10-15 20:54:47 +00:00
|
|
|
|
|
|
|
#ifndef HID_HS_BINTERVAL
|
2021-10-28 18:16:54 +00:00
|
|
|
#define HID_HS_BINTERVAL 0x07U
|
2021-10-15 20:54:47 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef HID_FS_BINTERVAL
|
2021-10-28 18:16:54 +00:00
|
|
|
#define HID_FS_BINTERVAL 0x0AU
|
2021-10-15 20:54:47 +00:00
|
|
|
#endif
|
|
|
|
|
2021-10-28 18:16:54 +00:00
|
|
|
#define HID_CUSTOM_INTERFACE 0x00U
|
|
|
|
#define HID_CUSTOM_EPIN_ADDR 0x81U
|
|
|
|
#define HID_CUSTOM_EPIN_SIZE 0x08U
|
2021-10-15 20:54:47 +00:00
|
|
|
|
|
|
|
// USB HID device FS Configuration Descriptor
|
|
|
|
extern uint8_t USBD_HID_CUSTOM_CfgFSDesc[USB_HID_CUSTOM_CONFIG_DESC_SIZ];
|
|
|
|
|
|
|
|
// USB HID device HS Configuration Descriptor
|
|
|
|
extern uint8_t USBD_HID_CUSTOM_CfgHSDesc[USB_HID_CUSTOM_CONFIG_DESC_SIZ];
|
|
|
|
|
|
|
|
// USB HID device Other Speed Configuration Descriptor
|
|
|
|
extern uint8_t USBD_HID_CUSTOM_OtherSpeedCfgDesc[USB_HID_CUSTOM_CONFIG_DESC_SIZ];
|
|
|
|
|
|
|
|
// USB HID device Configuration Descriptor
|
|
|
|
extern uint8_t USBD_HID_CUSTOM_Desc[USB_HID_CUSTOM_DESC_SIZ];
|
|
|
|
|
|
|
|
// USB Standard Device Descriptor
|
|
|
|
extern uint8_t USBD_HID_DeviceQualifierDesc[USB_LEN_DEV_QUALIFIER_DESC];
|
|
|
|
|
|
|
|
#endif
|