Implement USB Suspend
JohnAZoidberg opened this issue · 2 comments
JohnAZoidberg commented
Behavior:
- Turn off LEDs, LED controller
- Other power saving measures
Questions:
- Will it autosuspend while host is not asleep?
- Can we detect if the CDC-ACM port is open/closed and reduce power if not?
- Should enable or disable remote wakeup?
References:
- https://docs.rs/usbd-serial/latest/usbd_serial/
- https://docs.rs/usb-device/latest/usb_device/device/enum.UsbDeviceState.html
- https://learn.microsoft.com/en-us/windows-hardware/drivers/kernel/device-power-states
- https://learn.microsoft.com/en-us/windows-hardware/drivers/usbcon/comparing-usb-device-states-to-wdm-device-states
- https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v13.0.0%2Fusbd_cdc_acm_example.html
- hathach/tinyusb#1028
- https://www.kernel.org/doc/Documentation/usb/power-management.txt
- https://learn.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-selective-suspend
- https://learn.microsoft.com/en-us/windows-hardware/drivers/usbcon/remote-wakeup-of-usb-devices
- https://learn.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-selective-suspend
JohnAZoidberg commented
Basics done in #58!
JohnAZoidberg commented
We can try to go into D3 sleep state, what we can't do on the keyboard, since the keyboard will have to be able to wake up the system.