fixed pinout, refactoring

This commit is contained in:
Devaev Maxim
2020-12-24 00:51:48 +03:00
parent 42475809fc
commit 5bcf2df687
3 changed files with 45 additions and 27 deletions

View File

@@ -9,6 +9,7 @@ framework = arduino
lib_deps =
HID-Project@2.6.1
git+https://github.com/Harvie/ps2dev#v0.0.3
digitalWriteFast@1.0.0
extra_scripts =
pre:avrdude.py
post:patch.py
@@ -17,8 +18,6 @@ platform_packages =
[_common]
build_flags =
-DHID_PS2_KBD_CLOCK_PIN=7
-DHID_PS2_KBD_DATA_PIN=5
-DHID_USB_CHECK_ENDPOINT
# ----- The default config with dynamic switching -----
-DHID_DYNAMIC
@@ -39,13 +38,20 @@ build_flags =
# -DHID_SET_PS2_KBD
# -DHID_SET_USB_MOUSE_REL
[_non_aum_pinout] =
build_flags =
-DHID_PS2_KBD_CLOCK_PIN=7
-DHID_PS2_KBD_DATA_PIN=5
# ===== Serial =====
[env:serial]
extends =
_common
_non_aum_pinout
build_flags =
${_common.build_flags}
${_non_aum_pinout.build_flags}
-DCMD_SERIAL=Serial1
-DCMD_SERIAL_SPEED=115200
-DCMD_SERIAL_TIMEOUT=100000
@@ -63,7 +69,7 @@ upload_flags =
extra_scripts =
pre:avrdude.py
[env:spi]
[_common_spi]
extends =
_common
build_flags =
@@ -84,12 +90,26 @@ upload_flags =
$BOARD_MCU
upload_command = avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i
[env:spi]
extends =
_common_spi
_non_aum_pinout
build_flags =
${_common_spi.build_flags}
${_non_aum_pinout.build_flags}
[env:aum]
extends =
env:spi
lib_deps =
${env:spi.lib_deps}
digitalWriteFast@1.0.0
_common_spi
build_flags =
${env:spi.build_flags}
${_common_spi.build_flags}
-DAUM
-DAUM_IS_USB_POWERED_PIN=A4
-DAUM_SET_USB_VBUS_PIN=11
-DAUM_SET_USB_CONNECTED_PIN=A5
-DHID_PS2_KBD_VBUS_PIN=8
-DHID_PS2_KBD_CLOCK_PIN=10
-DHID_PS2_KBD_DATA_PIN=5
-DHID_PS2_MOUSE_VBUS_PIN=6
-DHID_PS2_MOUSE_CLOCK_PIN=9
-DHID_PS2_MOUSE_DATA_PIN=13