diff options
author | Peter Johanson <[email protected]> | 2023-12-31 06:36:52 +0000 |
---|---|---|
committer | Pete Johanson <[email protected]> | 2024-03-27 20:59:26 -0700 |
commit | 09111f1cf36099690bf96091b46214c421b1fb3b (patch) | |
tree | 1ad201d6b676b7a5e24f53fb8802e62791b05197 /app | |
parent | c3144055e8534169bf1a6d798b1ee712f6c1d002 (diff) | |
download | zmk-09111f1cf36099690bf96091b46214c421b1fb3b.tar.gz zmk-09111f1cf36099690bf96091b46214c421b1fb3b.zip |
fix: Sleep after clearing endpoints to wait for send.
* Add a small sleep to allow other threads to send data for the
endpoint clearing before sleep.
Diffstat (limited to 'app')
-rw-r--r-- | app/src/pm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/src/pm.c b/app/src/pm.c index a4599ac8fc..8525046f04 100644 --- a/app/src/pm.c +++ b/app/src/pm.c @@ -35,6 +35,8 @@ int zmk_pm_soft_off(void) { #if !IS_ENABLED(CONFIG_ZMK_SPLIT) || IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) zmk_endpoints_clear_current(); + // Need to sleep to give any other threads a chance so submit endpoint data. + k_sleep(K_MSEC(100)); #endif device_count = z_device_get_all_static(&devs); |