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 Bus #53

Open
BluesBilly opened this issue Sep 7, 2022 · 3 comments
Open

SPI Bus #53

BluesBilly opened this issue Sep 7, 2022 · 3 comments

Comments

@BluesBilly
Copy link

Can you overload init() function? You can specify which SPI bus to use.

void EthernetClass::init(uint8_t sspin)
{
W5100.setSS(sspin);
}

void EthernetClass::init(uint8_t sspin, SPIClass &spi)
{
_spi = spi;
W5100.setSS(sspin);
}

@sstaub
Copy link
Owner

sstaub commented Sep 7, 2022

Can you make a Pull Request? .init is reserved it should changed to .setSPI

@sstaub
Copy link
Owner

sstaub commented Sep 7, 2022

For change the CS pin there is Ethernet.setCsPin(3); // set Pin 3 for CS

@BluesBilly
Copy link
Author

Indeed, setspi is more reasonable. You need to add the function of setspi instead of using global SPI.

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

No branches or pull requests

2 participants