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

[DRAFT] add i2c support for teensy 4.0 and 4.1 #17

Merged
merged 2 commits into from
Sep 24, 2023
Merged

Conversation

kingbedjed
Copy link

still a work in progress but I think following the info in

https://github.com/Richard-Gemmell/teensy4_i2c - (teensy 4 i2c support README)

https://github.com/nox771/i2c_t3 - (teensy 3 i2c support README)

https://forum.pjrc.com/threads/62104-Teensy-4-and-4-1-pre-processor-defines?p=247546&viewfull=1#post247546 - (how to distiguish if we are on a teensy 4.0 or 4.1 board)

Still need to test this on a board though...

@kingbedjed
Copy link
Author

Things arent compling. Might need to split these path more...

@hmaarrfk
Copy link
Member

hmaarrfk commented Sep 1, 2023

i was playing around with both these libraries too.

I found that both these libraries had their own very strange interpretation of what Wire does.

error handling and all is very different....

thanks for taking a stab at it. I'll back off from my attempt to see how far you get and focus on different things.

I'll circle back here to see if you have any questions I can help with.

@hmaarrfk
Copy link
Member

Hey Jed,

Thanks for this amazing work!

I think I got it to work out in an other pull request. I didn't want to edit your stuff here for fear of breaking things.

However, the main change I made was to remove the calls to:

  err = Wire.getReadError();

where did that come from? I'm mostly confused as to why the compiler wasn't complaining.....

@hmaarrfk hmaarrfk merged commit 62883b2 into main Sep 24, 2023
4 checks passed
@kingbedjed
Copy link
Author

I think is must be from inherited class? I dont see it in the code, but it was suggested by vscode while I was looking for a replacement for err = Wire. getError()

@hmaarrfk
Copy link
Member

yeah. I don't think it exists at least not in a useful way. are you using copilot? copilot creates a bunch fake functions I found.

@hmaarrfk hmaarrfk deleted the i2c_support_teensy4 branch January 5, 2024 00:00
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.

2 participants