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

SPI Updates #13

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

SPI Updates #13

wants to merge 2 commits into from

Conversation

JSchaenzle
Copy link

  • Updated Adafruit_SSD1306 to optionally use SPI1.
  • Pass chip select pin to spi::begin so that the driver
    no longer sets the pin mode for the default pins which may not
    be used.

- Updated Adafruit_SSD1306 to optionally use SPI1.
- Pass chip select pin to spi::begin so that the driver
  no longer sets the pin mode for the default pins which may not
  be used.
spiClass->setClockDivider(SPI_CLOCK_DIV8); // 72MHz / 8 = 9Mhz
spiClass->setDataMode(0);
spiClass->begin(cs); // Passing the chip-select here just sets the pin mode.
// The peripheral won't automatically assert/deassert the pin during operation.
Copy link
Author

Choose a reason for hiding this comment

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

By not passing the chip select pin here, we were mistakenly allowing the SPI driver to set up the default chip select pin, A2, as an output in addition to the pin that was passed in by the user.

Copy link
Author

Choose a reason for hiding this comment

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

@pkourany
Copy link
Owner

pkourany commented Oct 9, 2018

@JSchaenzle, to make this library work with Particle Libraries V2, I will need to add folders and move code around. I propose doing this in a different repo call Adafruit_SSD1306PK. That way, it will be compatible with Particle and make it easier to maintain.

@pkourany
Copy link
Owner

pkourany commented Oct 9, 2018

@JSchaenzle, seems I had already converted a version of this library to the Libraries 2.0 format but also to use mfGFX instead of just GFX. Perhaps we should make the changes in that repo instead. Any thoughts?

https://github.com/pkourany/Adafruit_SSD1306_mfGFX_IDE

@JSchaenzle
Copy link
Author

JSchaenzle commented Oct 9, 2018

Yeah sure. I can create a similar PR against that repo. What's the difference between mfGFX and GFX?

@pkourany
Copy link
Owner

pkourany commented Oct 9, 2018

I wrote mfGFX to support multiple fonts including user-defined ones. The latest Adafruit_GFX library does the same thing but fonts can ONLY be generated with their custom linux app which is difficult to use. Mine uses Windows free apps and is simple to use.

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