-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Extend bus types and structure for Peripheral Manager #8888
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
Extend bus types and structure for Peripheral Manager #8888
Conversation
please post example sketch and output :) |
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.
Tested it. Everything worked as expected.
void * bus; | ||
int8_t bus_num; | ||
int8_t bus_channel; |
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.
Shouldn't extra_type
be changed to description
? I couldn't see other usage for it...
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.
it is an extra type. That is what is being used for. We added it for the cases where GPIO is being used for some specific task (like CS, RST, DC, etc.) and cases where different peripherals are used for some other specific task/driver. Hypothetic example would be implementing NeoPixel over RMT/Else and setting the extra type as NEOPIXEL_OUT
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.
Very Good Improvement @P-R-O-C-H-Y !
@me-no-dev - I think that we could already merge it. |
Description of Change
This PR extends informations about the pin in Peripheral manager:
bus_num
option to specify bus number or unit.bus_channel
option to specify bus channel.extra_type
for the bus used on the pin.All of those informations will be printed by
printPerimanInfo()
after end ofSetup()
if proper debug level is set.extra_attr.h
for easier use for some struct attributes.Output example:
Before:
With changes in PR:
Tests scenarios
Locally on ESP32 + CI.
Related links