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

GPIO9 and 10 is overwritten during Adafruit_SSD1306:display() method #397

Closed
tprochazka opened this issue Nov 3, 2015 · 7 comments
Closed
Labels

Comments

@tprochazka
Copy link

If you will use GPIO9 a 10 as output pins together with Adafruit_SSD1306 library, state of these GPIOS will be overwritten every time that OLED is updated by display() method.

I'm not sure just now with the exact reason now.
But I'm very close. I tried to replace

*csport |= cspinmask;
*dcport |= dcpinmask;
*csport &= ~cspinmask;
*csport |= cspinmask;

by

digitalWrite(cs, HIGH);
digitalWrite(dc, HIGH);
digitalWrite(cs, LOW);
digitalWrite(cs, HIGH);

In Adafruit_SSD1306.cpp.
And problem is gone!

It looks that bit mask is incorrect and change more pins!
I checked that uint8_t is used for PortReg and PortMask it is correct for ESP like 32 bit CPU?
Or it is problem in digitalPinToBitMask() or portOutputRegister() ?

@tprochazka
Copy link
Author

tprochazka pushed a commit to tprochazka/Sming that referenced this issue Nov 3, 2015
tprochazka added a commit to tprochazka/Sming that referenced this issue Nov 3, 2015
@AutomationD AutomationD added the Bug label Nov 4, 2015
@anakod
Copy link
Member

anakod commented Nov 9, 2015

Ok, got it. I think we should make minimal test code for repeating this problem and when we can start working on register implementation part.

@tprochazka
Copy link
Author

I already localized and fix the problem, 8 bit variable was used in Sming instead of 32 bit for GPIO register.

@anakod
Copy link
Member

anakod commented Nov 10, 2015

Please look my comment to related P-R. I think it isn't right and willn't work for high pin numbers.

@tprochazka
Copy link
Author

@anakod ESP8266 Arduino project use also 32 bit register, why do you think that it will not work?

@hreintke
Copy link
Contributor

Issue should be moved to SmingRTOS.

@hreintke hreintke removed the Review label May 23, 2016
@tprochazka
Copy link
Author

I don't understand why this was fixed in RTOS version and not here, id this is still under development, or not?

slaff pushed a commit to slaff/Sming that referenced this issue Jul 31, 2017
slaff pushed a commit to slaff/Sming that referenced this issue Jul 31, 2017
tprochazka added a commit to tprochazka/Sming that referenced this issue Sep 15, 2017
tprochazka added a commit to tprochazka/Sming that referenced this issue Sep 15, 2017
slaff added a commit that referenced this issue Oct 14, 2017
* Updated the Adafruit SSD1306 library.
Added better Arduino compatibility.

* Re-added SH1106 support.

* Fix for wrong GPIO reg type (issue #397)

* Started fetching some Arduino libraries via git submodules.
Updated Adafruit_ST7735 library to its latest version.
Updated Adafruit_SSD1306 library to its latest version.

* Re-applied support for  SH1106_128_64 - 1.3" OLED display version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants