-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUSB.h
More file actions
33 lines (26 loc) · 778 Bytes
/
USB.h
File metadata and controls
33 lines (26 loc) · 778 Bytes
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
#ifndef _USB_H_
#define _USB_H_
#include <stdint.h>
#include <stdbool.h>
// Mock LUFA types
typedef struct {
uint8_t Modifier;
uint8_t Reserved;
uint8_t KeyCode[6];
} USB_KeyboardReport_Data_t;
typedef struct {
int dummy;
} USB_ClassInfo_HID_Device_t;
// Descriptor mocks
typedef struct { int d; } USB_Descriptor_Configuration_Header_t;
typedef struct { int d; } USB_Descriptor_Interface_t;
typedef struct { int d; } USB_HID_Descriptor_HID_t;
typedef struct { int d; } USB_Descriptor_Endpoint_t;
// LUFA / HID Constants
#define ENDPOINT_DIR_IN 1
#define ATTR_WARN_UNUSED_RESULT
#define ATTR_NON_NULL_PTR_ARG(x)
#define HID_KEYBOARD_SC_CAPS_LOCK 0x39
#define HID_KEYBOARD_MODIFIER_LEFTSHIFT (1 << 1)
#define HID_KEYBOARD_MODIFIER_RIGHTALT (1 << 6)
#endif