Skip to content

Commit

Permalink
fix(demo): fix spi config usage
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf committed Dec 20, 2024
1 parent 46a8fe8 commit 9ea3ee6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions examples/hpm5300evk/src/bin/qspi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,14 +282,12 @@ fn main() -> ! {
// PA10
let mut led = Output::new(p.PA10, Level::Low, Speed::Fast);

let spi_config = Config {
frequency: Hertz(40_000_000),
mode: MODE_0,
timing: Timings {
cs2sclk: hpm_hal::spi::Cs2Sclk::_1HalfSclk,
csht: hpm_hal::spi::CsHighTime::_8HalfSclk,
},
..Default::default()
let mut spi_config = Config::default();
spi_config.frequency = Hertz(40_000_000);
spi_config.mode = MODE_0;
spi_config.timing = Timings {
cs2sclk: hpm_hal::spi::Cs2Sclk::_1HalfSclk,
csht: hpm_hal::spi::CsHighTime::_8HalfSclk,
};

let spi: hal::spi::Spi<'_, Blocking> =
Expand Down

0 comments on commit 9ea3ee6

Please sign in to comment.