summaryrefslogtreecommitdiff
path: root/hid/lib
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-07-09 23:00:13 +0300
committerMaxim Devaev <[email protected]>2022-07-09 23:00:13 +0300
commitad6a387941012e5c54b1f6e977e4bc5425f9be5d (patch)
treeb45b8e95fcac482cf29b85da72eac21f215761e0 /hid/lib
parent38fae01cc01a0e984f52c004ade79256d8c90e17 (diff)
refactoring
Diffstat (limited to 'hid/lib')
-rw-r--r--hid/lib/drivers/driver.h3
-rw-r--r--hid/lib/drivers/keyboard.h11
-rw-r--r--hid/lib/drivers/mouse.h4
3 files changed, 12 insertions, 6 deletions
diff --git a/hid/lib/drivers/driver.h b/hid/lib/drivers/driver.h
index ea209c2e..e720f7ac 100644
--- a/hid/lib/drivers/driver.h
+++ b/hid/lib/drivers/driver.h
@@ -19,12 +19,13 @@
# #
*****************************************************************************/
+
#pragma once
#include <stdint.h>
-namespace DRIVERS {
+namespace DRIVERS {
enum type {
DUMMY = 0,
USB_MOUSE_ABSOLUTE,
diff --git a/hid/lib/drivers/keyboard.h b/hid/lib/drivers/keyboard.h
index 39517f68..2e902818 100644
--- a/hid/lib/drivers/keyboard.h
+++ b/hid/lib/drivers/keyboard.h
@@ -19,20 +19,21 @@
# #
*****************************************************************************/
+
#pragma once
#include <stdint.h>
+
#include "driver.h"
-namespace DRIVERS {
+namespace DRIVERS {
typedef struct {
bool caps;
bool scroll;
bool num;
} KeyboardLedsState;
-
struct Keyboard : public Driver {
using Driver::Driver;
@@ -55,10 +56,12 @@ namespace DRIVERS {
/**
* False if online or unknown. Otherwise true.
*/
- virtual bool isOffline() { return false; }
+ virtual bool isOffline() {
+ return false;
+ }
virtual KeyboardLedsState getLeds() {
- KeyboardLedsState result = {};
+ KeyboardLedsState result = {0};
return result;
}
diff --git a/hid/lib/drivers/mouse.h b/hid/lib/drivers/mouse.h
index 3ec29ee9..e9092bc5 100644
--- a/hid/lib/drivers/mouse.h
+++ b/hid/lib/drivers/mouse.h
@@ -19,13 +19,15 @@
# #
*****************************************************************************/
+
#pragma once
#include <stdint.h>
+
#include "driver.h"
-namespace DRIVERS {
+namespace DRIVERS {
class Mouse : public Driver {
using Driver::Driver;
};