-
Notifications
You must be signed in to change notification settings - Fork 214
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
dsi: add support for DSI host peripheral #786
Conversation
Not sure what is better. |
I wasn't sure either, so will follow any recommendations. Since the parameter isn't used it could be removed altogether; the purpose of the pin declarations appears to be for setting the ALT mode, which gets done by the calling code anyway. But if there are other intentions for this parameter we could make a separate constructor for the pin-less DSI case. |
Adapted from the stm32h7xx-hal implementation, changed to use register accessor functions and use the RCC enable/reset mechanisms which are different in the stm32f4xx-hal. Changes the `LtdcPins` argument to the `DisplayController` to be an `Option`, as they aren't used (and aren't needed for DSI interfaces).
LGTM. Do you have an example to add? |
I have an example in my BSP project but since that board requires SDRAM for framebuffer, it depends on stm32-rs/stm32-fmc#14 and #759 in order to work. I could add an example which configures the DSI peripheral on the STM32F469I-DISCO board and puts it in pattern test mode, as this does not require SDRAM and I might even be able to pare-down or eliminate the LTDC in this case. I will try this out and if that would be interesting I can add it to this pull request. |
Ok. Let's merge this PR and you open a new one with example when it will be ready. |
You can put an image in the internal flash, that way you also don't need the SDRAM. It's what i did in this PR with an Example: embassy-rs/embassy#2976 |
Good point and nice example @joelsa! Though ultimately SDRAM is needed for rendering dynamically, I did make a simple HAL test which uses the built-in pattern generator in #789. Hopefully your stm32-fmc change will get in soon 😄 |
Adapted from the stm32h7xx-hal implementation, changed to use register accessor functions and use the RCC enable/reset mechanisms which are different in the stm32f4xx-hal.
Changes the
LtdcPins
argument to theDisplayController
to be anOption
, as they aren't used (and aren't needed for DSI interfaces).Tested on STM32F469I-DISC board, in this project (pending various crate updates before that BSP is directly usable)