-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement TryFrom<u32>
for ledc::timer::config::Duty
#1984
Conversation
1a6c76e
to
b799390
Compare
ad5e912
to
cd78bc5
Compare
fcccd1d
to
00248bc
Compare
Sorry for hijacking your PR for this, but I guess we need to have some discussion with regards to where packages like this belong. We have |
I agree with this. I see it like a chicken 🐔 and egg 🥚 situation. Such extra packages are an unnecessary burden because nobody uses them, but nobody uses them because such package doesn't exist. My original intent was to add the Buzzer as a new driver in the HAL. But since it's not technically a hardware driver, but rather a combination of drivers, it was suggested to move the buzzer driver in its own specific package. I agree with moving both |
Sorry for the delay here, it took some time for us to discuss and decide on how we wanted to proceed. We have decided to create the esp-hal-community repository, to which I have already moved I have not really documented the contribution process there yet (though I did open an issue), but I hope it is intuitive enough. Feel free to ping me if you need any assistance :) |
- Initially submitted in esp-rs/esp-hal#1984
- Initially submitted in esp-rs/esp-hal#1984
4c5da7a
to
32e77e0
Compare
esp-hal-buzzer
to drive a piezo-electric buzzer.TryFrom<u32>
for ledc::timer::config::Duty
Provides a driver for a piezo-electric buzzer by abstracting LEDC and offering a user-friendly API for a buzzer
32e77e0
to
51d7d9c
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Add `esp-hal-buzzer` to drive a piezo-electric buzzer - Initially submitted in esp-rs/esp-hal#1984 * Add missing dependencies and `.cargo/config.toml` * Use patched `esp-hal` until new release * Add check CI check for `esp-hal-buzzer`
Thank you for your contribution!
We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:
Submission Checklist 📝
cargo xtask fmt-packages
command to ensure that all changed code is formatted correctly.CHANGELOG.md
in the proper section.Extra:
Pull Request Details 📖
Description
This is a resurrection for #814 that was closed by mistake a while ago. The intent is to provides a driver for a piezo-electric buzzer by abstracting LEDC and offering a user-friendly API to control the buzzerSince the GPIO refactoring, I've solved the issue I had with providing a type for an optional volume pin.Testing
An example was added inesp-hal-buzzer/examples/buzzer.rs
and works on my hardware. The duty volume is working on the specific hardware that I have, using logic gates to decrease the output.Edit: The
esp-hal-buzzer
package has been moved to https://github.com/esp-rs/esp-hal-community so I've kept only the part of this PR that touchesesp-hal
, which is to implementTryFrom<u32>