endWrite() and startWrite() #1955
Unanswered
Stredoslovak
asked this question in
Q&A - General
Replies: 1 comment 2 replies
-
Here are some thoughts of my own.. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm in a kind of a pitch. I'm running out of pins on my ESP32 and I need to add an SD card functionality to the project.
PROBLEM
I am using a 1.8 SPI TFT display (ST7735) connected to the SPI bus of the ESP32
I want to connect to the same pins with SD card and read/write the SD, in order to do that i need to end all communication related to the display (cuz that's how spi works)
QUESTION
From the documented pieces of code, what I understood was that:
If I will use the endWrite() function to pull the CS pin high I should be able to then communicate with the SD card (provided that I also pull the card CS pin low)
Now, when I want to resume communication with the display, I should use the startWrite() function.
Problem being that startWrite() has no comment at all and I don't know what will it do, as of now I don't have any test rig built so I can't test this myself. In theory communicating with other devices on the same bus is 100% possible, but given how do some libraries handle SPI communication it might turn out a problem.
Now, is this right or are there any other steps to use the same SPI bus to communicate with other devices?
Beta Was this translation helpful? Give feedback.
All reactions