Skip to content

Commit

Permalink
Add a defmt feature to esp-hal-smartled (esp-rs#846)
Browse files Browse the repository at this point in the history
* Add a `defmt` feature to `esp-hal-smartled`

* Update `CHANGELOG.md`
  • Loading branch information
jessebraham authored and MabezDev committed Oct 20, 2023
1 parent 9747a8c commit 684cc71
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support for ULP-RISCV including Delay and GPIO (#840, #845)
- Add bare-bones SPI slave support, DMA only (#580, #843)
- Embassy `#[main]` convenience macro (#841)
- Add a `defmt` feature to the `esp-hal-smartled` package (#846)

### Changed

Expand Down
3 changes: 3 additions & 0 deletions esp-hal-smartled/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ license = "MIT OR Apache-2.0"
features = ["esp32c3"]

[dependencies]
defmt = { version = "0.3.5", optional = true }
esp-hal-common = { version = "0.12.0", path = "../esp-hal-common" }
fugit = "0.3.7"
smart-leds-trait = "0.2.1"
Expand All @@ -25,3 +26,5 @@ esp32s3 = ["esp-hal-common/esp32s3"]

xtal-26mhz = ["esp-hal-common/xtal-26mhz"]
xtal-40mhz = ["esp-hal-common/xtal-40mhz"]

defmt = ["dep:defmt", "esp-hal-common/defmt"]
1 change: 1 addition & 0 deletions esp-hal-smartled/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const SK68XX_T1L_CYCLES: u16 = ((SK68XX_T1L_NS * (SOURCE_CLK_FREQ / 1_000_000))
/// All types of errors that can happen during the conversion and transmission
/// of LED commands
#[derive(Debug)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum LedAdapterError {
/// Raised in the event that the provided data container is not large enough
BufferSizeExceeded,
Expand Down

0 comments on commit 684cc71

Please sign in to comment.