Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions drivers/usbhost/usbhost_hidmouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ struct usbhost_state_s
struct work_s work; /* For cornercase error handling by the worker thread */
struct mouse_sample_s sample; /* Last sampled mouse data */
usbhost_ep_t epin; /* Interrupt IN endpoint */
size_t packet_len;

/* The following is a list if poll structures of threads waiting for
* driver events. The 'struct pollfd' reference for each open is also
Expand Down Expand Up @@ -820,7 +821,7 @@ static bool usbhost_touchscreen(FAR struct usbhost_state_s *priv,
* small, then ignore the event.
*/

else if (!usbhost_xythreshold(priv))
else if (!usbhost_threshold(priv))
{
return false;
}
Expand Down Expand Up @@ -988,7 +989,7 @@ static int usbhost_mouse_poll(int argc, FAR char *argv[])
*/

nbytes = DRVR_TRANSFER(hport->drvr, priv->epin,
priv->tbuffer, priv->tbuflen);
priv->tbuffer, priv->packet_len);

/* Check for errors -- Bail if an excessive number of consecutive
* errors are encountered.
Expand Down Expand Up @@ -1478,6 +1479,8 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv,
epindesc.mxpacketsize =
usbhost_getle16(epdesc->mxpacketsize);

priv->packet_len = (size_t)epindesc.mxpacketsize;

uinfo("Interrupt IN EP addr:%d mxpacketsize:%d\n",
epindesc.addr, epindesc.mxpacketsize);
}
Expand Down
Loading