Skip to content

Commit

Permalink
[USB] 尝试处理挂起事件并关闭远程唤醒
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-kirisame committed May 23, 2020
1 parent 67831fa commit 39f3adb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion usb/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static void uart_send_status()
if (!IS_CHARGING) // 是否充满
data |= 0x02;
#endif
if (usb_state.is_ready) // 是否连接主机
if (usb_state.is_ready && !usb_state.is_sleep) // 是否连接主机
data |= 0x04;
if (usb_state.protocol)
data |= 0x08;
Expand Down
2 changes: 1 addition & 1 deletion usb/usb_descriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ uint8_t const DeviceDescriptor[] = {
#else
#define USB_NUM_INTERFACES 0x03
#endif
#define USB_SUPPORT_REM_WAKE 0x20 // support
#define USB_SUPPORT_REM_WAKE 0x00 // 0x20 support, 0x00 not support
#define USB_SUPPORT_SELF_POWERED 0x80 // not self-powered
#define USB_MAX_POWER 0xfa // 500 mA

Expand Down

0 comments on commit 39f3adb

Please sign in to comment.