mirror of
https://github.com/clockworkpi/DevTerm.git
synced 2026-03-20 02:42:41 +01:00
add patch for keyboard
This commit is contained in:
24
Code/patch/keyboard/arduino.patch
Normal file
24
Code/patch/keyboard/arduino.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
diff --git a/packages/stm32duino/hardware/STM32F1/2022.9.26/libraries/USBComposite/USBCompositeSerial.cpp b/packages/stm32duino/hardware/STM32F1/2022.9.26/libraries/USBComposite/USBCompositeSerial.cpp
|
||||
index 08349a7..c3ab02f 100644
|
||||
--- a/packages/stm32duino/hardware/STM32F1/2022.9.26/libraries/USBComposite/USBCompositeSerial.cpp
|
||||
+++ b/packages/stm32duino/hardware/STM32F1/2022.9.26/libraries/USBComposite/USBCompositeSerial.cpp
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <libmaple/usb.h>
|
||||
#include <string.h>
|
||||
#include <libmaple/iwdg.h>
|
||||
-
|
||||
+#include <libmaple/bkp.h>
|
||||
#include "usb_composite_serial.h"
|
||||
|
||||
#define USB_TIMEOUT 50
|
||||
@@ -208,6 +208,10 @@ static void ifaceSetupHook(unsigned hook, void *requestvp) {
|
||||
|
||||
#define RESET_DELAY 100000
|
||||
static void wait_reset(void) {
|
||||
+ bkp_init();
|
||||
+ bkp_enable_writes();
|
||||
+ bkp_write(10, 0x424C);
|
||||
+ bkp_disable_writes();
|
||||
delay_us(RESET_DELAY);
|
||||
nvic_sys_reset();
|
||||
}
|
||||
Reference in New Issue
Block a user