Skip to content

Commit 16390bc

Browse files
Merge #680
680: docs: brief intro to `critical-section` r=burrbull a=duskmoon314 May need to add more details close #679 Co-authored-by: Campbell He <[email protected]>
2 parents 760fce7 + 716c8ff commit 16390bc

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1717
- Make writing raw bits to a whole register safe if the SVD indicates
1818
so through the <WriteConstraint> element (see [v0.7.1] too).
1919
- Remove lint #![deny(const_err)] as it is a hard error in Rust now
20+
- Add doc of using `critical-section`
2021

2122
## [v0.26.0] - 2022-10-07
2223

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@
185185
//! let panics = stm32f30x::Peripherals::take().unwrap();
186186
//! ```
187187
//!
188+
//! This method needs an implementation of `critical-section`. You can implement it yourself or
189+
//! use the implementation provided by the target crate like `cortex-m`, `riscv` and `*-hal` crates.
190+
//! See more details in the [`critical-section`](https://crates.io/crates/critical-section) crate documentation.
191+
//!
188192
//! The singleton property can be *unsafely* bypassed using the `ptr` static method which is
189193
//! available on all the peripheral types. This method is useful for implementing safe higher
190194
//! level abstractions.

0 commit comments

Comments
 (0)