We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f065bb commit 64fdcbdCopy full SHA for 64fdcbd
lib/pbio/sys/main.c
@@ -166,6 +166,14 @@ int main(int argc, char **argv) {
166
pbdrv_reset(PBDRV_RESET_ACTION_RESET);
167
}
168
169
+ #else
170
+ // Delay poweroff until we are definitively sure that the button has been
171
+ // released. This prevent the hub from unintentionally powering back on.
172
+ pbio_os_timer_t timer;
173
+ pbio_os_timer_set(&timer, 100);
174
+ while (!pbio_os_timer_is_expired(&timer)) {
175
+ pbio_os_run_processes_and_wait_for_event();
176
+ }
177
#endif
178
179
// Platform-specific power off.
0 commit comments