aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAlexandru RADOVICI <[email protected]>2024-04-02 17:20:35 +0300
committerAlexandru RADOVICI <[email protected]>2024-04-02 17:20:35 +0300
commitaa9eb2ab01cb21e06bb12efb425088827f6127d9 (patch)
tree1a2df329ec5521f8a390c0f8a1376b50e792727a /examples
parent016d552d1addb175ecba2bd96d794d8135fd51cc (diff)
rename PWM_CH to PWM_SLICE
Diffstat (limited to 'examples')
-rw-r--r--examples/rp/src/bin/pio_hd44780.rs2
-rw-r--r--examples/rp/src/bin/pwm.rs2
-rw-r--r--examples/rp/src/bin/pwm_input.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/rp/src/bin/pio_hd44780.rs b/examples/rp/src/bin/pio_hd44780.rs
index 3fab7b5f2..6c02630e0 100644
--- a/examples/rp/src/bin/pio_hd44780.rs
+++ b/examples/rp/src/bin/pio_hd44780.rs
@@ -35,7 +35,7 @@ async fn main(_spawner: Spawner) {
35 // allowing direct connection of the display to the RP2040 without level shifters. 35 // allowing direct connection of the display to the RP2040 without level shifters.
36 let p = embassy_rp::init(Default::default()); 36 let p = embassy_rp::init(Default::default());
37 37
38 let _pwm = Pwm::new_output_b(p.PWM_CH7, p.PIN_15, { 38 let _pwm = Pwm::new_output_b(p.PWM_SLICE7, p.PIN_15, {
39 let mut c = pwm::Config::default(); 39 let mut c = pwm::Config::default();
40 c.divider = 125.into(); 40 c.divider = 125.into();
41 c.top = 100; 41 c.top = 100;
diff --git a/examples/rp/src/bin/pwm.rs b/examples/rp/src/bin/pwm.rs
index 4fb62546d..26e233260 100644
--- a/examples/rp/src/bin/pwm.rs
+++ b/examples/rp/src/bin/pwm.rs
@@ -18,7 +18,7 @@ async fn main(_spawner: Spawner) {
18 let mut c: Config = Default::default(); 18 let mut c: Config = Default::default();
19 c.top = 0x8000; 19 c.top = 0x8000;
20 c.compare_b = 8; 20 c.compare_b = 8;
21 let mut pwm = Pwm::new_output_b(p.PWM_CH4, p.PIN_25, c.clone()); 21 let mut pwm = Pwm::new_output_b(p.PWM_SLICE4, p.PIN_25, c.clone());
22 22
23 loop { 23 loop {
24 info!("current LED duty cycle: {}/32768", c.compare_b); 24 info!("current LED duty cycle: {}/32768", c.compare_b);
diff --git a/examples/rp/src/bin/pwm_input.rs b/examples/rp/src/bin/pwm_input.rs
index e7bcbfbd4..0652dc42b 100644
--- a/examples/rp/src/bin/pwm_input.rs
+++ b/examples/rp/src/bin/pwm_input.rs
@@ -14,7 +14,7 @@ async fn main(_spawner: Spawner) {
14 let p = embassy_rp::init(Default::default()); 14 let p = embassy_rp::init(Default::default());
15 15
16 let cfg: Config = Default::default(); 16 let cfg: Config = Default::default();
17 let pwm = Pwm::new_input(p.PWM_CH2, p.PIN_5, InputMode::RisingEdge, cfg); 17 let pwm = Pwm::new_input(p.PWM_SLICE2, p.PIN_5, InputMode::RisingEdge, cfg);
18 18
19 let mut ticker = Ticker::every(Duration::from_secs(1)); 19 let mut ticker = Ticker::every(Duration::from_secs(1));
20 loop { 20 loop {