usb: Add remote wakeup support

This commit adds support for remote wakeup and extends USB api
with a wakeup request call. Remote wakeup can be dsabled in kconfig
when a specific driver does not support this feature.

Signed-off-by: Paweł Zadrożniak <pawel.zadrozniak@nordicsemi.no>
This commit is contained in:
Paweł Zadrożniak 2019-02-07 13:19:16 +01:00 committed by Anas Nashif
commit 3ecbff501a
6 changed files with 68 additions and 5 deletions

View file

@ -96,7 +96,10 @@
* D5:Remote Wakeup -> 0,
* D4...0:Reserved -> 0
*/
#define USB_CONFIGURATION_ATTRIBUTES 0xC0
#define USB_CONFIGURATION_ATTRIBUTES_REMOTE_WAKEUP 0x20
#define USB_CONFIGURATION_ATTRIBUTES 0xC0 \
| (COND_CODE_1(CONFIG_USB_DEVICE_REMOTE_WAKEUP, \
(USB_CONFIGURATION_ATTRIBUTES_REMOTE_WAKEUP), (0)))
/* Classes */
#define COMMUNICATION_DEVICE_CLASS 0x02