summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hid/patch.py14
-rw-r--r--hid/patches/arduino-get-plugged-endpoint.patch (renamed from hid/patches/get-plugged-endpoint.patch)0
-rw-r--r--hid/patches/arduino-no-main.patch17
-rw-r--r--hid/patches/arduino-optional-usb-serial.patch (renamed from hid/patches/optional-usb-serial.patch)0
-rw-r--r--hid/patches/hid-abs-mouse-win-fix.patch (renamed from hid/patches/absmouse-win-fix.patch)0
-rw-r--r--hid/patches/hid-boot-mouse-fix.patch (renamed from hid/patches/boot-mouse-fix.patch)4
-rw-r--r--hid/patches/hid-no-singletones.patch66
-rw-r--r--hid/patches/hid-shut-up.patch (renamed from hid/patches/shut-up.patch)0
-rw-r--r--hid/patches/no-hid-singletones.patch66
-rw-r--r--hid/patches/no-main.patch17
10 files changed, 92 insertions, 92 deletions
diff --git a/hid/patch.py b/hid/patch.py
index 772e0a35..292f653b 100644
--- a/hid/patch.py
+++ b/hid/patch.py
@@ -33,12 +33,12 @@ def _patch(path: str, patch_path: str) -> None:
# =====
-_patch(_get_pkg_path("framework-arduino-avr"), "patches/no-main.patch")
-_patch(_get_pkg_path("framework-arduino-avr"), "patches/optional-usb-serial.patch")
-_patch(_get_pkg_path("framework-arduino-avr"), "patches/get-plugged-endpoint.patch")
+_patch(_get_pkg_path("framework-arduino-avr"), "patches/arduino-no-main.patch")
+_patch(_get_pkg_path("framework-arduino-avr"), "patches/arduino-optional-usb-serial.patch")
+_patch(_get_pkg_path("framework-arduino-avr"), "patches/arduino-get-plugged-endpoint.patch")
_libs = _get_libs()
-_patch(_libs["HID-Project"], "patches/shut-up.patch")
-_patch(_libs["HID-Project"], "patches/no-hid-singletones.patch")
-_patch(_libs["HID-Project"], "patches/absmouse-win-fix.patch")
-_patch(_libs["HID-Project"], "patches/boot-mouse-fix.patch")
+_patch(_libs["HID-Project"], "patches/hid-shut-up.patch")
+_patch(_libs["HID-Project"], "patches/hid-no-singletones.patch")
+_patch(_libs["HID-Project"], "patches/hid-abs-mouse-win-fix.patch")
+_patch(_libs["HID-Project"], "patches/hid-boot-mouse-fix.patch")
diff --git a/hid/patches/get-plugged-endpoint.patch b/hid/patches/arduino-get-plugged-endpoint.patch
index c32131ff..c32131ff 100644
--- a/hid/patches/get-plugged-endpoint.patch
+++ b/hid/patches/arduino-get-plugged-endpoint.patch
diff --git a/hid/patches/arduino-no-main.patch b/hid/patches/arduino-no-main.patch
new file mode 100644
index 00000000..7dc1f81c
--- /dev/null
+++ b/hid/patches/arduino-no-main.patch
@@ -0,0 +1,17 @@
+diff -u -r a/cores/arduino/main.cpp b/cores/arduino/main.cpp
+--- a/cores/arduino/main.cpp 2019-05-16 15:52:01.000000000 +0300
++++ b/cores/arduino/main.cpp 2020-11-17 18:56:01.243474508 +0300
+@@ -30,6 +30,7 @@
+ void setupUSB() __attribute__((weak));
+ void setupUSB() { }
+
++/*
+ int main(void)
+ {
+ init();
+@@ -49,4 +50,5 @@
+
+ return 0;
+ }
++*/
+
diff --git a/hid/patches/optional-usb-serial.patch b/hid/patches/arduino-optional-usb-serial.patch
index 0d4a0b37..0d4a0b37 100644
--- a/hid/patches/optional-usb-serial.patch
+++ b/hid/patches/arduino-optional-usb-serial.patch
diff --git a/hid/patches/absmouse-win-fix.patch b/hid/patches/hid-abs-mouse-win-fix.patch
index ac2226a1..ac2226a1 100644
--- a/hid/patches/absmouse-win-fix.patch
+++ b/hid/patches/hid-abs-mouse-win-fix.patch
diff --git a/hid/patches/boot-mouse-fix.patch b/hid/patches/hid-boot-mouse-fix.patch
index f3fccc8b..e9381113 100644
--- a/hid/patches/boot-mouse-fix.patch
+++ b/hid/patches/hid-boot-mouse-fix.patch
@@ -1,6 +1,6 @@
index 27aee63..2d7d6c0 100644
---- HID-Project/src/SingleReport/BootMouse.cpp
-+++ _HID-Project/src/SingleReport/BootMouse.cpp
+--- a/src/SingleReport/BootMouse.cpp
++++ b/src/SingleReport/BootMouse.cpp
@@ -73,18 +73,23 @@ int BootMouse_::getInterface(uint8_t* interfaceCount)
int BootMouse_::getDescriptor(USBSetup& setup)
diff --git a/hid/patches/hid-no-singletones.patch b/hid/patches/hid-no-singletones.patch
new file mode 100644
index 00000000..85298448
--- /dev/null
+++ b/hid/patches/hid-no-singletones.patch
@@ -0,0 +1,66 @@
+diff -u -r a/src/SingleReport/BootKeyboard.cpp b/src/SingleReport/BootKeyboard.cpp
+--- a/src/SingleReport/BootKeyboard.cpp 2019-07-13 21:16:23.000000000 +0300
++++ b/src/SingleReport/BootKeyboard.cpp 2020-11-17 18:59:36.618815374 +0300
+@@ -206,6 +206,6 @@
+ }
+
+
+-BootKeyboard_ BootKeyboard;
++//BootKeyboard_ BootKeyboard;
+
+
+diff -u -r a/src/SingleReport/BootKeyboard.h b/src/SingleReport/BootKeyboard.h
+--- a/src/SingleReport/BootKeyboard.h 2019-07-13 21:16:23.000000000 +0300
++++ b/src/SingleReport/BootKeyboard.h 2020-11-17 19:00:54.967113649 +0300
+@@ -80,6 +80,6 @@
+ uint8_t* featureReport;
+ int featureLength;
+ };
+-extern BootKeyboard_ BootKeyboard;
++//extern BootKeyboard_ BootKeyboard;
+
+
+diff -u -r a/src/SingleReport/BootMouse.cpp b/src/SingleReport/BootMouse.cpp
+--- a/src/SingleReport/BootMouse.cpp 2019-07-13 21:16:23.000000000 +0300
++++ b/src/SingleReport/BootMouse.cpp 2020-11-17 18:59:22.859113905 +0300
+@@ -139,6 +139,6 @@
+ }
+ }
+
+-BootMouse_ BootMouse;
++//BootMouse_ BootMouse;
+
+
+diff -u -r a/src/SingleReport/BootMouse.h b/src/SingleReport/BootMouse.h
+--- a/src/SingleReport/BootMouse.h 2019-07-13 21:16:23.000000000 +0300
++++ b/src/SingleReport/BootMouse.h 2020-11-17 19:01:04.076915591 +0300
+@@ -48,6 +48,6 @@
+
+ virtual void SendReport(void* data, int length) override;
+ };
+-extern BootMouse_ BootMouse;
++//extern BootMouse_ BootMouse;
+
+
+diff -u -r a/src/SingleReport/SingleAbsoluteMouse.cpp b/src/SingleReport/SingleAbsoluteMouse.cpp
+--- a/src/SingleReport/SingleAbsoluteMouse.cpp 2020-11-17 18:39:35.314843889 +0300
++++ b/src/SingleReport/SingleAbsoluteMouse.cpp 2020-11-17 18:59:12.189345326 +0300
+@@ -139,6 +139,6 @@
+ USB_Send(pluggedEndpoint | TRANSFER_RELEASE, data, length);
+ }
+
+-SingleAbsoluteMouse_ SingleAbsoluteMouse;
++//SingleAbsoluteMouse_ SingleAbsoluteMouse;
+
+
+diff -u -r a/src/SingleReport/SingleAbsoluteMouse.h b/src/SingleReport/SingleAbsoluteMouse.h
+--- a/src/SingleReport/SingleAbsoluteMouse.h 2019-07-13 21:16:23.000000000 +0300
++++ b/src/SingleReport/SingleAbsoluteMouse.h 2020-11-17 19:01:21.356539808 +0300
+@@ -49,6 +49,6 @@
+
+ virtual inline void SendReport(void* data, int length) override;
+ };
+-extern SingleAbsoluteMouse_ SingleAbsoluteMouse;
++//extern SingleAbsoluteMouse_ SingleAbsoluteMouse;
+
+
diff --git a/hid/patches/shut-up.patch b/hid/patches/hid-shut-up.patch
index 2c05526a..2c05526a 100644
--- a/hid/patches/shut-up.patch
+++ b/hid/patches/hid-shut-up.patch
diff --git a/hid/patches/no-hid-singletones.patch b/hid/patches/no-hid-singletones.patch
deleted file mode 100644
index af971ea5..00000000
--- a/hid/patches/no-hid-singletones.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-diff -u -r HID-Project/src/SingleReport/BootKeyboard.cpp _HID-Project/src/SingleReport/BootKeyboard.cpp
---- HID-Project/src/SingleReport/BootKeyboard.cpp 2019-07-13 21:16:23.000000000 +0300
-+++ _HID-Project/src/SingleReport/BootKeyboard.cpp 2020-11-17 18:59:36.618815374 +0300
-@@ -206,6 +206,6 @@
- }
-
-
--BootKeyboard_ BootKeyboard;
-+//BootKeyboard_ BootKeyboard;
-
-
-diff -u -r HID-Project/src/SingleReport/BootKeyboard.h _HID-Project/src/SingleReport/BootKeyboard.h
---- HID-Project/src/SingleReport/BootKeyboard.h 2019-07-13 21:16:23.000000000 +0300
-+++ _HID-Project/src/SingleReport/BootKeyboard.h 2020-11-17 19:00:54.967113649 +0300
-@@ -80,6 +80,6 @@
- uint8_t* featureReport;
- int featureLength;
- };
--extern BootKeyboard_ BootKeyboard;
-+//extern BootKeyboard_ BootKeyboard;
-
-
-diff -u -r HID-Project/src/SingleReport/BootMouse.cpp _HID-Project/src/SingleReport/BootMouse.cpp
---- HID-Project/src/SingleReport/BootMouse.cpp 2019-07-13 21:16:23.000000000 +0300
-+++ _HID-Project/src/SingleReport/BootMouse.cpp 2020-11-17 18:59:22.859113905 +0300
-@@ -139,6 +139,6 @@
- }
- }
-
--BootMouse_ BootMouse;
-+//BootMouse_ BootMouse;
-
-
-diff -u -r HID-Project/src/SingleReport/BootMouse.h _HID-Project/src/SingleReport/BootMouse.h
---- HID-Project/src/SingleReport/BootMouse.h 2019-07-13 21:16:23.000000000 +0300
-+++ _HID-Project/src/SingleReport/BootMouse.h 2020-11-17 19:01:04.076915591 +0300
-@@ -48,6 +48,6 @@
-
- virtual void SendReport(void* data, int length) override;
- };
--extern BootMouse_ BootMouse;
-+//extern BootMouse_ BootMouse;
-
-
-diff -u -r HID-Project/src/SingleReport/SingleAbsoluteMouse.cpp _HID-Project/src/SingleReport/SingleAbsoluteMouse.cpp
---- HID-Project/src/SingleReport/SingleAbsoluteMouse.cpp 2020-11-17 18:39:35.314843889 +0300
-+++ _HID-Project/src/SingleReport/SingleAbsoluteMouse.cpp 2020-11-17 18:59:12.189345326 +0300
-@@ -139,6 +139,6 @@
- USB_Send(pluggedEndpoint | TRANSFER_RELEASE, data, length);
- }
-
--SingleAbsoluteMouse_ SingleAbsoluteMouse;
-+//SingleAbsoluteMouse_ SingleAbsoluteMouse;
-
-
-diff -u -r HID-Project/src/SingleReport/SingleAbsoluteMouse.h _HID-Project/src/SingleReport/SingleAbsoluteMouse.h
---- HID-Project/src/SingleReport/SingleAbsoluteMouse.h 2019-07-13 21:16:23.000000000 +0300
-+++ _HID-Project/src/SingleReport/SingleAbsoluteMouse.h 2020-11-17 19:01:21.356539808 +0300
-@@ -49,6 +49,6 @@
-
- virtual inline void SendReport(void* data, int length) override;
- };
--extern SingleAbsoluteMouse_ SingleAbsoluteMouse;
-+//extern SingleAbsoluteMouse_ SingleAbsoluteMouse;
-
-
diff --git a/hid/patches/no-main.patch b/hid/patches/no-main.patch
deleted file mode 100644
index 5c645480..00000000
--- a/hid/patches/no-main.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -u -r framework-arduino-avr/cores/arduino/main.cpp _framework-arduino-avr/cores/arduino/main.cpp
---- framework-arduino-avr/cores/arduino/main.cpp 2019-05-16 15:52:01.000000000 +0300
-+++ _framework-arduino-avr/cores/arduino/main.cpp 2020-11-17 18:56:01.243474508 +0300
-@@ -30,6 +30,7 @@
- void setupUSB() __attribute__((weak));
- void setupUSB() { }
-
-+/*
- int main(void)
- {
- init();
-@@ -49,4 +50,5 @@
-
- return 0;
- }
-+*/
-