Skip to content

Commit

Permalink
Fix ledc example (#511)
Browse files Browse the repository at this point in the history
* Fix doc

* Update changelog
  • Loading branch information
Aemulation authored Jan 15, 2025
1 parent c11f078 commit 726aede
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Fixed
- Fix ledc example (#511)
- Fix missing sdspi_host_get_dma_info for sdcard driver bug (#509)


Expand Down
4 changes: 2 additions & 2 deletions src/ledc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
//! use esp_idf_hal::prelude::*;
//!
//! let peripherals = Peripherals::take().unwrap();
//! let timer_driver = LedcTimerDriver::new(peripherals.ledc.timer0, &TimerConfig::default().frequency(25.kHz().into()));
//! let timer_driver = LedcTimerDriver::new(peripherals.ledc.timer0, &TimerConfig::default().frequency(25.kHz().into()))?;
//! let mut driver = LedcDriver::new(peripherals.ledc.channel0, timer_driver, peripherals.pins.gpio1)?;
//!
//! let max_duty = driver.get_max_duty()?;
//! let max_duty = driver.get_max_duty();
//! driver.set_duty(max_duty * 3 / 4)?;
//! ```
//!
Expand Down

0 comments on commit 726aede

Please sign in to comment.