Revert changes to ChibiOS Suspend Code (#21830)
* Partially revert #19780
* Finish
* Get teensy 3.5/3.6 board files too
* fix lint issue
* Revert "[Bug] Restore usb suspend wakeup delay (#21676)"
This reverts commit e8e989fd7a
.
* Apply suggestions from code review
Co-authored-by: Joel Challis <git@zvecr.com>
---------
Co-authored-by: Joel Challis <git@zvecr.com>
This commit is contained in:
parent
736451558e
commit
25331be316
10 changed files with 105 additions and 23 deletions
|
@ -80,3 +80,7 @@ void __early_init(void) {
|
|||
void boardInit(void) {
|
||||
|
||||
}
|
||||
|
||||
void restart_usb_driver(USBDriver *usbp) {
|
||||
// Do nothing. Restarting the USB driver on these boards breaks it.
|
||||
}
|
||||
|
|
|
@ -80,3 +80,7 @@ void __early_init(void) {
|
|||
void boardInit(void) {
|
||||
|
||||
}
|
||||
|
||||
void restart_usb_driver(USBDriver *usbp) {
|
||||
// Do nothing. Restarting the USB driver on these boards breaks it.
|
||||
}
|
||||
|
|
|
@ -144,3 +144,8 @@ void __early_init(void) {
|
|||
* @todo Add your board-specific code, if any.
|
||||
*/
|
||||
void boardInit(void) {}
|
||||
|
||||
|
||||
void restart_usb_driver(USBDriver *usbp) {
|
||||
// Do nothing. Restarting the USB driver on these boards breaks it.
|
||||
}
|
||||
|
|
11
platforms/chibios/boards/PJRC_TEENSY_3_5/board/board.mk
Normal file
11
platforms/chibios/boards/PJRC_TEENSY_3_5/board/board.mk
Normal file
|
@ -0,0 +1,11 @@
|
|||
include $(CHIBIOS_CONTRIB)/os/hal/boards/PJRC_TEENSY_3_5/board.mk
|
||||
|
||||
# List of all the board related files.
|
||||
BOARDSRC += $(BOARD_PATH)/board/extra.c
|
||||
|
||||
# Required include directories
|
||||
BOARDINC += $(BOARD_PATH)/board
|
||||
|
||||
# Shared variables
|
||||
ALLCSRC += $(BOARDSRC)
|
||||
ALLINC += $(BOARDINC)
|
7
platforms/chibios/boards/PJRC_TEENSY_3_5/board/extra.c
Normal file
7
platforms/chibios/boards/PJRC_TEENSY_3_5/board/extra.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include <hal.h>
|
||||
|
||||
void restart_usb_driver(USBDriver *usbp) {
|
||||
// Do nothing. Restarting the USB driver on the Teensy 3.6 breaks it,
|
||||
// resulting in a keyboard which can wake up a PC from Suspend-to-RAM, but
|
||||
// does not actually produce any keypresses until you un-plug and re-plug.
|
||||
}
|
11
platforms/chibios/boards/PJRC_TEENSY_3_6/board/board.mk
Normal file
11
platforms/chibios/boards/PJRC_TEENSY_3_6/board/board.mk
Normal file
|
@ -0,0 +1,11 @@
|
|||
include $(CHIBIOS_CONTRIB)/os/hal/boards/PJRC_TEENSY_3_6/board.mk
|
||||
|
||||
# List of all the board related files.
|
||||
BOARDSRC += $(BOARD_PATH)/board/extra.c
|
||||
|
||||
# Required include directories
|
||||
BOARDINC += $(BOARD_PATH)/board
|
||||
|
||||
# Shared variables
|
||||
ALLCSRC += $(BOARDSRC)
|
||||
ALLINC += $(BOARDINC)
|
7
platforms/chibios/boards/PJRC_TEENSY_3_6/board/extra.c
Normal file
7
platforms/chibios/boards/PJRC_TEENSY_3_6/board/extra.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include <hal.h>
|
||||
|
||||
void restart_usb_driver(USBDriver *usbp) {
|
||||
// Do nothing. Restarting the USB driver on the Teensy 3.6 breaks it,
|
||||
// resulting in a keyboard which can wake up a PC from Suspend-to-RAM, but
|
||||
// does not actually produce any keypresses until you un-plug and re-plug.
|
||||
}
|
|
@ -42,7 +42,6 @@ void suspend_wakeup_init(void) {
|
|||
clear_keys();
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
mousekey_clear();
|
||||
mousekey_send();
|
||||
#endif /* MOUSEKEY_ENABLE */
|
||||
#ifdef PROGRAMMABLE_BUTTON_ENABLE
|
||||
programmable_button_clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue