Commit Graph

119 Commits

Author SHA1 Message Date
hathach
0b249618b0 fix -Wcast-qual 2021-10-15 23:54:31 +07:00
szymonh
2d6407e7a5 Enforced buffer boundaries for hid devices 2021-09-13 22:56:25 +02:00
hathach
a6d18c400d fix keyboard report reserved is always 0 2021-08-17 13:29:26 +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
2c0947ebb6 update gamepad helper 2021-06-09 10:33:57 +07:00
hathach
6e2cf2a3ee clean up log 2021-06-02 00:10:35 +07:00
hathach
9736e54734 include clean up 2021-05-27 17:40:39 +07:00
hathach
8cffe4897e change hid device internal boot_mode to protocol_mode 2021-05-23 13:56:32 +07:00
hathach
a26752a93e fix build error 2021-05-18 12:45:59 +07:00
hathach
7e9e682e09 update to use HID spec protocol value for get/set_protocol() 2021-05-18 12:38:11 +07:00
hathach
e163f85ee0 clean up, rename some HID device symbol/API
- add tud_hid_n_interface_protocol()
- rename tud_hid_n_boot_mode() to  tud_hid_n_get_protocol()
- rename tud_hid_boot_mode_cb() to tud_hid_set_protocol_cb()
- add HID_PROTOCOL_BOOT/REPORT to avoid magic number 0,1
- rename HID_PROTOCOL_NONE/KEYBOARD/MOUSE to HID_ITF_PROTOCOL_ to avoid
confusion
2021-05-18 12:32:20 +07:00
hathach
a070626729 add itf argument to hid API to support multiple instances
following API signature is changed:
- tud_hid_descriptor_report_cb()
- tud_hid_get_report_cb()
- tud_hid_set_report_cb()
- tud_hid_boot_mode_cb()
- tud_hid_set_idle_cb()
2021-02-24 14:27:20 +07:00
hathach
d2b8e591f6 tud_hid_report_complete_cb() API
update hid composite to make use of tud_hid_report_complete_cb() for
sending reports when possible.
2021-02-09 15:57:29 +07:00
hathach
72bcc0685c add tud_hid_n_gamepad_report() helper for gamepad report
- Add gamepad to hid_composite example. Though it needs a bit of extra
work but it will come later as separated PR.
2021-02-08 19:08:16 +07:00
hathach
dc9a309839 migrate hid device to new control xfer cb 2020-11-19 22:00:49 +07:00
hathach
8ba0c362cc update tud_hid_boot_mode_cb/tud_hid_set_idle_cb support mul interfaces
also clean up code
2020-10-09 20:51:20 +07:00
hathach
13abcb953f rename multiple hid callback 2020-10-09 20:24:10 +07:00
Zachery Littell
a4ba1f0827 Fix tu_verify args 2020-10-08 12:08:13 -05:00
Zachery Littell
298aa1b669 Cleanup per review on PR 2020-10-08 11:59:12 -05:00
Zachery Littell
db3fe97f62 fix variable names. add itf n callbacks to multihid 2020-10-07 20:36:00 -05:00
Zachery Littell
081af79009 fix simple pull request comments. Implement descriptor index hack. 2020-10-02 16:02:00 -05:00
Zachery Littell
b7208d6f7e add index to report descriptor callback. this is breaking and needs to be reviewed 2020-10-01 12:51:48 -05:00
Zachery Littell
849681724a create N functions and inlines for multi hid interfaces 2020-10-01 11:51:33 -05:00
hathach
801f8b5b38 update claim edpt for hid and midi 2020-09-10 23:32:08 +07:00
hathach
5ca748a68e rename CFG_TUD_MSC_BUFSIZE to CFG_TUD_MSC_EP_BUFSIZE
rename CFG_TUD_HID_BUFSIZE to CFG_TUD_HID_EP_BUFSIZE
2020-07-16 15:34:16 +07:00
Mengsk
57b553e023 Fix IAR warnings.
Pa039 : use of address of unaligned structure member.
Pe188: enumerated type mixed with another type.
2020-06-17 10:08:33 +02:00
hathach
53b749fd72 check max_len for vendor and hid 2020-05-28 14:44:26 +07:00
hathach
10cd3f24bf initial transfer failed in open() shouldn't cause the driver open to fail. 2020-05-28 13:48:02 +07:00
hathach
89a3d1f6d1 update hid open() 2020-05-28 11:19:12 +07:00
hathach
e713b534fa test ok with cdc and msc 2020-04-15 10:30:34 +07:00
hathach
8614dcece7 tested with hid 2020-04-15 01:01:07 +07:00
Peter Lawrence
ff0e7d2bed implement multiple interfaces support 2019-12-28 14:27:32 -06:00
hathach
fe1eadf177 fix #229 2019-11-27 12:34:30 +07:00
hathach
164d0db825 Merge branch 'ZLP_Request2' into pigrew-ZLP_Request2 2019-11-01 10:16:59 +07:00
hathach
981e64d8a1 implement pigrew review 2019-11-01 10:07:56 +07:00
hathach
f58726887a update doc, hid set report 2019-10-31 21:28:46 +07:00
Nathan Conrad
cef388b7bd Merge branch 'master' into ZLP_Request2 2019-10-02 01:15:47 -04:00
hathach
204791b3e7 2nd attempt to fix #161 2019-10-01 22:19:04 +07:00
Nathan Conrad
91fa24d99c Merge branch 'master' into ZLP_Request2 2019-09-27 00:37:21 -04:00
Nathan Conrad
8a688cd8d0 Revert "Revert "Also need to just return false in the case that it isn't an interface control event. We shouldn't assert. This normally isn't an""
This reverts commit 2281a51484.
2019-09-20 12:58:26 -04:00
Nathan Conrad
2281a51484 Revert "Also need to just return false in the case that it isn't an interface control event. We shouldn't assert. This normally isn't an"
This reverts commit f241ff389f.
2019-09-20 12:27:41 -04:00
Nathan Conrad
f241ff389f Also need to just return false in the case that it isn't an interface control event. We shouldn't assert. This normally isn't an
error, either, so I don't want to use TU_VERIFY.
2019-09-20 08:56:46 -04:00
Nathan Conrad
a8a65d6cea Use cached HID descriptor. 2019-09-20 08:46:17 -04:00
Nathan Conrad
05164c5a27 Cache pointer to HID descriptor. 2019-09-19 21:04:51 -04:00
Nathan Conrad
915f52730d Implement HID desc request. 2019-09-17 11:28:29 -04:00
Nathan Conrad
8cca287683 Add verification that there is enough buffer space for HID OUT control transfer. 2019-09-12 16:07:12 -04:00
hathach
80cde5b0b5 fix potential bug with mis-align issue 2019-09-01 17:20:10 +07:00
hathach
036e858543 add tud_control_vendor_request_cb()/tud_control_vendor_complete_cb(), expose usbd control transfer
rename usbd_control_transfer/status to tud_control_transfer/status
2019-07-16 18:14:47 +07:00
hathach
cb4e6837e9 clean up, rename internal driver control_request_complete to simply control_complete 2019-07-12 22:03:40 +07:00