You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Enable critical-section feature in portable-atomic.
27
-
#
28
-
# `portable-atomic` emulates atomic CAS functionality, allowing `embedded-hal-bus` to use `atomic-device` on hardware that does not natively support atomic CAS.
29
-
# This feature requires a critical-section implementation, which is most often provided by your arch crate (cortex-m / riscv / msp430 / avr-device / etc) when the `critical-section-single-core` feature is enabled.
30
-
# A list of critical-section impls is available [in the critical section docs](https://github.com/rust-embedded/critical-section?tab=readme-ov-file#usage-in-no-std-binaries)
# Enable unsafe-assume-single-core feature of portable-atomic.
33
-
#
34
-
# `portable-atomic` emulates atomic CAS functionality, allowing `embedded-hal-bus` to use `atomic-device` on hardware that does not natively support atomic CAS.
35
-
# This feature is only safe on single core systems
-**`atomic-device`**: enable shared bus implementations that require Atomic CAS operations.
35
34
-**`defmt-03`**: Derive `defmt::Format` from `defmt` 0.3 for enums and structs.
36
-
-**`portable-atomic-critical-section`**: Enable critical-section feature in portable-atomic.
35
+
-**`portable-atomic`**: Use `portable-atomic` to enable `atomic-device` on devices without native atomic CAS
37
36
38
-
`portable-atomic` emulates atomic CAS functionality, allowing `embedded-hal-bus` to use `atomic-device` on hardware that does not natively support atomic CAS.
39
-
This feature requires a critical-section implementation, which is most often provided by your arch crate (cortex-m / riscv / msp430 / avr-device / etc) when the `critical-section-single-core` feature is enabled.
40
-
A list of critical-section impls is available [in the critical section docs](https://github.com/rust-embedded/critical-section?tab=readme-ov-file#usage-in-no-std-binaries)
41
-
-**`portable-atomic-unsafe-assume-single-core`**: Enable unsafe-assume-single-core feature of portable-atomic.
42
-
43
-
`portable-atomic` emulates atomic CAS functionality, allowing `embedded-hal-bus` to use `atomic-device` on hardware that does not natively support atomic CAS.
44
-
This feature is only safe on single core systems
37
+
`portable-atomic` emulates atomic CAS functionality, allowing `embedded-hal-bus` to use `atomic-device` on hardware
38
+
that does not natively support atomic CAS. If you enable this, you must also add `portable-atomic` to your crate with
39
+
a feature flag such as `unsafe-assume-single-core` or `critical-section` to choose how atomic CAS is implemented.
40
+
See https://docs.rs/portable-atomic/1.7.0/portable_atomic/#optional-features for more info.
45
41
-**`std`**: enable shared bus implementations using `std::sync::Mutex`, and implement
0 commit comments