Commit Graph

266 Commits

Author SHA1 Message Date
hathach b495d6f8ec
temporarily revert len back to uint8_t in tud_hid_report_complete_cb() for up coming release 2022-07-17 22:56:07 +07:00
hathach a0ef489890 fix all warnings with host rp2040 2022-06-27 17:11:24 +07:00
hathach 1a1f633922 Merge branch 'master' into add-more-warnings 2022-06-27 12:50:50 +07:00
hathach 556b5d5044 change report len in hid API from uint8_t to uint16_t
since HS interrupt endpoint can be up to 1024, 8-bit is not enough.
affected APIs are:
- tud_hid_n_report() / tud_hid_report()
- tud_hid_report_complete_cb()
2022-06-27 12:22:36 +07:00
hathach b9dc9dbd78
fix most warnings with rp2040 -wconversion 2022-06-27 11:50:17 +07:00
hathach 8b9cf152a0 rhport argument in usbd_ API() is not used (always use the initialized port)
remove the usage of TUD_OPT_RHPORT in class driver
2022-06-02 16:51:17 +07:00
hathach e6e3dfedc8 hid example work well 2022-04-01 16:34:36 +07:00
hathach 821be65b03
rename usbh_edpt_open() to tuh_edpt_open() 2022-03-19 14:59:31 +07:00
hathach 4795cca04a
add parse config descriptor to example
move usbh_edpt_open() to public API, remove rhport from its signature
2022-03-19 00:43:31 +07:00
hathach ba1185bf28
implement tuh_edpt_xfer() for non-control 2022-03-18 22:22:21 +07:00
hathach 8750e3b577
move daddr into xfer struct 2022-03-18 16:39:35 +07:00
hathach f89ff939d8
rename user_arg to user_data 2022-03-17 22:37:51 +07:00
hathach 55428d7dd2
rename tuh_control_xfer_t to tuh_xfer_t 2022-03-17 20:52:16 +07:00
hathach 8aedb2ff37
slightly change the signature of tuh_control_xfer 2022-03-17 17:25:53 +07:00
hathach 66942b814b
change return type of callback to void 2022-03-17 16:55:29 +07:00
hathach deab8c276a
remove const in xfer callback 2022-03-17 16:53:54 +07:00
hathach 6df420f7f3
move result into transfer struct 2022-03-17 16:24:43 +07:00
hathach 68bfd048a5
change tuh_control_xfer_t struct 2022-03-17 12:53:52 +07:00
hathach 98d4ed0584
update hid host to use new control xfer for set config 2022-03-16 18:44:41 +07:00
hathach 2929afe2fa add synchronous (blocking) support for usbh control transfer
- add synchronous version of all get descriptor API
- update bare example to use sync API for string descriptor
- change order of index, language_id in tuh_descriptor_get_string() to
match similar API of libusb
- add index to tuh_descriptor_get_hid_report()
2022-03-13 17:45:46 +07:00
hathach ec28593ce5 update hid,msc to new usbh control API 2022-03-11 22:13:57 +07:00
hathach f920e1c171 rename host descriptor function 2022-03-09 11:21:13 +07:00
hathach db9d97c947 add tuh_descriptor_hid_report_get() 2022-03-09 11:03:29 +07:00
Ha Thach 7c627f58d7
Merge pull request #1343 from Daft-Freak/patch-1
Open OUT endpoint for HID host
2022-02-28 20:00:40 +07:00
hathach 31aa077cb0 rename TUSB_OPT_HOST_ENABLED to CFG_TUH_ENABLED 2022-02-25 18:35:21 +07:00
hathach d10326cb4e rename TUSB_OPT_DEVICE_ENABLED to CFG_TUD_ENABLED
TUSB_OPT_DEVICE_ENABLED still usable for backward compatible
2022-02-25 18:35:21 +07:00
hathach a8d6e82395 enhance dual role examples 2022-02-25 17:36:05 +07:00
Charlie Birks 83b638f230
Open OUT endpoint for HID host 2022-02-23 13:03:20 +00:00
hathach a53e83665e fix HID_REPORT_ID_N() 2022-02-17 12:12:42 +07:00
hathach ab223eb1df
correct 32 button in gamepad hid descriptor template 2021-11-29 13:07:46 +07:00
hathach 5af989384b remove ep descriptor wMaxPacketSize bitfield due to endian issue 2021-10-24 13:11:21 +07:00
hathach 0b249618b0 fix -Wcast-qual 2021-10-15 23:54:31 +07:00
Charlie Birks aa97b419b2
Handle HID devices with OUT endpoint listed first
This happens on my PowerA wired Switch pro controller
2021-10-04 11:43:12 +01:00
szymonh 2d6407e7a5 Enforced buffer boundaries for hid devices 2021-09-13 22:56:25 +02:00
MasterPhi 8305766afe fix HID_LOGICAL_MAX overflow. 2021-08-31 11:27:43 +02:00
hathach 629da937f8
slightly change the keyboard descriptor template to pass usb compliant test 2021-08-26 17:55:31 +07:00
hathach 3c0c051df1
add tuh_vid_pid_get()
complete Sony PS4 dualshock controller example
2021-08-24 19:10:23 +07:00
hathach 353c070d00 exclude dev0 from usbh devices pool 2021-08-24 01:06:05 +07:00
hathach 3309425211 sepearate CFG_TUH_DEVICE_MAX and CFG_TUH_HUB
separate dev0 from _usbh_devices pool to save sram
2021-08-23 19:56:53 +07:00
hathach 6a16f6ccdd rename CFG_TUSB_HOST_DEVICE_MAX to CFG_TUH_DEVICE_MAX 2021-08-23 11:01:40 +07:00
hathach 800f85329e add tuh_hid_receive_report() for applicaiton to explicitly request report 2021-08-23 11:00:21 +07:00
hathach 22a5b1608c change host driver open return type to bool
the descriptor len used by driver will be calculated by usbh
2021-08-20 19:31:38 +07:00
hathach 62f2efbe8c hid host skip get report descriptor if too large instead of assert 2021-08-20 18:26:56 +07:00
hathach a6d18c400d fix keyboard report reserved is always 0 2021-08-17 13:29:26 +07:00
hathach 2ea0ef4543
correct newline usage keycode (ENTER 0x28) 2021-08-10 16:40:43 +07:00
Ha Thach 0a230d57ee
Merge pull request #931 from hathach/more-hid-host
More hid host update
2021-07-05 00:23:56 +07:00
hathach 2b3d547b7b clean up 2021-07-01 23:05:21 +07:00
hathach ca98996e1f better support for hid device set/get protocol
add caplock detection for hid_composite
2021-07-01 22:46:39 +07:00
hathach c172caa288 clean up 2021-06-29 00:03:34 +07:00
hathach efc12ae7d4 fix SET_PROTOCOl, update hid host behavior for default boot interface 2021-06-28 23:57:57 +07:00