diff options
author | Diego Ismirlian <dismirlian (at) google's mail.com> | 2017-10-29 17:41:30 -0300 |
---|---|---|
committer | Diego Ismirlian <dismirlian (at) google's mail.com> | 2017-10-29 17:41:30 -0300 |
commit | 06af5833ed2253ff1334e0143692657085acf04c (patch) | |
tree | 6e1cef07bc951d9de75ccea196ea9461e9ea8409 | |
parent | c1e174b5b2a1bae962d9a0fca1a5916f20c9e816 (diff) | |
download | ChibiOS-Contrib-06af5833ed2253ff1334e0143692657085acf04c.tar.gz ChibiOS-Contrib-06af5833ed2253ff1334e0143692657085acf04c.tar.bz2 ChibiOS-Contrib-06af5833ed2253ff1334e0143692657085acf04c.zip |
USBH: main driver: implement usbhBulkTransfer as inline function
-rw-r--r-- | os/hal/include/hal_usbh.h | 9 | ||||
-rw-r--r-- | os/hal/src/hal_usbh.c | 10 |
2 files changed, 7 insertions, 12 deletions
diff --git a/os/hal/include/hal_usbh.h b/os/hal/include/hal_usbh.h index 6a6be21..8d9a85b 100644 --- a/os/hal/include/hal_usbh.h +++ b/os/hal/include/hal_usbh.h @@ -307,11 +307,16 @@ extern "C" { uint32_t *actual_len, systime_t timeout); - usbh_urbstatus_t usbhBulkTransfer(usbh_ep_t *ep, + static inline usbh_urbstatus_t usbhBulkTransfer(usbh_ep_t *ep, void *data, uint32_t len, uint32_t *actual_len, - systime_t timeout); + systime_t timeout) { + osalDbgAssert(ep->type == USBH_EPTYPE_BULK, "wrong ep"); + + return usbhSynchronousTransfer(ep, data, len, actual_len, timeout); + } + usbh_urbstatus_t usbhControlRequest(usbh_device_t *dev, uint8_t bmRequestType, uint8_t bRequest, diff --git a/os/hal/src/hal_usbh.c b/os/hal/src/hal_usbh.c index 3949c68..f9f4687 100644 --- a/os/hal/src/hal_usbh.c +++ b/os/hal/src/hal_usbh.c @@ -330,16 +330,6 @@ void _usbh_urb_completeI(usbh_urb_t *urb, usbh_urbstatus_t status) { /* Synchronous API. */ /*===========================================================================*/ -usbh_urbstatus_t usbhBulkTransfer(usbh_ep_t *ep, - void *data, - uint32_t len, - uint32_t *actual_len, - systime_t timeout) { - osalDbgAssert(ep->type == USBH_EPTYPE_BULK, "wrong ep"); - - return usbhSynchronousTransfer(ep,data,len,actual_len,timeout); -} - usbh_urbstatus_t usbhSynchronousTransfer(usbh_ep_t *ep, void *data, uint32_t len, |