Add keyboard/mbed_onekey
[tmk_keyboard.git] / keyboard / mbed_onekey / HIDKeyboard.h
1 #ifndef HIDKEYBOARD_H
2
3 #include "stdint.h"
4 #include "stdbool.h"
5 #include "USBHID.h"
6
7
8 typedef union {
9 uint8_t raw[8];
10 struct {
11 uint8_t mods;
12 uint8_t reserved;
13 uint8_t keys[6];
14 };
15 } __attribute__ ((packed)) report_keyboard_t;
16
17
18 class HIDKeyboard : public USBDevice {
19 public:
20 HIDKeyboard(uint16_t vendor_id = 0xFEED, uint16_t product_id = 0xabed, uint16_t product_release = 0x0001);
21
22 bool sendReport(report_keyboard_t report);
23 protected:
24 uint16_t reportLength;
25 virtual bool USBCallback_setConfiguration(uint8_t configuration);
26 virtual uint8_t * stringImanufacturerDesc();
27 virtual uint8_t * stringIproductDesc();
28 virtual uint8_t * stringIserialDesc();
29 virtual uint16_t reportDescLength();
30 virtual uint8_t * reportDesc();
31 virtual uint8_t * configurationDesc();
32 //virtual uint8_t * deviceDesc();
33 virtual bool USBCallback_request();
34 };
35
36 #endif
Imprint / Impressum