summaryrefslogtreecommitdiff
path: root/hid/src/usb
diff options
context:
space:
mode:
Diffstat (limited to 'hid/src/usb')
-rw-r--r--hid/src/usb/hid.h18
-rw-r--r--hid/src/usb/keymap.h4
-rw-r--r--hid/src/usb/keymap.h.mako4
3 files changed, 10 insertions, 16 deletions
diff --git a/hid/src/usb/hid.h b/hid/src/usb/hid.h
index b4523a6b..6b729323 100644
--- a/hid/src/usb/hid.h
+++ b/hid/src/usb/hid.h
@@ -24,8 +24,6 @@
#include <HID-Project.h>
-#include "../inline.h"
-
#include "keymap.h"
@@ -38,11 +36,11 @@ class UsbHidKeyboard {
BootKeyboard.begin();
}
- INLINE void reset() {
+ void reset() {
BootKeyboard.releaseAll();
}
- INLINE void sendKey(uint8_t code, bool state) {
+ void sendKey(uint8_t code, bool state) {
KeyboardKeycode usb_code = keymapUsb(code);
if (usb_code != KEY_ERROR_UNDEFINED) {
if (state) BootKeyboard.press(usb_code);
@@ -50,7 +48,7 @@ class UsbHidKeyboard {
}
}
- INLINE uint8_t getLedsAs(uint8_t caps, uint8_t scroll, uint8_t num) {
+ uint8_t getLedsAs(uint8_t caps, uint8_t scroll, uint8_t num) {
uint8_t leds = BootKeyboard.getLeds();
uint8_t result = 0;
@@ -69,11 +67,11 @@ class UsbHidMouse {
SingleAbsoluteMouse.begin();
}
- INLINE void reset() {
+ void reset() {
SingleAbsoluteMouse.releaseAll();
}
- INLINE void sendMouseButtons(
+ void sendMouseButtons(
bool left_select, bool left_state,
bool right_select, bool right_state,
bool middle_select, bool middle_state,
@@ -87,17 +85,17 @@ class UsbHidMouse {
if (down_select) _sendMouseButton(MOUSE_NEXT, down_state);
}
- INLINE void sendMouseMove(int x, int y) {
+ void sendMouseMove(int x, int y) {
SingleAbsoluteMouse.moveTo(x, y);
}
- INLINE void sendMouseWheel(int delta_y) {
+ void sendMouseWheel(int delta_y) {
// delta_x is not supported by hid-project now
SingleAbsoluteMouse.move(0, 0, delta_y);
}
private:
- INLINE void _sendMouseButton(uint8_t button, bool state) {
+ void _sendMouseButton(uint8_t button, bool state) {
if (state) SingleAbsoluteMouse.press(button);
else SingleAbsoluteMouse.release(button);
}
diff --git a/hid/src/usb/keymap.h b/hid/src/usb/keymap.h
index 35df2be4..1564b1f0 100644
--- a/hid/src/usb/keymap.h
+++ b/hid/src/usb/keymap.h
@@ -24,10 +24,8 @@
#include <HID-Project.h>
-#include "../inline.h"
-
-INLINE KeyboardKeycode keymapUsb(uint8_t code) {
+KeyboardKeycode keymapUsb(uint8_t code) {
switch (code) {
case 1: return KEY_A;
case 2: return KEY_B;
diff --git a/hid/src/usb/keymap.h.mako b/hid/src/usb/keymap.h.mako
index 8cd94fd9..a93d91a4 100644
--- a/hid/src/usb/keymap.h.mako
+++ b/hid/src/usb/keymap.h.mako
@@ -24,10 +24,8 @@
#include <HID-Project.h>
-#include "../inline.h"
-
<%! import operator %>
-INLINE KeyboardKeycode keymapUsb(uint8_t code) {
+KeyboardKeycode keymapUsb(uint8_t code) {
switch (code) {
% for km in sorted(keymap, key=operator.attrgetter("mcu_code")):
case ${km.mcu_code}: return ${km.arduino_name};