]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
usb_usb: Add options for disabling blocking loops
authortmk <hasu@tmk-kbd.com>
Tue, 7 May 2019 03:01:59 +0000 (12:01 +0900)
committertmk <hasu@tmk-kbd.com>
Fri, 10 May 2019 00:44:59 +0000 (09:44 +0900)
USB startup wait loop delays UHS2 Task() starting for a while
like 200-600ms and USB suspend loop blocks the Task() while power
saving like 15-17ms. These loops may cause keyboard enumeration
failure, perhaps. Not confirmed it yet though.

converter/usb_usb/config.h

index b2e5a9a3cba126228f111c2ce45a819f5a006ae2..7b80fc214013138fb0306790549b2e55d68cde1b 100644 (file)
@@ -36,8 +36,17 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 /* key combination for command */
 #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) 
 
+
 // Disable power saving in USB suspend loop but remote wakeup is still valid.
 // This allows keep USB::Task() going during suspend without power down time delay.
 //#define NO_SUSPEND_POWER_DOWN
 
+
+// Disable USB startup wait, which can delays starting UHS2 Task() for 350-600ms.
+//#define NO_USB_STARTUP_WAIT_LOOP
+
+// Disable USB suspend loop, which blocks UHS2 Task() while power saving.
+// Note that this also disables power saving and remote wakeup from keyboard completely.
+//#define NO_USB_SUSPEND_LOOP
+
 #endif