diff --git a/README.md b/README.md index 7ac445efc..6dd47ab16 100644 --- a/README.md +++ b/README.md @@ -126,3 +126,21 @@ expect it to do so.* ## License [0-clause BSD license](LICENSE-0BSD.txt). + +## Contributing + +### Running Tests + +Tests are run via the integration test pattern and are executed on a target chip, rather than on a host system. +First, install [probe-run](https://crates.io/crates/probe-run) via `cargo install probe-run`. +Next, you'll need to modify `.cargo/config` to link defmt and use `probe-run` configured for your chip. +See details within the comments in that file. + +Now, you can execute a test by setting your device, defmt, and any test specific features: + +``` +cargo test --test rcc --features=stm32f303xc,defmt,rt +``` + +The result _always_ shows a backtrace, even in the case of success. +Exit code of 0 means that the run was successful. diff --git a/src/delay.rs b/src/delay.rs index 95ac2b3dd..1dab55c77 100644 --- a/src/delay.rs +++ b/src/delay.rs @@ -19,7 +19,7 @@ impl Delay { pub fn new(mut syst: SYST, clocks: Clocks) -> Self { syst.set_clock_source(SystClkSource::Core); - Delay { syst, clocks } + Delay { clocks, syst } } /// Releases the system timer (SysTick) resource