Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

What's the difference? #10289

yuriy23 started this conversation in General
Sep 4, 2024 · 1 comments · 3 replies
Discussion options

What is the difference in terms of speed, occupied RAM, and so on?

SPIClass * hspi = NULL;
void TaskSPI(void *pvParameters)
{
hspi = new SPIClass(HSPI);
hspi->begin(36, 35, 21, 47); //SCLK, MISO, MOSI, SS
}

** **Or so****

#define VSPI 3
SPIClass vspi = SPIClass(VSPI);
void TaskSPI(void *pvParameters)
{
SPIClass vspi = SPIClass(VSPI);
vspi.begin(36, 35, 21, 47); //SCLK, MISO, MOSI, SS
}

You must be logged in to vote

Replies: 1 comment · 3 replies

Comment options

None. You are just using another SPI port

You must be logged in to vote
3 replies
@yuriy23
Comment options

the question is not about the port number, but about a different entry..
vspi->begin
vspi.begin

@me-no-dev
Comment options

. you access the object directly, -> you access it by reference to it's location in memory. No difference in speed or anything else.

@yuriy23
Comment options

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.