diff options
author | Devaev Maxim <[email protected]> | 2019-04-24 00:42:30 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-04-24 00:45:19 +0300 |
commit | 87435dd5c5dea44a71606ae43601e91c6fb27f8d (patch) | |
tree | f57bfdd70bbedffb11dc646b289ceb587822fe44 /hid | |
parent | 94dc4e76b41f13ea4a3f1e924f258c953f829fcf (diff) |
hid: prod and test envs
Diffstat (limited to 'hid')
-rw-r--r-- | hid/Makefile | 8 | ||||
-rw-r--r-- | hid/platformio.ini | 20 | ||||
-rw-r--r-- | hid/src/main.cpp | 2 |
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 |