japaric / stm32f103xx-hal

HAL for the STM32F103xx family of microcontrollers
Apache License 2.0
115 stars 40 forks source link

Fix MonoTimer when no debugger is connected #94

Closed kellerkindt closed 5 years ago

kellerkindt commented 5 years ago

See issue japaric/stm32f103xx-hal/issues/76 and rust-embedded/cortex-m/pull/111. This PR requires that the PR on cortex-m is merged first. Can someone help me with the versioning? Should I bump the version in rust-embedded/cortex-m/pull/111 to 0.5.7 to be able to depend on it from here? Then this PR would also update the cortex-m dependency.

EDIT: Included in the PRs

kellerkindt commented 5 years ago

Since https://github.com/rust-embedded/cortex-m/pull/114 and https://github.com/rust-embedded/cortex-m/pull/111 are merged, this PR is now ready to be reviewed

kellerkindt commented 5 years ago

@TeXitoi I am sorry for the late reply. For the sake for progress, I added the TraceEnabled token-struct as you suggested (so we can continue the discussion). Does the location (timer.rs) make sense? Putting it into rcc.rs seems to be the alternative. Also the lone function doesn't seem to fit the overall style. Maybe something like TraceEnabled::enable(dcb) ?

TeXitoi commented 5 years ago

You don't have to be sorry. Don't forget that I'm just another contributor like you :-)

I'll read that when I'll find the time.

kellerkindt commented 5 years ago

Hmm, any new thoughts on this? :)

TeXitoi commented 5 years ago

@therealprof OK ?

therealprof commented 5 years ago

@TeXitoi I can't test it at the moment. But I take your word for it.