Question
How to detect sleep/resume events from the host of USB HID.
Hi,
I'm using my stm32 as a USB HID device and I would like to be able to detect when the host computer goes into sleep mode and when it resumes. How would I detect this change?
I tried checking the following continuously in the main loop but detected no change:
if(((USBD_HandleTypeDef*)hpcd_USB_FS.pData)->dev_state==USBD_STATE_SUSPENDED){Am I missing something or is there a better way?
