File tree 2 files changed +27
-2
lines changed
2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ critical-section-impl = ["critical-section/restore-state-u8"]
42
42
unstable-pac = []
43
43
44
44
# # Enable the timer for use with `embassy-time` with a 1MHz tick rate.
45
- time-driver = [" dep:embassy-time-driver" , " embassy-time-driver?/tick-hz-1_000_000" , " dep:embassy-time-queue-utils" ]
45
+ # time-driver = ["dep:embassy-time-driver", "embassy-time-driver?/tick-hz-1_000_000", "dep:embassy-time-queue-utils"]
46
+ time-driver = [" dep:embassy-time-driver" , " dep:embassy-time-queue-utils" ]
46
47
47
48
# # Enable ROM function cache. This will store the address of a ROM function when first used, improving performance of subsequent calls.
48
49
rom-func-cache = []
@@ -122,7 +123,15 @@ _rp235x = ["rp-pac/rp235x"]
122
123
rp235xa = [" _rp235x" ]
123
124
# # Configure the hal for use with the rp235xB
124
125
rp235xb = [" _rp235x" ]
125
-
126
+ # # Add a feature which configures `embassy-time-driver` with 150MHz `tick`s. This is an indication
127
+ # # by the upstream crate that the RP2350's `TIMER`s are configured with the system clock as their
128
+ # # source (typically 150MHz), instead of the usual 1MHz.
129
+ # # Compilation flag checks in `lib.rs` ensure this feature is only used together with `_rp235x`
130
+ timer-src-clk-sys = [
131
+ " dep:embassy-time-driver" ,
132
+ " embassy-time-driver?/tick-hz-150_000_000" ,
133
+ " dep:embassy-time-queue-utils" ,
134
+ ]
126
135
# hack around cortex-m peripherals being wrong when running tests.
127
136
_test = []
128
137
Original file line number Diff line number Diff line change 6
6
//! ## Feature flags
7
7
#![ doc = document_features:: document_features!( feature_label = r#"<span class="stab portability"><code>{feature}</code></span>"# ) ]
8
8
9
+ //! ## Compatible feature flags
10
+ // `timer-src-clk-sys` only makes sense on RP235x silicon.
11
+ #[ cfg( all(
12
+ feature = "timer-src-clk-sys" ,
13
+ not( feature = "_rp235x" ) ,
14
+ ) ) ]
15
+ compile_error ! (
16
+ "`embassy-rp` feature `timer-src-clk-sys` requires an `rp235x` feature (either `rp235xa` or \
17
+ `rp235xb`) to be enabled."
18
+ ) ;
19
+
20
+ // // Prevent users from selecting both timer drivers (although this condition causes a redefinition
21
+ // // error in our deps before this code can halt the compilation with an explanation...)
22
+ // #[cfg(all(feature = "timer-src-clk-sys", feature = "time-driver"))]
23
+ // compile_error!("Enable only one of `time-driver` or `timer-src-clk-sys`.");
24
+
9
25
// This mod MUST go first, so that the others see its macros.
10
26
pub ( crate ) mod fmt;
11
27
You can’t perform that action at this time.
0 commit comments