📄 usb_desc.h
字号:
/* Copyright (c) 2006 Nordic Semiconductor. All Rights Reserved.
*
* The information contained herein is confidential property of Nordic Semiconductor. The use,
* copying, transfer or disclosure of such information is prohibited except by express written
* agreement with Nordic Semiconductor.
*/
/** @file
* Definition of the USB configuration descriptor type
*
* @defgroup usb_descriptors USB descriptors
* @{
*/
#ifndef _USB_DESC_H_
#define _USB_DESC_H_
#include "nordic_common.h" // include SWAP macro
#include "f3xx_usb0_interruptserviceroutine.h"
#include "usb_standard_desc.h" // include standard USB descriptor structs
//------------------------------------------
// Vendor ID and Product ID definitions
//------------------------------------------
#define VID 0x1915
#define PID 0x0048
//---------------------------------------------
// HID Configuration Descriptor Type Definition
//---------------------------------------------
// From "USB Device Class Definition for Human Interface Devices (HID)".
// Section 7.1:
// "When a Get_Descriptor(Configuration) request is issued,
// it returns the Configuration descriptor, all Interface descriptors,
// all Endpoint descriptors, and the HID descriptor for each interface."
typedef code struct
{
configuration_desc hid_conf_desc;
interface_desc hid_interface_desc; // mouse
class_desc hid_class_desc;
endpoint_desc hid_ep_in_desc;
interface_desc hid_interface_desc_2; // keyb
class_desc hid_class_desc_2;
endpoint_desc hid_ep_in_desc_2;
interface_desc hid_interface_desc_3; // RC
class_desc hid_class_desc_3;
endpoint_desc hid_ep_in_desc_3;
} hid_conf_desc;
#define HID_REPORT_DESCRIPTOR_SIZE_MOUSE 0x0034 // WHEEL ADDED
#define HID_REPORT_DESCRIPTOR_SIZE_KEYB 0x002D
#define HID_REPORT_DESCRIPTOR_SIZE_RC 0x0058
#endif /* _USB_DESC_H_ */
/** @} */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -