diff options
| author | weety <[email protected]> | 2018-09-05 09:40:12 +0800 |
|---|---|---|
| committer | weety <[email protected]> | 2018-09-05 09:40:12 +0800 |
| commit | d344ff5a9e87cd6d401fb715fc5b2b67dfa35382 (patch) | |
| tree | 059308103390f57369749a2e4e030f03dd3340c8 /components/drivers/usb/usbhost | |
| parent | 2a46f0d5ee4085974051d251285bf43b46b49af5 (diff) | |
| parent | 7e25fe226645c7ea7a06f498e70bfea73b4b561d (diff) | |
Merge branch 'pyconfig' of https://github.com/weety/rt-thread into pyconfig
Diffstat (limited to 'components/drivers/usb/usbhost')
| -rw-r--r-- | components/drivers/usb/usbhost/core/hub.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/drivers/usb/usbhost/core/hub.c b/components/drivers/usb/usbhost/core/hub.c index 56e40bb0d5..29b465d1b7 100644 --- a/components/drivers/usb/usbhost/core/hub.c +++ b/components/drivers/usb/usbhost/core/hub.c @@ -249,7 +249,7 @@ rt_err_t rt_usbh_hub_clear_port_feature(uhub_t hub, rt_uint16_t port, rt_uint16_ if(hub->is_roothub) { root_hub_ctrl(hub->hcd, port, RH_CLEAR_PORT_FEATURE, - (void*)feature); + (void*)(rt_uint32_t)feature); return RT_EOK; } @@ -290,7 +290,7 @@ rt_err_t rt_usbh_hub_set_port_feature(uhub_t hub, rt_uint16_t port, if(hub->is_roothub) { root_hub_ctrl(hub->hcd, port, RH_SET_PORT_FEATURE, - (void*)feature); + (void*)(rt_uint32_t)feature); return RT_EOK; } @@ -413,7 +413,7 @@ static rt_err_t rt_usbh_hub_port_change(uhub_t hub) RT_DEBUG_LOG(RT_DEBUG_USB, ("port %d status 0x%x\n", i + 1, pstatus)); /* check port status change */ - if ((pstatus & PORT_CCSC)) + if (pstatus & PORT_CCSC) { /* clear port status change feature */ rt_usbh_hub_clear_port_feature(hub, i + 1, PORT_FEAT_C_CONNECTION); |
