Skip to content

Enable other wire instances #74

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rw-schumann
Copy link

Description

Enabling use of Wire1, Wire2 etc TwoWire objects. Current version only supports the Wire object

Fixes # (issue)
There is no pending issue request for this

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • [ X] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Updated my own code to reference Wire2 and now access my MCP chip.
  • Made a copy of the SimpleBatteryTest routine adding Wire2 in the constructor and it works as expected

Test Configuration:

  • Arduino version: 2.3.3
  • Arduino Hardware: Teensy4.1
  • SDK: (Arduino IDE, Atmel Studio, Visual Studio, Visual Micro, etc.) Arduino IDE
  • Development sytem: (Windows, Web, Linux, etc.) Windows 11

Checklist:

  • The changes made link back to an existing issue number
  • [ x] I have performed a self-review of my own code
  • [ x] My code follows the style guidelines of this project
  • [ x] I have commented my code, particularly in hard-to-understand areas
  • [ x] The code adheres to the Google Style Guide
  • [ x] The code follows the existing program documentation style using doxygen
  • I have made corresponding changes to the documentation / Wiki Page(s)
  • [x ] My changes generate no new warnings
  • The automated TRAVIS-CI run has a status of "passed"
  • [x ] I have checked potential areas where regression errors could occur and have found no issues
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Zanshin Logo

-Updated initializer to take an optional TwoWire pointer.
-Changed all Wire call to use the pointer.
- Uses Wire as default (eg  fully backwards compatible)
- TwoWire port can be set during instantiation or later
- Added a setWire function to change the wire port after instantiation.
Changed to initialize the wire port by default
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

Successfully merging this pull request may close these issues.

1 participant