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: all:
platformio run platformio run --environment $(if $(E), $(E), serial_prod)
update: update:
platformio platform update platformio platform update
install: upload install: upload
upload: upload:
platformio run --target upload platformio run --environment $(if $(E), $(E), serial_prod) --target upload
serial:
platformio serialports monitor
clean-all: clean
clean: clean:
rm -rf .pioenvs .piolibdeps rm -rf .pioenvs .piolibdeps

View File

@ -8,13 +8,23 @@
; Please visit documentation for the other options and examples ; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html ; 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 platform = atmelavr
board = micro board = micro
framework = arduino framework = arduino
upload_port = /dev/ttyACM0 upload_port = /dev/ttyACM0
monitor_speed = 115200 lib_deps = ${common.lib_deps}
build_flags = -DCMD_SERIAL=Serial1
lib_deps = [env:serial_test]
HID-Project@2.4.4 platform = atmelavr
TimerOne@1.1 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" #include "keymap.h"
#define CMD_SERIAL Serial1 // #define CMD_SERIAL Serial1
#define CMD_SERIAL_SPEED 115200 #define CMD_SERIAL_SPEED 115200
#define CMD_RECV_TIMEOUT 100000 #define CMD_RECV_TIMEOUT 100000