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.
This commit is contained in:
parent
c3144055e8
commit
09111f1cf3
1 changed files with 2 additions and 0 deletions
|
@ -35,6 +35,8 @@ int zmk_pm_soft_off(void) {
|
||||||
|
|
||||||
#if !IS_ENABLED(CONFIG_ZMK_SPLIT) || IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
#if !IS_ENABLED(CONFIG_ZMK_SPLIT) || IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
||||||
zmk_endpoints_clear_current();
|
zmk_endpoints_clear_current();
|
||||||
|
// Need to sleep to give any other threads a chance so submit endpoint data.
|
||||||
|
k_sleep(K_MSEC(100));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
device_count = z_device_get_all_static(&devs);
|
device_count = z_device_get_all_static(&devs);
|
||||||
|
|
Loading…
Add table
Reference in a new issue