summaryrefslogtreecommitdiff
path: root/hid/src/ps2/hid.h
diff options
context:
space:
mode:
Diffstat (limited to 'hid/src/ps2/hid.h')
-rw-r--r--hid/src/ps2/hid.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/hid/src/ps2/hid.h b/hid/src/ps2/hid.h
index ec55b80a..db7247e4 100644
--- a/hid/src/ps2/hid.h
+++ b/hid/src/ps2/hid.h
@@ -25,6 +25,7 @@
#include <Arduino.h>
#include <ps2dev.h>
+#include "keyboard.h"
#include "keymap.h"
// #define HID_PS2_KBD_CLOCK_PIN 7
@@ -78,13 +79,13 @@ class Ps2Keyboard {
return false;
}
- uint8_t getLedsAs(uint8_t caps, uint8_t scroll, uint8_t num) {
- uint8_t result = 0;
+ KeyboardLedsState getLeds() {
+ KeyboardLedsState result;
periodic();
- if (_leds & 0b00000100) result |= caps;
- if (_leds & 0b00000001) result |= scroll;
- if (_leds & 0b00000010) result |= num;
+ result.caps = _leds & 0b00000100;
+ result.scroll = _leds & 0b00000001;
+ result.num = _leds & 0b00000010;
return result;
}