Skip to content

Commit 80c674e

Browse files
Replace Arc with Rc in ledc_threads example (#514)
* Update ledc_threads.rs * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: ivmarkov <[email protected]>
1 parent 6c3cc56 commit 80c674e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717

1818
### Fixed
1919
- Fix the SDMMC driver for ESP-IDF V5.5+
20+
- Replace Arc with Rc in ledc_threads example (#514)
2021
- Fix outdated task docs
2122

2223
## [0.45.2] - 2025-01-15

examples/ledc_threads.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
use std::{sync::Arc, time::Duration};
1+
use std::rc::Rc;
2+
use std::time::Duration;
23

34
use embedded_hal_0_2::PwmPin;
45

@@ -15,7 +16,7 @@ fn main() -> anyhow::Result<()> {
1516

1617
let peripherals = Peripherals::take()?;
1718
let config = config::TimerConfig::new().frequency(25.kHz().into());
18-
let timer = Arc::new(LedcTimerDriver::new(peripherals.ledc.timer0, &config)?);
19+
let timer = Rc::new(LedcTimerDriver::new(peripherals.ledc.timer0, &config)?);
1920
let channel0 = LedcDriver::new(
2021
peripherals.ledc.channel0,
2122
timer.clone(),

0 commit comments

Comments
 (0)