diff options
| author | hathach <[email protected]> | 2019-05-24 12:37:36 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-05-24 12:37:36 +0700 |
| commit | 981e227774e824cf5027fdf093e5d21e8a54a5a3 (patch) | |
| tree | 351c687bcf917b1adfd720b7400997ee18320ee7 /src | |
| parent | 69edf13c714c1f334b527cb12a04adb37c352ab3 (diff) | |
| parent | 5f34c63660348f422d1b3934fd03cee62cbf3092 (diff) | |
Merge pull request #76 from hathach/develop
fix raw hid inout
Diffstat (limited to 'src')
| -rw-r--r-- | src/class/hid/hid_device.c | 2 | ||||
| -rw-r--r-- | src/host/usbh.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/class/hid/hid_device.c b/src/class/hid/hid_device.c index 9089ac6b5..aea16efc1 100644 --- a/src/class/hid/hid_device.c +++ b/src/class/hid/hid_device.c @@ -78,7 +78,7 @@ bool tud_hid_ready(void) bool tud_hid_report(uint8_t report_id, void const* report, uint8_t len)
{
- TU_VERIFY( tud_hid_ready() && (len < CFG_TUD_HID_BUFSIZE) );
+ TU_VERIFY( tud_hid_ready() && (len <= CFG_TUD_HID_BUFSIZE) );
uint8_t itf = 0;
hidd_interface_t * p_hid = &_hidd_itf[itf];
diff --git a/src/host/usbh.c b/src/host/usbh.c index 7dcb5920f..f370b62f4 100644 --- a/src/host/usbh.c +++ b/src/host/usbh.c @@ -636,7 +636,7 @@ static inline uint8_t get_new_address(void) {
if (_usbh_devices[addr].state == TUSB_DEVICE_STATE_UNPLUG) return addr;
}
- return CFG_TUSB_HOST_DEVICE_MAX;
+ return CFG_TUSB_HOST_DEVICE_MAX+1;
}
static inline uint8_t get_configure_number_for_device(tusb_desc_device_t* dev_desc)
|
