Skip to content

Rework PWM output lifecycle#32

Merged
cleishm merged 2 commits intomainfrom
fix/pwm-tests
Mar 31, 2026
Merged

Rework PWM output lifecycle#32
cleishm merged 2 commits intomainfrom
fix/pwm-tests

Conversation

@cleishm
Copy link
Copy Markdown
Owner

@cleishm cleishm commented Mar 30, 2026

Restructure channel configuration to avoid repeated ledc_channel_config/ledc_stop cycles. Key changes:

  • Channel reuse optimization: skip ledc_channel_config when GPIO+timer match
  • Track duty locally instead of reading hardware register
  • Add output::is_active() and output::timer() accessors
  • Remove output::gpio() accessor and public make() methods
  • Add to_ledc(channel) helper to reduce cast repetition
  • Avoid USB GPIO pins (19/20) in hardware tests

cleishm added 2 commits March 30, 2026 15:45
Restructure channel configuration to avoid repeated ledc_channel_config/ledc_stop
cycles. Key changes:

- Channel reuse optimization: skip ledc_channel_config when GPIO+timer match
- Track duty locally instead of reading hardware register
- Add output::is_active() and output::timer() accessors
- Remove output::gpio() accessor and public make() methods
- Add to_ledc(channel) helper to reduce cast repetition
@cleishm cleishm merged commit e41edf5 into main Mar 31, 2026
34 checks passed
@cleishm cleishm deleted the fix/pwm-tests branch March 31, 2026 01:09
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.

1 participant