summaryrefslogtreecommitdiff
path: root/hid/lib/drivers
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-07-11 02:12:38 +0300
committerMaxim Devaev <[email protected]>2022-07-11 02:12:38 +0300
commit89aff795fd7905aaf192428bb99814c13b98d5c2 (patch)
tree8f80c599f0c6f7d754f702f106c2e30d2fa60395 /hid/lib/drivers
parent1afd96cdb932ccb1df0f0ed7e6662080f2618a26 (diff)
refactoring
Diffstat (limited to 'hid/lib/drivers')
-rw-r--r--hid/lib/drivers/factory.h2
-rw-r--r--hid/lib/drivers/keyboard.h1
-rw-r--r--hid/lib/drivers/tools.cpp4
-rw-r--r--hid/lib/drivers/tools.h2
4 files changed, 6 insertions, 3 deletions
diff --git a/hid/lib/drivers/factory.h b/hid/lib/drivers/factory.h
index c787347a..0fb8e173 100644
--- a/hid/lib/drivers/factory.h
+++ b/hid/lib/drivers/factory.h
@@ -24,8 +24,8 @@
#include "keyboard.h"
#include "mouse.h"
-namespace DRIVERS {
+namespace DRIVERS {
struct Factory {
static Keyboard *makeKeyboard(type _type);
static Mouse *makeMouse(type _type);
diff --git a/hid/lib/drivers/keyboard.h b/hid/lib/drivers/keyboard.h
index 2e902818..49fd15de 100644
--- a/hid/lib/drivers/keyboard.h
+++ b/hid/lib/drivers/keyboard.h
@@ -64,6 +64,5 @@ namespace DRIVERS {
KeyboardLedsState result = {0};
return result;
}
-
};
}
diff --git a/hid/lib/drivers/tools.cpp b/hid/lib/drivers/tools.cpp
index 7f0e29ca..0220e5f0 100644
--- a/hid/lib/drivers/tools.cpp
+++ b/hid/lib/drivers/tools.cpp
@@ -19,7 +19,9 @@
# #
*****************************************************************************/
-#include <Arduino.h>
+
+#include "tools.h"
+
bool is_micros_timed_out(unsigned long start_ts, unsigned long timeout) {
unsigned long now = micros();
diff --git a/hid/lib/drivers/tools.h b/hid/lib/drivers/tools.h
index 0f11c7c3..00f0fd2a 100644
--- a/hid/lib/drivers/tools.h
+++ b/hid/lib/drivers/tools.h
@@ -22,5 +22,7 @@
#pragma once
+#include <Arduino.h>
+
bool is_micros_timed_out(unsigned long start_ts, unsigned long timeout);