USB: Reset poweroff timer for all USB events

Without this, if a device is left plugged in and idle, unplugging it will
trigger an immediate shutdown.

Change-Id: I65caaa0c1473562ec5d0bb776b01d4d222d69965
This commit is contained in:
Solomon Peachy 2020-12-24 00:37:27 -05:00
parent c842a13651
commit b5e6c30a61

View file

@ -41,6 +41,7 @@
#endif
#include "logf.h"
#include "screendump.h"
#include "powermgmt.h"
#ifndef BOOTLOADER
#include "misc.h"
@ -436,6 +437,8 @@ static void NORETURN_ATTR usb_thread(void)
{
queue_wait(&usb_queue, &ev);
reset_poweroff_timer(); /* Any USB event counts */
switch(ev.id)
{
/*** Main USB thread duties ***/