Merge branch 'master' of https://github.com/dismirlian/ChibiOS-Contrib
This commit is contained in:
commit
bfc5805886
|
@ -52,7 +52,9 @@
|
||||||
#define HAL_USBH_USE_ADDITIONAL_CLASS_DRIVERS FALSE
|
#define HAL_USBH_USE_ADDITIONAL_CLASS_DRIVERS FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAL_USBH_USE_IAD
|
||||||
#define HAL_USBH_USE_IAD HAL_USBH_USE_UVC
|
#define HAL_USBH_USE_IAD HAL_USBH_USE_UVC
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (HAL_USE_USBH == TRUE) || defined(__DOXYGEN__)
|
#if (HAL_USE_USBH == TRUE) || defined(__DOXYGEN__)
|
||||||
|
|
||||||
|
@ -299,6 +301,12 @@ extern "C" {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Synchronous API */
|
/* Synchronous API */
|
||||||
|
usbh_urbstatus_t usbhSynchronousTransfer(usbh_ep_t *ep,
|
||||||
|
void *data,
|
||||||
|
uint32_t len,
|
||||||
|
uint32_t *actual_len,
|
||||||
|
systime_t timeout);
|
||||||
|
|
||||||
usbh_urbstatus_t usbhBulkTransfer(usbh_ep_t *ep,
|
usbh_urbstatus_t usbhBulkTransfer(usbh_ep_t *ep,
|
||||||
void *data,
|
void *data,
|
||||||
uint32_t len,
|
uint32_t len,
|
||||||
|
|
|
@ -1172,9 +1172,17 @@ static inline void _nptxfe_int(USBHDriver *host) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void _ptxfe_int(USBHDriver *host) {
|
static inline void _ptxfe_int(USBHDriver *host) {
|
||||||
//TODO: implement
|
uint32_t rem;
|
||||||
(void)host;
|
stm32_otg_t *const otg = host->otg;
|
||||||
uinfo("PTXFE");
|
|
||||||
|
rem = _write_packet(&host->ep_active_lists[USBH_EPTYPE_ISO],
|
||||||
|
otg->HPTXSTS & HPTXSTS_PTXFSAVL_MASK);
|
||||||
|
|
||||||
|
rem += _write_packet(&host->ep_active_lists[USBH_EPTYPE_INT],
|
||||||
|
otg->HPTXSTS & HPTXSTS_PTXFSAVL_MASK);
|
||||||
|
|
||||||
|
if (!rem)
|
||||||
|
otg->GINTMSK &= ~GINTMSK_PTXFEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _disable(USBHDriver *host) {
|
static void _disable(USBHDriver *host) {
|
||||||
|
|
|
@ -335,10 +335,19 @@ usbh_urbstatus_t usbhBulkTransfer(usbh_ep_t *ep,
|
||||||
uint32_t len,
|
uint32_t len,
|
||||||
uint32_t *actual_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 usbhSynchronousTransfer(usbh_ep_t *ep,
|
||||||
|
void *data,
|
||||||
|
uint32_t len,
|
||||||
|
uint32_t *actual_len,
|
||||||
|
systime_t timeout) {
|
||||||
|
|
||||||
osalDbgCheck(ep != NULL);
|
osalDbgCheck(ep != NULL);
|
||||||
osalDbgCheck((data != NULL) || (len == 0));
|
osalDbgCheck((data != NULL) || (len == 0));
|
||||||
osalDbgAssert(ep->type == USBH_EPTYPE_BULK, "wrong ep");
|
|
||||||
|
|
||||||
usbh_urb_t urb;
|
usbh_urb_t urb;
|
||||||
usbhURBObjectInit(&urb, ep, 0, 0, data, len);
|
usbhURBObjectInit(&urb, ep, 0, 0, data, len);
|
||||||
|
|
Loading…
Reference in New Issue