LPC17 USB host: Direction bit being set wrong from allocated control endpoints
This commit is contained in:
parent
64fe226669
commit
ed5287855f
@ -2059,9 +2059,15 @@ static int lpc17_epalloc(struct usbhost_driver_s *drvr,
|
|||||||
(uint32_t)(epdesc->addr) << ED_CONTROL_EN_SHIFT |
|
(uint32_t)(epdesc->addr) << ED_CONTROL_EN_SHIFT |
|
||||||
(uint32_t)(epdesc->mxpacketsize) << ED_CONTROL_MPS_SHIFT;
|
(uint32_t)(epdesc->mxpacketsize) << ED_CONTROL_MPS_SHIFT;
|
||||||
|
|
||||||
/* Get the direction of the endpoint */
|
/* Get the direction of the endpoint. For control endpoints, the
|
||||||
|
* direction is in the TD.
|
||||||
|
*/
|
||||||
|
|
||||||
if (epdesc->in)
|
if (epdesc->xfrtype == USB_EP_ATTR_XFER_CONTROL)
|
||||||
|
{
|
||||||
|
ed->hw.ctrl |= ED_CONTROL_D_TD1;
|
||||||
|
}
|
||||||
|
else if (epdesc->in)
|
||||||
{
|
{
|
||||||
ed->hw.ctrl |= ED_CONTROL_D_IN;
|
ed->hw.ctrl |= ED_CONTROL_D_IN;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user