Page 1 of 1

USB Composite library?

Posted: Mon Dec 30, 2019 3:48 pm
by arpruss
Looking at the usb hid and serial code, it looks like things are quite different from the libmaple core on the USB side. But it should still be possible to port my USB Composite library to this core, with a little bit more abstraction. Is anyone interested in helping out?

Re: USB Composite library?

Posted: Mon Dec 30, 2019 4:05 pm
by fpiSTM
I could hep on this.
Give me some hints on how you think to integrate it.

Re: USB Composite library?

Posted: Mon Dec 30, 2019 8:06 pm
by arpruss
Thanks! I'll do some more abstracting, hopefully getting things to the point where it's clear which functions need to be rewritten.

Re: USB Composite library?

Posted: Tue Dec 31, 2019 2:53 pm
by arpruss
My plan is to do some light abstracting in a way that makes usb_generic.c be the only thing that needs to be rewritten. In other words, my hope is that eventually none of the plugins will need any changes. And I'm hoping I can do the abstracting in a way that doesn't add bloat.

Re: USB Composite library?

Posted: Fri Jan 03, 2020 7:01 pm
by arpruss
In the "abstracted" branch, I'm slowly moving all core-centric code to usb_generic.*. Then we'll just need to port that.

Re: USB Composite library?

Posted: Mon Jan 06, 2020 2:52 am
by arpruss
I've tried to move all the core-dependent code to usb_generic.*. This is in the abstracted branch.

However, looking at the official stm32 core, it looks like it will be a non-trivial task to rewrite usb_generic.* to work with the official core's usb support. I think it might be easiest to interface usb_generic.* with the low-level drivers.

But I know very little about the official core, and the HAL stuff looks impenetrable.

Re: USB Composite library?

Posted: Wed Jan 08, 2020 8:24 am
by fpiSTM
Let me know what is your entry point for USB.
Probably we coiuld add the HIDComposite as a library.

Re: USB Composite library?

Posted: Wed Jan 08, 2020 8:26 am
by fpiSTM
One other approach could be to add the USB composite as a standalone feature mutually exclusive with the default USB stack from ST.
I'm following the TinyUSB project which seems promising.

Re: USB Composite library?

Posted: Wed Jan 08, 2020 1:19 pm
by arpruss
That would still require work to interface with HAL as currently the code is only for stm32f1.

Re: USB Composite library?

Posted: Sun May 03, 2020 10:47 am
by cptcredible
Would like to see tid happen, can help with testing if necessary