diff options
| author | Bernard Xiong <[email protected]> | 2018-12-26 16:20:04 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-12-26 16:20:04 +0800 |
| commit | 51b353e83dbec5bba0d459cbfcdac3f30b372642 (patch) | |
| tree | 9abaff04996aa262aa532b32d50e02605c1cb05c | |
| parent | 9834fd858ccc53e242258db6f177360e8844bd75 (diff) | |
| parent | 059be8ec8a385304538f06414ed2a2dc7f375521 (diff) | |
Merge pull request #2125 from XBurst/master
Fix bugs of X1000's USB driver.
| -rwxr-xr-x[-rw-r--r--] | bsp/x1000/drivers/usbd/drv_usbd.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bsp/x1000/drivers/usbd/drv_usbd.c b/bsp/x1000/drivers/usbd/drv_usbd.c index cb8c0ea4b7..03470fd891 100644..100755 --- a/bsp/x1000/drivers/usbd/drv_usbd.c +++ b/bsp/x1000/drivers/usbd/drv_usbd.c @@ -1,8 +1,13 @@ /* - * drv_usbd.c + * Copyright (c) 2006-2018, RT-Thread Development Team * - * Created on: 2017��2��1�� - * Author: Urey + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2017-02-01 Urey first + * 2018-12-20 heyuanjie fix bugs + * 2018-12-25 Zhou Yanjie modify the coding style */ #include <rtthread.h> @@ -145,7 +150,7 @@ static rt_size_t __ep_read_prepare(rt_uint8_t address, void *buffer, rt_size_t dwc_ep *pep ; RT_DEBUG_LOG(RT_DEBUG_USB,("%s address = %02x,size = %d\n", __func__,address,size)); - pep = __dwc_hdl.dep[address & 0x0F + DWC_EP_OUT_OFS]; + pep = __dwc_hdl.dep[(address & 0x0F) + DWC_EP_OUT_OFS]; pep->ep_state = EP_DATA; pep->xfer_len = size; // pep->xfer_buff = buffer; |
