USB HID driver
USB HID driver
Does the HAL include a USB HID driver, and if so would it be possible to use it simultaneously with the Serial over USB driver? Here is my other post with more context.
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: USB HID driver
Hi,
Search the forum, several HID examples have been posted. Probably HID is too "generic" for a specific driver like we have for CDC.
Giovanni
Search the forum, several HID examples have been posted. Probably HID is too "generic" for a specific driver like we have for CDC.
Giovanni
Re: USB HID driver
I found a few examples of projects which implement a HID device, but none which implement both a HID device and a CDC device. Do you know of one?
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: USB HID driver
Hi,
You need to implement a "IAD" device, there are IAD examples with 2 CDC but none with HID. The effort is into creating the descriptors, you may try to use the descriptors of some existing device then modify them.
Giovanni
You need to implement a "IAD" device, there are IAD examples with 2 CDC but none with HID. The effort is into creating the descriptors, you may try to use the descriptors of some existing device then modify them.
Giovanni
Re: USB HID driver
So I can't use the existing Serial over USB driver? Actually I already have working descriptors in my project, and it's integrating them with ChibiOS that I can't figure out how to do. I'm not sure how to make both HID and CDC work at the same time without them interfering with each other.
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: USB HID driver
Hi,
You can use the driver, it is just matter of descriptors. Make HID and CDC use different endpoints and map the CDC endpoints in the serial driver.
It is better if you start from the CDC-IAD demo.
Giovanni
You can use the driver, it is just matter of descriptors. Make HID and CDC use different endpoints and map the CDC endpoints in the serial driver.
It is better if you start from the CDC-IAD demo.
Giovanni
Re: USB HID driver
I've found a few projects which implement a HID device using ChibiOS, but they vary wildly in how they do it and I've managed to confuse myself more by looking at them. Are you sure that there can't be a dedicated HID driver in ChibiOS? The library I'm currently using has both a HID driver and a CDC driver, and I can post some code from my project to show how they are used.
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: USB HID driver
You wrote it yourselves, HID "varies wildly" so you would make a series of HID drivers for various scenarios rather than a single driver.
An HID application just requires descriptors and the normal USB API.
Giovanni
An HID application just requires descriptors and the normal USB API.
Giovanni
Re: USB HID driver
As far as I know, the library I'm using only has one HID driver. So far I have not noticed any limitations to this approach. I may be wrong, of course, so I have posted my code here in case you want to check if my understanding is correct.
Who is online
Users browsing this forum: No registered users and 32 guests