Skip to content

update esp-hal-smartled (and esp-hal-buzzer) for esp-hal 1.0.0-rc.1#53

Merged
bugadani merged 7 commits intoesp-rs:mainfrom
badamson:updates-for-esp-hal-1.0.0-rc.1
Oct 26, 2025
Merged

update esp-hal-smartled (and esp-hal-buzzer) for esp-hal 1.0.0-rc.1#53
bugadani merged 7 commits intoesp-rs:mainfrom
badamson:updates-for-esp-hal-1.0.0-rc.1

Conversation

@badamson
Copy link
Copy Markdown
Contributor

@badamson badamson commented Oct 20, 2025

This pr updates esp-hal-smartled and esp-hal-buzzer for esp-hal 1.0.0-rc.1.

It replaces esp-hal-embassy with esp-rtos (w embassy feature) and updates deps. It makes backwards-incompatible changes for updates to the esp-hal rmt api:

It also removes the esp_bootloader_esp_idf dependency. The examples call esp_bootloader_esp_idf::esp_app_desc!(), but my understanding is that this is handled by flash tools and shouldn't be necessary.

The buzzer example's gpio pin was changed from 6 to 4 (edit: was 0) to fix build issues with h2.

This will still fail the docs build, pending a workaround or release of c6 that includes this fix:
https://github.com/esp-rs/esp-pacs/pull/381/files#diff-7cbde23f76faa89e81718f84999835338714b12a5cbccef5c5a1663cd1783fa6R6

Resolves #51.

@badamson badamson requested a review from MabezDev October 20, 2025 16:36
@AnthonyGrondin
Copy link
Copy Markdown
Collaborator

GPIO0 is a strapping pin for ESP32/S2/S3 so I don't think we should use that. I've looked at the HIL tests in esp-hal and there doesn't seem to be many unified pins we could use across board. I did a quick lookup in the metadata files and GPIO4 is available across all boards. @MabezDev can confirm on that.

We might just have a easier time feature gating it.

@badamson
Copy link
Copy Markdown
Contributor Author

thank you @AnthonyGrondin.

I did a quick lookup in the metadata files and GPIO4 is available across all boards. @MabezDev can confirm on that.

Went with gpio4 for now.

We might just have a easier time feature gating it.

Ha, I did that initially but didn't want to complicate the example. Failing 4, sounds good.

This replaces esp-hal-embassy with esp-rtos and updates deps. It makes backwards-incompatible changes for updates to the esp-hal rmt api:

- https://docs.rs/esp-hal/1.0.0-rc.0/esp_hal/rmt/index.html
- https://docs.rs/esp-hal/1.0.0-rc.1/esp_hal/rmt/index.html
@robamu
Copy link
Copy Markdown
Collaborator

robamu commented Oct 21, 2025

I'll test this on my ESP32-C3 dev board as well. ran out of ESP32-C6 I can easily access unfortunately...

@badamson badamson requested a review from MabezDev October 21, 2025 12:09
@AnthonyGrondin
Copy link
Copy Markdown
Collaborator

This should need a Changelog entry too.
We also forgot to bump the version in the Changelog when the latest versions were published

Copy link
Copy Markdown

@hicklin hicklin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not realise you were working on this and submitted my own PR. I closed my PR since your changes include fixes to the buzzer crate and cascade the use of the new PulseCode type which I left as a todo.

I have one comment about bumping the version. If we do so, we should probably also update the CHANGELOG.md. You can copy what I have in my closed PR and add to it as required.

macro_rules! smart_led_buffer {
( $num_leds: expr ) => {
[0u32; $crate::buffer_size($num_leds)]
[::esp_hal::rmt::PulseCode::default(); $crate::buffer_size($num_leds)]
Copy link
Copy Markdown
Contributor

@bugadani bugadani Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use PulseCode::end_marker() otherwise this macro won't work in const contexts.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pushed fix, ty

@badamson badamson requested a review from bugadani October 25, 2025 21:43
…-smartled` to `0.17.0`

- `cargo-edit`, `cargo set-version --workspace --bump minor`
@badamson badamson requested a review from hicklin October 25, 2025 21:50
Copy link
Copy Markdown
Contributor

@bugadani bugadani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@bugadani bugadani merged commit 728f276 into esp-rs:main Oct 26, 2025
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update for esp-hal rc1

6 participants