Skip to content

Commit

Permalink
Reduce size of buffer to maximum size supported by low-speed USB devi…
Browse files Browse the repository at this point in the history
…ces.

Fossil-ID: SVN r2407
  • Loading branch information
arjendekorte committed Mar 22, 2010
1 parent ac46c48 commit 7d77dfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/libhid.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static int refresh_report_buffer(reportbuf_t *rbuf, hid_dev_handle_t udev, HIDDa
{
int id = pData->ReportID;
int r;
unsigned char buf[SMALLBUF];
unsigned char buf[8]; /* Maximum size for low-speed USB devices */

if (rbuf->ts[id] + age > time(NULL)) {
/* buffered report is still good; nothing to do */
Expand Down Expand Up @@ -469,7 +469,7 @@ bool_t HIDSetItemValue(hid_dev_handle_t udev, const char *hidpath, double Value,
*/
int HIDGetEvents(hid_dev_handle_t udev, HIDData_t **event, int eventsize)
{
unsigned char buf[SMALLBUF];
unsigned char buf[8]; /* Maximum size for low-speed USB devices */
int itemCount = 0;
int buflen, r, i;
HIDData_t *pData;
Expand Down

0 comments on commit 7d77dfa

Please sign in to comment.