Click here to Skip to main content
15,894,328 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: It had to happen at some point Pin
honey the codewitch18-Dec-21 11:58
mvahoney the codewitch18-Dec-21 11:58 
GeneralRe: It had to happen at some point PinPopular
PIEBALDconsult18-Dec-21 12:12
mvePIEBALDconsult18-Dec-21 12:12 
GeneralRe: It had to happen at some point Pin
Super Lloyd18-Dec-21 12:21
Super Lloyd18-Dec-21 12:21 
GeneralRe: It had to happen at some point Pin
enhzflep19-Dec-21 10:19
enhzflep19-Dec-21 10:19 
GeneralRe: It had to happen at some point Pin
Randor 18-Dec-21 22:44
professional Randor 18-Dec-21 22:44 
GeneralRe: It had to happen at some point Pin
honey the codewitch19-Dec-21 0:16
mvahoney the codewitch19-Dec-21 0:16 
GeneralRe: It had to happen at some point Pin
Randor 19-Dec-21 0:48
professional Randor 19-Dec-21 0:48 
GeneralRe: It had to happen at some point Pin
honey the codewitch19-Dec-21 1:05
mvahoney the codewitch19-Dec-21 1:05 
That's not an extra pause. That's just polling for the SPI transfer to complete, and my code does it too.

Here's how I write a byte:

C++
*_spi_mosi_dlen = 7;
*_spi_w = value;
*_spi_cmd = SPI_USR;
while (*_spi_cmd & SPI_USR);


The only difference here is I'm referencing the registers via a volatile static member - but his code does that too - look at the different #ifdef paths. Also I'm using SPI_USR which is how you poll on an ESP32. I don't think you use the busy flag on this platform. not even sure it's defined. (he has different code files for different processors)

I use the frequency as well. It's a template argument to tft_spi<>
Real programmers use butterflies

GeneralRe: It had to happen at some point Pin
Randor 19-Dec-21 1:24
professional Randor 19-Dec-21 1:24 
GeneralRe: It had to happen at some point Pin
honey the codewitch19-Dec-21 1:51
mvahoney the codewitch19-Dec-21 1:51 
GeneralRe: It had to happen at some point Pin
Randor 19-Dec-21 2:00
professional Randor 19-Dec-21 2:00 
GeneralRe: It had to happen at some point Pin
honey the codewitch19-Dec-21 2:38
mvahoney the codewitch19-Dec-21 2:38 
GeneralXamarin anyone? Pin
Gerry Schmitz18-Dec-21 7:42
mveGerry Schmitz18-Dec-21 7:42 
GeneralRe: Xamarin anyone? Pin
0x01AA18-Dec-21 9:25
mve0x01AA18-Dec-21 9:25 
GeneralRe: Xamarin anyone? Pin
Gerry Schmitz19-Dec-21 6:48
mveGerry Schmitz19-Dec-21 6:48 
GeneralRe: Xamarin anyone? Pin
Super Lloyd18-Dec-21 11:58
Super Lloyd18-Dec-21 11:58 
GeneralDo you remember that time? Pin
0x01AA18-Dec-21 5:17
mve0x01AA18-Dec-21 5:17 
GeneralRe: Do you remember that time? Pin
Mike Hankey18-Dec-21 6:25
mveMike Hankey18-Dec-21 6:25 
GeneralRe: Do you remember that time? Pin
0x01AA18-Dec-21 7:00
mve0x01AA18-Dec-21 7:00 
GeneralRe: Do you remember that time? Pin
RickZeeland18-Dec-21 6:58
mveRickZeeland18-Dec-21 6:58 
GeneralRe: Do you remember that time? Pin
obermd18-Dec-21 7:32
obermd18-Dec-21 7:32 
GeneralRe: Do you remember that time? Pin
Mike Hankey18-Dec-21 7:57
mveMike Hankey18-Dec-21 7:57 
GeneralRe: Do you remember that time? Pin
theoldfool18-Dec-21 9:33
professionaltheoldfool18-Dec-21 9:33 
GeneralRe: Do you remember that time? Pin
Greg Utas18-Dec-21 9:53
professionalGreg Utas18-Dec-21 9:53 
GeneralRe: Do you remember that time? Pin
DRHuff18-Dec-21 11:28
DRHuff18-Dec-21 11:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.