aboutsummaryrefslogtreecommitdiff
path: root/cyw43-pio/src
diff options
context:
space:
mode:
authorBailey Townsend <[email protected]>2024-12-27 12:29:17 -0600
committerBailey Townsend <[email protected]>2024-12-27 12:29:17 -0600
commit56f9296581800dca70474459debf4a429b312e50 (patch)
tree7cfb7baab84eabe7afdf7718e2dfc3de826322c7 /cyw43-pio/src
parentb71696c8f54edba664e9bfe77a1d86d09d88f52c (diff)
Added a new rm2 feature flag
Diffstat (limited to 'cyw43-pio/src')
-rw-r--r--cyw43-pio/src/lib.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/cyw43-pio/src/lib.rs b/cyw43-pio/src/lib.rs
index 40cf63a17..1280e2059 100644
--- a/cyw43-pio/src/lib.rs
+++ b/cyw43-pio/src/lib.rs
@@ -120,7 +120,7 @@ where
120 cfg.clock_divider = FixedU32::from_bits(0x0100); 120 cfg.clock_divider = FixedU32::from_bits(0x0100);
121 } 121 }
122 122
123 #[cfg(not(feature = "overclock"))] 123 #[cfg(not(any(feature = "overclock", feature = "rm2")))]
124 { 124 {
125 // same speed as pico-sdk, 62.5Mhz 125 // same speed as pico-sdk, 62.5Mhz
126 // This is actually the fastest we can go without overclocking. 126 // This is actually the fastest we can go without overclocking.
@@ -132,6 +132,12 @@ where
132 cfg.clock_divider = FixedU32::from_bits(0x0200); 132 cfg.clock_divider = FixedU32::from_bits(0x0200);
133 } 133 }
134 134
135 #[cfg(feature = "rm2")]
136 {
137 // This is found to work better with the RM2 module which is found on the Pimoroni Pico Plus 2 W
138 cfg.clock_divider = FixedU32::from_bits(0x0300);
139 }
140
135 sm.set_config(&cfg); 141 sm.set_config(&cfg);
136 142
137 sm.set_pin_dirs(Direction::Out, &[&pin_clk, &pin_io]); 143 sm.set_pin_dirs(Direction::Out, &[&pin_clk, &pin_io]);