Skip to content

Have Wire1 pins autoset just like Wire #6999

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
1 task done
ladyada opened this issue Jul 16, 2022 · 7 comments · Fixed by #7034
Closed
1 task done

Have Wire1 pins autoset just like Wire #6999

ladyada opened this issue Jul 16, 2022 · 7 comments · Fixed by #7034
Assignees
Labels
Area: Peripherals API Relates to peripheral's APIs. Status: To be implemented Selected for Development Type: Feature request Feature request for Arduino ESP32
Milestone

Comments

@ladyada
Copy link
Contributor

ladyada commented Jul 16, 2022

Related area

I2C Peripheral

Hardware specification

Any hardware based on ESP32

Is your feature request related to a problem?

Wire is auto-setup for any ESP variant to the SDA/SCL pins
https://github.com/espressif/arduino-esp32/blob/master/variants/adafruit_qtpy_esp32s2/pins_arduino.h#L29
but SDA1/SCL1 pins do not do anything... it would be nice if setPins() was not required if these are #defined!
https://github.com/espressif/arduino-esp32/blob/master/variants/adafruit_qtpy_esp32s2/pins_arduino.h#L32

Describe the solution you'd like

we can submit a PR, but want to know whether it would be rejected before spending the time.

Describe alternatives you've considered

No response

Additional context

No response

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.
@ladyada ladyada added the Type: Feature request Feature request for Arduino ESP32 label Jul 16, 2022
@SuGlider
Copy link
Collaborator

SuGlider commented Jul 16, 2022

we can submit a PR, but want to know whether it would be rejected before spending the time.

I vote for moving forward with the PR.

but SDA1/SCL1 pins do not do anything... it would be nice if setPins() was not required if these are #defined!

YES!

https://github.com/espressif/arduino-esp32/blob/master/libraries/Wire/src/Wire.cpp#L78
https://github.com/espressif/arduino-esp32/blob/master/libraries/Wire/src/Wire.cpp#L95

I guess that this only means that when SoC is booted with Arduino, there is no initial pin setup for Wire1, but as suggested, a way to specify it for some boards that may label it, would be by testing SDA1/SCL1 defintion.

@SuGlider SuGlider added the Area: Peripherals API Relates to peripheral's APIs. label Jul 16, 2022
@VojtechBartoska
Copy link
Contributor

We discussed it today with whole team and we don't see an issue about this. PR is very welcomed! @ladyada

@SuGlider
Copy link
Collaborator

@ladyada - Are you currently working on it?
I'm currently working in the Wire API to add a size_t Wire::set BufferSize(size_t) function and I can then move to the Wire1 pin autoset feature after finishing.
Please let me know.

@SuGlider
Copy link
Collaborator

@ladyada - Please evaluate and test PR #7034

@SuGlider SuGlider moved this from Under investigation to In Progress in Arduino ESP32 Core Project Roadmap Jul 25, 2022
@VojtechBartoska VojtechBartoska moved this from In Progress to In Review in Arduino ESP32 Core Project Roadmap Jul 27, 2022
@ladyada
Copy link
Contributor Author

ladyada commented Jul 31, 2022

hi sorry i was totally halfway thru writing this PR and got completely swamped with a ton of folks visiting NYC in the last two weeks. will look now!

@ladyada
Copy link
Contributor Author

ladyada commented Aug 1, 2022

reviewed and works great - it will close this issue when merged :)

Repository owner moved this from In Review to Done in Arduino ESP32 Core Project Roadmap Aug 1, 2022
@ladyada
Copy link
Contributor Author

ladyada commented Aug 1, 2022

thank you @SuGlider for the great PR! 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Peripherals API Relates to peripheral's APIs. Status: To be implemented Selected for Development Type: Feature request Feature request for Arduino ESP32
Projects
Development

Successfully merging a pull request may close this issue.

6 participants