diff options
author | Devaev Maxim <[email protected]> | 2020-11-19 23:28:23 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-11-20 00:15:18 +0300 |
commit | a77db72355c760eb38deb4c46a83fb7d3f2ed008 (patch) | |
tree | 208cd060c234fbfd77ef3c1879ed906950660bed /hid/platformio.ini | |
parent | 188de715153100806bc4a95f3888f6f03f1ede2f (diff) |
multihid firmware
Diffstat (limited to 'hid/platformio.ini')
-rw-r--r-- | hid/platformio.ini | 126 |
1 files changed, 34 insertions, 92 deletions
diff --git a/hid/platformio.ini b/hid/platformio.ini index 1f6bd069..87d4fe39 100644 --- a/hid/platformio.ini +++ b/hid/platformio.ini @@ -6,87 +6,51 @@ core_dir = ./.platformio/ platform = atmelavr board = micro framework = arduino +lib_deps = + git+https://github.com/Harvie/ps2dev#v0.0.3 extra_scripts = pre:avrdude.py post:patch.py platform_packages = tool-avrdude -[_parts_usb_kbd] -lib_deps = -build_flags = - -DHID_USB_KBD - -[_parts_usb_mouse] -lib_deps = -build_flags = - -DHID_USB_MOUSE - -[_parts_ps2_kbd] -lib_deps = - git+https://github.com/Harvie/ps2dev#v0.0.3 -build_flags = - -DHID_PS2_KBD - -DPS2_KBD_CLOCK_PIN=7 - -DPS2_KBD_DATA_PIN=5 - -[_usb] -lib_deps = - ${_parts_usb_kbd.lib_deps} -# ${_parts_usb_mouse.lib_deps} -build_flags = - ${_parts_usb_kbd.build_flags} - ${_parts_usb_mouse.build_flags} - -[_ps2] -lib_deps = - ${_parts_ps2_kbd.lib_deps} -build_flags = - ${_parts_ps2_kbd.build_flags} - -[_mixed] -lib_deps = - ${_parts_ps2_kbd.lib_deps} - ${_parts_usb_mouse.lib_deps} +[_common] build_flags = - ${_parts_ps2_kbd.build_flags} - ${_parts_usb_mouse.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 + -DHID_WITH_USB + -DHID_SET_USB_KBD + -DHID_SET_USB_MOUSE_ABS +# ----- PS2 keyboard only ----- +# -DHID_WITH_PS2 +# -DHID_SET_PS2_KBD +# ----- PS2 keyboard + USB absolute mouse ----- +# -DHID_WITH_USB +# -DHID_WITH_PS2 +# -DHID_SET_PS2_KBD +# -DHID_SET_USB_MOUSE_ABS +# ----- PS2 keyboard + USB relative mouse ----- +# -DHID_WITH_USB +# -DHID_WITH_PS2 +# -DHID_SET_PS2_KBD +# -DHID_SET_USB_MOUSE_REL # ===== Serial ===== -[_cmd_serial] +[env:serial] +extends = + _common build_flags = + ${_common.build_flags} -DCMD_SERIAL=Serial1 -DCMD_SERIAL_SPEED=115200 -DCMD_SERIAL_TIMEOUT=100000 upload_port = /dev/ttyACM0 -[env:usb] -extends = - _usb - _cmd_serial -build_flags = - ${_usb.build_flags} - ${_cmd_serial.build_flags} - -[env:ps2] -extends = - _ps2 - _cmd_serial -build_flags = - ${_ps2.build_flags} - ${_cmd_serial.build_flags} - -[env:mixed] -extends = - _mixed - _cmd_serial -build_flags = - ${_mixed.build_flags} - ${_cmd_serial.build_flags} - # ===== RPi SPI ===== [env:bootloader_spi] @@ -99,11 +63,13 @@ upload_flags = extra_scripts = pre:avrdude.py -[_cmd_spi] +[env:spi] +extends = + _common build_flags = + ${_common.build_flags} -DCMD_SPI - -DNO_SERIAL - -DCHECK_ENDPOINT + -DNO_USB_SERIAL upload_protocol = custom upload_flags = -C @@ -117,27 +83,3 @@ upload_flags = -p $BOARD_MCU upload_command = avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i - -[env:usb_spi] -extends = - _usb - _cmd_spi -build_flags = - ${_usb.build_flags} - ${_cmd_spi.build_flags} - -[env:ps2_spi] -extends = - _ps2 - _cmd_spi -build_flags = - ${_ps2.build_flags} - ${_cmd_spi.build_flags} - -[env:mixed_spi] -extends = - _mixed - _cmd_spi -build_flags = - ${_mixed.build_flags} - ${_cmd_spi.build_flags} |