serial_usb: supporting multiple instance

This forum is about you. Feel free to discuss anything is related to embedded and electronics, your awesome projects, your ideas, your announcements, not necessarily related to ChibiOS but to embedded in general. This forum is NOT for support.
Post Reply
sam0737
Posts: 4
Joined: Sun Apr 14, 2013 4:47 am

serial_usb: supporting multiple instance

Post by sam0737 »

Hi,

I have patched the HAL serial_usb to support multiple serial_usb instance.

https://github.com/sam0737/chibios-rt-a ... c3300c5430

There is no breaking change to the user interface (old code should work as is), the changes are:
* remove the dependency from usbp->param
* User wishing to use multiple instance should specify the interrupt, tx, rx EP number in SerialUSBConfig
* An linked list is added to check/map the EP number of USB/Queue hooks to the device instance

I hope the patch is useful =)
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: serial_usb: supporting multiple instance

Post by Giovanni »

Hi,

Thanks for the patch however a fix for this problem has been committed last week :)

Looking at your code I realized that I didn't think to separate line coding, I will merge at least that part.

Giovanni
Post Reply