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

Hardware SPI BREAKING: unswap mode 2 and 3 for portability #5948

Merged
merged 3 commits into from Apr 5, 2019

Conversation

d-a-v
Copy link
Collaborator

@d-a-v d-a-v commented Apr 4, 2019

use SPI.restoreEsp8266LegacyMode2And3() for former behaviour

fix #2416
close #2418

This snippet can be used to manage this breaking change and portability.

use SPI.restoreEsp8266LegacyMode2And3() for former behaviour
@d-a-v d-a-v changed the title Spi23 Hardware SPI BREAKING: unswap mode 2 and 3 for portability Apr 4, 2019
devyte
devyte previously requested changes Apr 4, 2019
Copy link
Collaborator

@devyte devyte left a comment

Choose a reason for hiding this comment

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

I suggest marking the method as deprecated right away.

@d-a-v
Copy link
Collaborator Author

d-a-v commented Apr 4, 2019

I suggest marking the method as deprecated right away.

Per #2416 (comment), I think it would make things not consistent. Marking it deprecated is a way to tell user to change source code. If we want that, I'd just remove this new call (see the number of votes in the comment just before mine).

Keeping it as it is will help esp8266-only trans-core-version projects to live until they are able to make it without older cores.

To summarize:

  • I'm ok to remove this call now (I can already hear complaints from behind the 3 years old hill)
  • To keep it and mark it deprecated just after next release

edit: removed

@d-a-v d-a-v dismissed devyte’s stale review April 5, 2019 21:47

function removed

@d-a-v d-a-v merged commit 77451d6 into esp8266:master Apr 5, 2019
@d-a-v d-a-v deleted the spi23 branch April 5, 2019 23:13
@olikraus
Copy link

Thanks! 👍

@olikraus
Copy link

Hmmm... I might be missing something, but I do not find "SPI.restoreEsp8266LegacyMode2And3() "
When used, it gives a compiler error. I also do not find this function in the latest ESP8266 SPI sources.

@olikraus
Copy link

Great, everything works as expected for 2.5.1, see olikraus/u8g2#53

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.

SPI Library: SPI Mode 2 and 3 are wrong
3 participants