espressif / idf-extra-components

Additional components for ESP-IDF, maintained by Espressif
147 stars 89 forks source link

feature(usb_host_hid): USB Host HID (Human Interface Device) Driver v.2.0.0 #214

Closed roma-jam closed 1 month ago

roma-jam commented 1 year ago

Checklist

Change description

roma-jam commented 1 year ago

Hey @Dazza0, Hey @tore-espressif,

I have prepared a document with architectural changes for the next version of USB Host HID Driver. I would like to ask you both to have a look at the document and share your opinion.

USB_HID_Host_Driver_migration_guide_v0.0.1_draft.pdf

Things, that I want to ask you:

  1. Check the architectural changes, make your point (agree/disagree/other). I do not want you to spend more than 10-15 minutes on that, so if you are not able to understand the main idea from the document quickly - please tell me about that. I will update the document and try to do it more concise. Every feedback I would appreciate.
  2. Verify the advantages/disadvantages paragraphs for both versions. I would like to know your opinion.

Do not refer to the code changes, only to the document. Code is not ready (only the part with esp_event_loop + device attaching and removing).

If there is anything you want to share/add/discuss - I would be happy to do it. Please tell me about that. Sorry for my concise tone (probably), I really don't want to spend your time a lot and I want the document to be short and clear.

Thanks.

roma-jam commented 11 months ago

After removing the OPEN event and made hid_host_device_open() synchronous new version and new scheme are required. They can be found in the next draft description file:

USB_HID_Host_Driver_migration_guide_v0.0.2_draft.pdf

@tore-espressif I have changed the hid_host_open_device() logic and now you can verify the document again. If there is anything else you want to change or make better, feel free to share.

I also updated all the tests and update the concurrent test and now it launch on every interface connected to the ESP32-S2/3 Host.

I am going to investigate how esp_hid works with BLE an BT HID devices and based on that implement a Keyboard/Mouse Driver (which would provide the possibility to automatically, based on the report descriptor data, handle the reports and send an event of keys pressed). Also, I think about making it possible to tie the VID/PID of the device to the specific Keyboard/Mouse driver (or just to use a common one) to be able to implement different HID device driver, even proprietary one.

roma-jam commented 1 month ago

Closed as not relevant any more. Should be moved to esp-usb.