1
0
tmk_keyboard/protocol/mbed/HIDKeyboard.h

32 lines
900 B
C
Raw Normal View History

2014-06-15 04:56:17 +00:00
#ifndef HIDKEYBOARD_H
#include "stdint.h"
#include "stdbool.h"
#include "USBHID.h"
2014-06-16 15:57:59 +00:00
#include "report.h"
2014-06-15 04:56:17 +00:00
class HIDKeyboard : public USBDevice {
public:
HIDKeyboard(uint16_t vendor_id = 0xFEED, uint16_t product_id = 0xabed, uint16_t product_release = 0x0001);
bool sendReport(report_keyboard_t report);
2014-06-20 05:39:49 +00:00
uint8_t leds(void);
2014-06-15 04:56:17 +00:00
protected:
uint16_t reportLength;
virtual bool USBCallback_setConfiguration(uint8_t configuration);
virtual uint8_t * stringImanufacturerDesc();
virtual uint8_t * stringIproductDesc();
virtual uint8_t * stringIserialDesc();
virtual uint16_t reportDescLength();
virtual uint8_t * reportDesc();
virtual uint8_t * configurationDesc();
//virtual uint8_t * deviceDesc();
virtual bool USBCallback_request();
2014-06-20 05:39:49 +00:00
virtual void USBCallback_requestCompleted(uint8_t * buf, uint32_t length);
private:
uint8_t led_state;
2014-06-15 04:56:17 +00:00
};
#endif