diff options
Diffstat (limited to 'hid/patch.py')
-rw-r--r-- | hid/patch.py | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/hid/patch.py b/hid/patch.py index 3bc73de0..c7674759 100644 --- a/hid/patch.py +++ b/hid/patch.py @@ -34,11 +34,16 @@ def _patch(path: str, patch_path: str) -> None: # ===== -_patch(_get_pkg_path("framework-arduino-avr"), "patches/arduino-main-no-usb.patch") -_patch(_get_pkg_path("framework-arduino-avr"), "patches/arduino-optional-cdc.patch") -_patch(_get_pkg_path("framework-arduino-avr"), "patches/arduino-get-plugged-endpoint.patch") - -_libs = _get_libs() -_patch(_libs["HID-Project"], "patches/hid-shut-up.patch") -_patch(_libs["HID-Project"], "patches/hid-no-singletones.patch") -_patch(_libs["HID-Project"], "patches/hid-win98.patch") +if env.GetProjectOption("platform") == "ststm32": + _patch(_get_pkg_path("framework-arduinoststm32-maple"), "patches/platformio-stm32f1-no-serial-usb.patch") +elif env.GetProjectOption("platform") == "atmelavr": + _patch(_get_pkg_path("framework-arduino-avr"), "patches/arduino-main-no-usb.patch") + _patch(_get_pkg_path("framework-arduino-avr"), "patches/arduino-optional-cdc.patch") + _patch(_get_pkg_path("framework-arduino-avr"), "patches/arduino-get-plugged-endpoint.patch") + + _libs = _get_libs() + _patch(_libs["HID-Project"], "patches/hid-shut-up.patch") + _patch(_libs["HID-Project"], "patches/hid-no-singletones.patch") + _patch(_libs["HID-Project"], "patches/hid-win98.patch") +else: + assert(False) |