hid: prod and test envs

This commit is contained in:
Devaev Maxim 2019-04-24 00:42:30 +03:00
parent 94dc4e76b4
commit 87435dd5c5
3 changed files with 19 additions and 11 deletions

View File

@ -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

View File

@ -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 =
HID-Project@2.4.4
TimerOne@1.1
[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 =
HID-Project@2.4.4
TimerOne@1.1
[env:serial_test]
platform = atmelavr
board = micro
framework = arduino
upload_port = /dev/ttyACM0
lib_deps = ${common.lib_deps}
build_flags = -DCMD_SERIAL=Serial

View File

@ -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