Skip to content

Override wire begin for ESP8266 to provide PINs #38

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

Closed
wants to merge 1 commit into from

Conversation

stefboerrigter
Copy link

  • Describe the scope of your change--i.e. what the change does and what parts
    of the code were modified.
    This will help us understand any risks of integrating
    the code.
    The scope of the change is to implement an begin override to provide 'custom' pins e.g. required for ESP8266.

  • Describe any known limitations with your change. None that i'm aware of. basic functionality shall remain as is.

  • Please run any tests or examples that can exercise your modified code. Verified this locally with I2C.

@stefboerrigter stefboerrigter mentioned this pull request Dec 17, 2019
/**
* Initializes the MCP23017 given its HW selected address, see datasheet for Address selection.
*/
void Adafruit_MCP23017::begin(uint8_t addr, uint8_t sda_pin, uint8_t scl_pin) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't pass in pins. Instead, pass in a Wire object. See comment here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why pass wire object? then wire needs to be exposed to calling library also, now this can be hidden when only pins are provided.
given the multiple pull requests & issues opened i think this is the more preffered way of the community.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we wont' accept it, you must make the Wire object and pass it in, thats is the official Arduino library methodology

@ladyada
Copy link
Member

ladyada commented May 25, 2020

hi we will not merge as this is best fixed by espressif - please comment here to request they add a function to do it
espressif/arduino-esp32#3779

@caternuson
Copy link
Contributor

Closing. I think the issue thread linked above addresses this. That plus being able to pass in a wire instance should support this feature.

@caternuson caternuson closed this Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants