Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

New Feature: Peripheral Manager #6824

Closed
me-no-dev started this conversation in Ideas
Discussion options

Why

The ESP32 Family of chips have a large set of peripherals, that can provide different features, while not being bound to particular GPIOs. Some peripherals can provide more than one functionality and there are functionalities that can be provided by different peripherals at the same time (ex. LEDC can provide PWM, Servo and Tone, so can RMT, but RMT can also provide NeoPixel and others). Different chips have different subset of peripherals and peripherals themselves have different number of channels, limits, etc.

With Peripheral Manager we hope to provide tracking of available GPIOs, peripherals and channels, in order to have a cleaner and easy to use API with more features on more pins, as well as preventing some common mistakes, like using pins reserved for Flash and PSRAM.

Targets

  • Support analogWrite on more channels
  • Support Servo on more channels
  • Support Tone on more channels
  • Prevent use of reserved pins
  • Add more output/input options (ex. NeoPixel, OneWire, etc.)

Feature Ideas

  • Allow GPIO remapping, like on other MCUs
  • Allow picking the most appropriate peripheral for given functionality (ex. RMT will provide better Servo than LEDC)
  • Allow switching the peripheral if needed for higher priority functionality (ex. switch Servo channel from RMT to LEDC if channel for NeoPixel is needed)
  • Have LEDC select an already configured timer, if it matches the requirements (ex. all analogWrite channels can use the same timer. Same goes for Servo)
  • Output error if pin is invalid, reserved or already attached to another peripheral
  • Provide API to get GPIO/peripheral status and availability
  • Keep backward compatibility (ex. libs that use LEDC and have already predefined channel)
You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

If you want to provide a way for users to interactivity experiment with the new Peripheral Manager prototype on Wokwi so they can provide feedback / want to test the prototype on Wokwi, please ping me and I'll be happy to assist.

You must be logged in to vote
1 reply
Comment options

Thanks Uri for this option, so far we didn't figure out how to implement this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
Type: Feature request Feature request for Arduino ESP32 Area: Peripherals API Relates to peripheral's APIs. Status: Solved The issue has been resolved and requires no further action.

AltStyle によって変換されたページ (->オリジナル) /