summaryrefslogtreecommitdiff
path: root/hid
diff options
context:
space:
mode:
Diffstat (limited to 'hid')
-rw-r--r--hid/Makefile8
-rw-r--r--hid/platformio.ini20
-rw-r--r--hid/src/main.cpp2
3 files changed, 19 insertions, 11 deletions
diff --git a/hid/Makefile b/hid/Makefile
index 957c3a11..391fae54 100644
--- a/hid/Makefile
+++ b/hid/Makefile
@@ -1,16 +1,14 @@
all:
- platformio run
+ platformio run --environment $(if $(E), $(E), serial_prod)
update:
platformio platform update
install: upload
upload:
- platformio run --target upload
-
-serial:
- platformio serialports monitor
+ platformio run --environment $(if $(E), $(E), serial_prod) --target upload
+clean-all: clean
clean:
rm -rf .pioenvs .piolibdeps
diff --git a/hid/platformio.ini b/hid/platformio.ini
index f70cd66c..1b3cbc43 100644
--- a/hid/platformio.ini
+++ b/hid/platformio.ini
@@ -8,13 +8,23 @@
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html
-[env:micro]
+[common]
+lib_deps =
+
+[env:serial_prod]
platform = atmelavr
board = micro
framework = arduino
upload_port = /dev/ttyACM0
-monitor_speed = 115200
+lib_deps = ${common.lib_deps}
+build_flags = -DCMD_SERIAL=Serial1
-lib_deps =
+[env:serial_test]
+platform = atmelavr
+board = micro
+framework = arduino
+upload_port = /dev/ttyACM0
+lib_deps = ${common.lib_deps}
+build_flags = -DCMD_SERIAL=Serial
diff --git a/hid/src/main.cpp b/hid/src/main.cpp
index 8f84fd1d..4d2b0c3c 100644
--- a/hid/src/main.cpp
+++ b/hid/src/main.cpp
@@ -28,7 +28,7 @@
#include "keymap.h"
-#define CMD_SERIAL Serial1
+// #define CMD_SERIAL Serial1
#define CMD_SERIAL_SPEED 115200
#define CMD_RECV_TIMEOUT 100000