Skip to content

Commit a0ef93e

Browse files
committed
Fix example.
1 parent ab85cd6 commit a0ef93e

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

examples/rng.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,23 @@ fn main() -> ! {
4242
.cfgr
4343
// needed for RNG
4444
.clk48_source({
45-
if cfg!(any(
45+
#[cfg(any(
4646
feature = "stm32l476",
4747
feature = "stm32l486",
4848
feature = "stm32l496",
4949
feature = "stm32l4a6"
50-
)) {
50+
))]
51+
{
5152
Clk48Source::Hsi48
52-
} else {
53+
}
54+
55+
#[cfg(not(any(
56+
feature = "stm32l476",
57+
feature = "stm32l486",
58+
feature = "stm32l496",
59+
feature = "stm32l4a6"
60+
)))]
61+
{
5362
Clk48Source::Msi
5463
}
5564
})

0 commit comments

Comments
 (0)