wip: hid::RCMComposite: BootKeyboard -> 6KRO

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
wip/rcm-stm32
Gergely Nagy 3 years ago
parent f6a0489094
commit e77ff67486
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -23,7 +23,7 @@ namespace hid {
namespace rcmcomposite {
USBHID RCMHID;
HIDKeyboard RCMBootKeyboard(RCMHID, 1);
HIDKeyboard RCMKeyboard(RCMHID);
HIDConsumer RCMConsumer(RCMHID);
HIDMouse RCMMouse(RCMHID);
USBCompositeSerial CompositeSerial;

@ -35,7 +35,7 @@ extern USBHID RCMHID;
extern USBCompositeSerial CompositeSerial;
const uint8_t report_description_[] = {
HID_BOOT_KEYBOARD_REPORT_DESCRIPTOR(),
HID_KEYBOARD_REPORT_DESCRIPTOR(),
HID_CONSUMER_REPORT_DESCRIPTOR(),
HID_MOUSE_REPORT_DESCRIPTOR()
};

@ -27,56 +27,56 @@ namespace driver {
namespace hid {
namespace rcmcomposite {
extern HIDKeyboard RCMBootKeyboard;
extern HIDKeyboard RCMKeyboard;
extern HIDConsumer RCMConsumer;
class BootKeyboardWrapper {
class KeyboardWrapper {
public:
BootKeyboardWrapper() {}
KeyboardWrapper() {}
void begin() {}
uint8_t getProtocol() {
return 0;
return 1;
}
void setProtocol(uint8_t protocol) {}
void setDefaultProtocol(uint8_t protocol) {}
void sendReport() {
RCMBootKeyboard.sendReport();
RCMKeyboard.sendReport();
}
void press(uint8_t code) {
RCMBootKeyboard.press(code);
RCMKeyboard.press(code);
}
void release(uint8_t code) {
RCMBootKeyboard.release(code);
RCMKeyboard.release(code);
}
void releaseAll() {
RCMBootKeyboard.releaseAll();
RCMKeyboard.releaseAll();
}
bool isKeyPressed(uint8_t code) {
return RCMBootKeyboard.isKeyPressed(code);
return RCMKeyboard.isKeyPressed(code);
}
bool wasKeyPressed(uint8_t code) {
return RCMBootKeyboard.wasKeyPressed(code);
return RCMKeyboard.wasKeyPressed(code);
}
bool isModifierActive(uint8_t code) {
return RCMBootKeyboard.isModifierActive(code);
return RCMKeyboard.isModifierActive(code);
}
bool wasModifierActive(uint8_t code) {
return RCMBootKeyboard.wasModifierActive(code);
return RCMKeyboard.wasModifierActive(code);
}
bool isAnyModifierActive() {
return RCMBootKeyboard.isAnyModifierActive();
return RCMKeyboard.isAnyModifierActive();
}
bool wasAnyModifierActive() {
return RCMBootKeyboard.wasAnyModifierActive();
return RCMKeyboard.wasAnyModifierActive();
}
uint8_t getLeds() {
return RCMBootKeyboard.getLEDs();
return RCMKeyboard.getLEDs();
}
};
@ -103,7 +103,7 @@ class ConsumerControlWrapper {
};
struct KeyboardProps: public base::KeyboardProps {
typedef BootKeyboardWrapper BootKeyboard;
typedef KeyboardWrapper NKROKeyboard;
typedef ConsumerControlWrapper ConsumerControl;
};

Loading…
Cancel
Save