Skip to content
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

Possibility to make pin check methods public #273

Closed
x29a opened this issue Feb 17, 2023 · 3 comments
Closed

Possibility to make pin check methods public #273

x29a opened this issue Feb 17, 2023 · 3 comments

Comments

@x29a
Copy link
Contributor

x29a commented Feb 17, 2023

Hi there and thanks for this great library!

Is there a reason why the pin check methods

static constexpr bool isValidGPIOpin(int8_t pin);
static constexpr bool isValidRxGPIOpin(int8_t pin);
static constexpr bool isValidTxGPIOpin(int8_t pin);

are in the private section of the class declaration?

If they were public, one could use the library to find appropriate pins, thanks to ESP32 pin multiplexing, this could be done during runtime. If course, there needs to be a valid device connected still ;)

At least it makes it easier to print out "yes, the pins you have configured are correct for this library".

@fanfanlatulipe26
Copy link

Have a look at : add "weak" attribute to function isValidGPIO , isValidRxGPIO , isValidTxGPIO #251
But is was closed
and also: Use GPIO2 as TX #261

@dok-net
Copy link
Collaborator

dok-net commented Feb 18, 2023

Implemented in d958f7b

@dok-net dok-net closed this as completed Feb 18, 2023
@x29a
Copy link
Contributor Author

x29a commented Feb 18, 2023

@fanfanlatulipe26 thanks for your pointers, i did look at the other open and closed issues for discussion but didnt find anything about accessibility of those methods, i think your weak linkage issue is more about the possibility to override the methods.

@dok-net thanks for the quick implementation! i updated the readme to reflect the new method names in #274

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

No branches or pull requests

3 participants