summaryrefslogtreecommitdiff
path: root/hid/platformio-avr.ini
diff options
context:
space:
mode:
authortomaszduda23 <[email protected]>2022-07-14 09:45:01 +0900
committerGitHub <[email protected]>2022-07-14 03:45:01 +0300
commit6772d3425dc7c8d853eb3e437f02042de9947340 (patch)
tree32f7401c7c3a4c9cdf8178f3615fe155d5cf5e79 /hid/platformio-avr.ini
parent1973a1e6e0b7962d0c6e9ad54f41d078923e43d3 (diff)
move platformio.ini -> platformio-avr.ini (#105)
Diffstat (limited to 'hid/platformio-avr.ini')
-rw-r--r--hid/platformio-avr.ini119
1 files changed, 119 insertions, 0 deletions
diff --git a/hid/platformio-avr.ini b/hid/platformio-avr.ini
new file mode 100644
index 00000000..8484ef50
--- /dev/null
+++ b/hid/platformio-avr.ini
@@ -0,0 +1,119 @@
+# http://docs.platformio.org/page/projectconf.html
+[platformio]
+core_dir = ./.platformio/
+
+[env]
+platform = atmelavr
+board = micro
+framework = arduino
+lib_deps =
+ git+https://github.com/NicoHood/HID#2.8.2
+ git+https://github.com/Harvie/ps2dev#v0.0.3
+ drivers-avr
+extra_scripts =
+ pre:avrdude.py
+ post:patch.py
+platform_packages =
+ tool-avrdude
+
+[_common]
+build_flags =
+ -DHID_USB_CHECK_ENDPOINT
+# ----- The default config with dynamic switching -----
+ -DHID_DYNAMIC
+ -DHID_WITH_USB
+ -DHID_SET_USB_KBD
+ -DHID_SET_USB_MOUSE_ABS
+# ----- The USB ABS fix for Windows 98 (https://github.com/pikvm/pikvm/issues/159) -----
+# -DHID_WITH_USB_WIN98
+# ----- 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
+
+[_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
+upload_port = /dev/ttyACM0
+
+
+# ===== RPi SPI =====
+[env:bootloader_spi]
+upload_protocol = rpi
+upload_flags =
+ -C
+ +avrdude-rpi.conf
+ -P
+ /dev/spidev0.0:/dev/gpiochip0
+extra_scripts =
+ pre:avrdude.py
+
+[_common_spi]
+extends =
+ _common
+build_flags =
+ ${_common.build_flags}
+ -DCMD_SPI
+ -DCDC_DISABLED
+upload_protocol = custom
+upload_flags =
+ -C
+ $PROJECT_PACKAGES_DIR/tool-avrdude/avrdude.conf
+ -C
+ +avrdude-rpi.conf
+ -P
+ /dev/spidev0.0:/dev/gpiochip0
+ -c
+ rpi
+ -p
+ $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 =
+ _common_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