Waveform generation trait
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- rust
- Domain
- embedded-iot
Research direction
Start with the Rust sketch in the issue, focusing on the proposed Microseconds type, PinState, and WaveGen trait. Clarify the API and timing semantics for bitbanging and PWM, including repeat behavior and pin toggling. Done means the trait design is agreed and its intended waveform-generation behavior is documented.
Written by the indexing model from the issue text.
Description
I'd like to propose a waveform generation trait. This would be useful for efficient bitbanging, PWM, etc.
I will begin with simple sketch and we will see where it will lead.
pub struct Microseconds(/*What should go here? Maybe `pub u32` is fine?*/);
pub enum PinState {
High,
Low,
}
pub trait WaveGen {
fn generate<I: Clone + IntoIterator<Item=Microseconds>>(&mut self, pin: Pin, initial_state: PinState, delays: I, repeat_count: u32);
}
The implementor should set the pin into state defined by initial_state, then wait for duration specified by item from delays and toggle the pin after each item.
I'd love to implement some drivers for wireless sockets I have.
- Dominant language
- Rust
- Stars
- 2.7k
- Forks
- 282
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-embedded/embedded-hal
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
rust-embedded/embedded-hal#742 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
rust-embedded/embedded-hal#747 · 5 comments · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
rust-embedded/embedded-hal#746 · 2 comments · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
rust-embedded/embedded-hal#745 · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
rust-embedded/embedded-hal#744 · 1 comment ·
All issues in rust-embedded/embedded-hal
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100