summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hid/lib/drivers-avr/factory.cpp6
-rw-r--r--hid/lib/drivers-stm32/factory.cpp6
-rw-r--r--hid/lib/drivers/factory.h6
-rw-r--r--hid/src/main.cpp12
4 files changed, 16 insertions, 14 deletions
diff --git a/hid/lib/drivers-avr/factory.cpp b/hid/lib/drivers-avr/factory.cpp
index 3fc02582..8caf90fe 100644
--- a/hid/lib/drivers-avr/factory.cpp
+++ b/hid/lib/drivers-avr/factory.cpp
@@ -64,7 +64,7 @@ namespace DRIVERS {
}
}
- Storage* Factory::makeStorage(type _type) {
+ Storage *Factory::makeStorage(type _type) {
switch (_type) {
# ifdef HID_DYNAMIC
case NON_VOLATILE_STORAGE:
@@ -75,14 +75,14 @@ namespace DRIVERS {
}
}
- Board* Factory::makeBoard(type _type) {
+ Board *Factory::makeBoard(type _type) {
switch (_type) {
default:
return new Board(DRIVERS::DUMMY);
}
}
- Connection* Factory::makeConnection(type _type) {
+ Connection *Factory::makeConnection(type _type) {
# ifdef CMD_SERIAL
return new Serial();
# elif defined(CMD_SPI)
diff --git a/hid/lib/drivers-stm32/factory.cpp b/hid/lib/drivers-stm32/factory.cpp
index 010eb507..39ca4dae 100644
--- a/hid/lib/drivers-stm32/factory.cpp
+++ b/hid/lib/drivers-stm32/factory.cpp
@@ -64,7 +64,7 @@ namespace DRIVERS {
}
}
- Storage* Factory::makeStorage(type _type) {
+ Storage *Factory::makeStorage(type _type) {
switch (_type) {
# ifdef HID_DYNAMIC
case NON_VOLATILE_STORAGE:
@@ -75,7 +75,7 @@ namespace DRIVERS {
}
}
- Board* Factory::makeBoard(type _type) {
+ Board *Factory::makeBoard(type _type) {
switch (_type) {
case BOARD:
return new BoardStm32();
@@ -84,7 +84,7 @@ namespace DRIVERS {
}
}
- Connection* Factory::makeConnection(type _type) {
+ Connection *Factory::makeConnection(type _type) {
# ifdef CMD_SERIAL
return new Serial();
# else
diff --git a/hid/lib/drivers/factory.h b/hid/lib/drivers/factory.h
index 8dcfd571..e77fee75 100644
--- a/hid/lib/drivers/factory.h
+++ b/hid/lib/drivers/factory.h
@@ -32,8 +32,8 @@ namespace DRIVERS {
struct Factory {
static Keyboard *makeKeyboard(type _type);
static Mouse *makeMouse(type _type);
- static Storage* makeStorage(type _type);
- static Board* makeBoard(type _type);
- static Connection* makeConnection(type _type);
+ static Storage *makeStorage(type _type);
+ static Board *makeBoard(type _type);
+ static Connection *makeConnection(type _type);
};
}
diff --git a/hid/src/main.cpp b/hid/src/main.cpp
index 63e776f1..72f3ae26 100644
--- a/hid/src/main.cpp
+++ b/hid/src/main.cpp
@@ -24,19 +24,21 @@
#include "tools.h"
#include "proto.h"
+#include "board.h"
+#include "outputs.h"
#ifdef AUM
# include "aum.h"
#endif
-#include "board.h"
-#include "outputs.h"
-static DRIVERS::Connection* _conn;
-static DRIVERS::Board* _board;
+
+static DRIVERS::Connection *_conn;
+static DRIVERS::Board *_board;
static Outputs _out;
+
#ifdef HID_DYNAMIC
+# define RESET_TIMEOUT 500000
static bool _reset_required = false;
static unsigned long _reset_timestamp;
-# define RESET_TIMEOUT 500000
#endif