-
Notifications
You must be signed in to change notification settings - Fork 826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usbh prerequisites (part 2) #3348
base: main
Are you sure you want to change the base?
Conversation
…isochronuous channels
hey! did you write this manually? that file is autogenerated from https://github.com/embassy-rs/stm32-data/blob/main/data/registers/otg_v1.yaml . Could you add the missing registers there and then sync the generated code? |
It was written by hand since there wasn't any note about it I had assumed it was only auto-generated to get a starting point. There are also a few things that I don't think are possible with the yaml like:
Even without the assert I'm also not sure how to define |
For qtaddr you can just make it a u32, and ensure in the driver the value you write is aligned. For That file is a "mini PAC", it defines the registers of the peripheral. It shouldn't do any special validation, that's better left to a higher layer (the driver/HAL). You're right there should've been a warning, sorry about that. |
@Dirbaio I've completed adding the registers in embassy-rs/stm32-data#529 it's a bit hard to review if nothing else has changed before my previous pull-request since the output of chiptool was different than the existing file. |
Add USBOTG registers from embassy-rs/embassy#3348
It seems like there were previously some manual changes related to |
@Dirbaio seems like the new gen also affects other packages now, do we want to make a breaking change to update generation or should I revert to the original PR? |
This is a follow-up to #3253 now that I've finished a reference implementation based on
usbh
.It should now have all registers required make Host HS/FS/LS FIFO/Buffer-DMA/Scatter-gather-DMA driver on an ESP32* and similar devices that have a Synopsys USBOTG core.
The only registers missing are
GHWCFG{1..=4}
, I've added them as u32, but some may be needed to do feature detection of e.g. HS phy, scatter-gather dma support, number of EPs.If desired I can either make a later follow-up for the GHWCFG or include it in this one (may take a few days).
I also found a source for register documentation so I've added it to the module description.
The reference implementation still needs to be cleaned up and is planned to be added in a pull-request to esp-rs, since it's not async. In the future I may port it to embassy if embassy adopts a standard host trait (I know there is a proposal in #3307)