Skip to content

Commit

Permalink
dsi: add support for DSI host peripheral
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
tegimeki committed Aug 3, 2024
1 parent eca5943 commit dddb770
Show file tree
Hide file tree
Showing 8 changed files with 707 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Added

- Port `dsihost` implementation from stm32h7xx-hal [#786]
- I2C 10-bit address support for I2c [#772] [#783]
- `i2c_scanner` example [#758]
- Enable `sdio` for stm32f446
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ synopsys-usb-otg = { version = "0.4.0", features = [
], optional = true }
sdio-host = { version = "0.9.0", optional = true }
embedded-dma = "0.2.0"
embedded-display-controller = { version = "^0.2.0", optional = true }
bare-metal = { version = "1" }
void = { default-features = false, version = "1.0.2" }
display-interface = { version = "0.5.0", optional = true }
Expand Down Expand Up @@ -502,7 +503,7 @@ dcmi = []
dfsdm1 = ["dfsdm"]
dfsdm2 = ["dfsdm"]
dma2d = []
dsihost = []
dsihost = ["embedded-display-controller"]
eth = []
fmc = []
fsmc = []
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ single model.
* `usb_fs` or `usb_hs` — USB OTG FS/HS peripheral support. See [synopsys-usb-otg](https://crates.io/crates/synopsys-usb-otg).
* `fsmc_lcd` — LCD support via FMC/FSMC peripheral. See [display-interface](https://crates.io/crates/display-interface).
* `sdio-host` — SDIO peripheral support. See [sdio-host](https://crates.io/crates/sdio-host).
* `dsihost` — DSI host support. See [embedded-display-controller](https://crates.io/crates/embedded-display-controller).

Collaboration on this crate is highly welcome as are pull requests!

Expand Down
2 changes: 1 addition & 1 deletion examples/ltdc-screen/screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl<T: 'static + SupportedWord> Stm32F7DiscoDisplay<T> {
let controller = DisplayController::new(
ltdc,
dma2d,
pins,
Some(pins),
PixelFormat::RGB565,
DISCO_SCREEN_CONFIG,
Some(25.MHz()),
Expand Down
Loading

0 comments on commit dddb770

Please sign in to comment.