-
Notifications
You must be signed in to change notification settings - Fork 7
/
hid.h
50 lines (36 loc) · 898 Bytes
/
hid.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
* Phoenix-RTOS
*
* USB Human Interface Device Class definitions
*
* Copyright 2020 Phoenix Systems
* Author: Hubert Buczynski
*
* This file is part of Phoenix-RTOS.
*
* %LICENSE%
*/
#ifndef _USB_HID_H_
#define _USB_HID_H_
#include <usb.h>
enum { hidOK = 0, eReport1, eReport2, eReport3, eReport4, eErase, eControlBlock };
typedef struct _usb_hid_dev_setup {
usb_device_desc_t dDevice;
usb_string_desc_t dStrMan;
usb_string_desc_t dStrProd;
} __attribute__((packed)) usb_hid_dev_setup_t;
typedef struct _usb_hid_desc_report {
uint8_t bLength;
uint8_t bType;
uint8_t wData[128];
} __attribute__((packed)) usb_hid_desc_report_t;
typedef struct _usb_hid_desc_t {
uint8_t bLength;
uint8_t bType;
uint16_t bcdHID;
uint8_t bCountryCode;
uint8_t bNumDescriptors;
uint8_t bDescriptorType;
uint16_t wDescriptorLength;
} __attribute__((packed)) usb_hid_desc_t;
#endif