Skip to content

Conversation

@JordanMajd
Copy link

Fixes #45 by adding handlers for all for SAMD51 SERCOM I2C interrupts to wire.cpp and defining them in the appropriate variant.h.

This is opened as a draft, because the M4 Trellis has a conflict as it already defined handlers for SERCOM4 for use with UART Serial1 in its variants.cpp. I'm looking for advice on how to best resolve this.

@ladyada
Copy link
Member

ladyada commented Oct 31, 2019

thank you this is great! i think trellis is the tough one because its a multi-use port

however i think lets keep it for Serial use ... that way it can be used with MIDI which our demos show off. rather than I2C

sound OK?

@ladyada
Copy link
Member

ladyada commented Oct 31, 2019

looks good to me - let me know when the PR is ready for review / merge

@ladyada ladyada marked this pull request as ready for review October 31, 2019 19:00
@JordanMajd JordanMajd marked this pull request as ready for review October 31, 2019 19:00
@JordanMajd
Copy link
Author

Serial1 is back online, should be ready for review.

Keep kicking ass, you are an inspiration.

@ladyada
Copy link
Member

ladyada commented Oct 31, 2019

oh one more request, is there an example you used in Wire library to test? if it isnt already there please add the test sketch!

@JordanMajd
Copy link
Author

Tested with existing examples connected to an Uno running the corresponding master/slave example:

  • slave_receiver, slave_sender to verify I2C slave operations.
  • master_writer, master_reader to verify I2C existing master functionality.

Additionally tested slave_sender against a Pi CM3 running i2cdetect -y <bus> <address> and i2cget -y <bus> <address>

@JordanMajd
Copy link
Author

JordanMajd commented Oct 31, 2019

In addition to the above, I was only able to extensively test on an ItsyBitsy M4 and the Trellis M4 when Serial1 was disabled. Definitely worth testing on other hardware.

@ladyada ladyada merged commit 2b052e1 into adafruit:master Nov 3, 2019
@ladyada
Copy link
Member

ladyada commented Nov 3, 2019

tested a feather m4 successfully - you're a hero @JordanMajd :)

ladyada added a commit that referenced this pull request Nov 3, 2019
@ladyada
Copy link
Member

ladyada commented Dec 15, 2019

@JordanMajd hi please take a look at https://forums.adafruit.com/viewtopic.php?f=62&t=159769 if you have any suggestions for this person!

@JordanMajd
Copy link
Author

rolls d20

Yep, I'll look into it tonight.

@ladyada
Copy link
Member

ladyada commented Dec 16, 2019

:D thank u!

turmary pushed a commit to Seeed-Studio/ArduinoCore-samd that referenced this pull request Oct 22, 2020
turmary pushed a commit to Seeed-Studio/ArduinoCore-samd that referenced this pull request Dec 4, 2020
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.

M4 I2C as slave

2 participants