USB Composite library?

Working libraries, libraries being ported and related hardware
Post Reply
arpruss
Posts: 83
Joined: Sat Dec 21, 2019 10:06 pm

USB Composite library?

Post 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?
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: USB Composite library?

Post by fpiSTM »

I could hep on this.
Give me some hints on how you think to integrate it.
arpruss
Posts: 83
Joined: Sat Dec 21, 2019 10:06 pm

Re: USB Composite library?

Post 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.
arpruss
Posts: 83
Joined: Sat Dec 21, 2019 10:06 pm

Re: USB Composite library?

Post 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.
arpruss
Posts: 83
Joined: Sat Dec 21, 2019 10:06 pm

Re: USB Composite library?

Post 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.
arpruss
Posts: 83
Joined: Sat Dec 21, 2019 10:06 pm

Re: USB Composite library?

Post 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.
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: USB Composite library?

Post by fpiSTM »

Let me know what is your entry point for USB.
Probably we coiuld add the HIDComposite as a library.
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: USB Composite library?

Post 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.
arpruss
Posts: 83
Joined: Sat Dec 21, 2019 10:06 pm

Re: USB Composite library?

Post by arpruss »

That would still require work to interface with HAL as currently the code is only for stm32f1.
cptcredible
Posts: 13
Joined: Fri Apr 24, 2020 5:03 am

Re: USB Composite library?

Post by cptcredible »

Would like to see tid happen, can help with testing if necessary
Post Reply

Return to “Libraries & Hardware”