mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
Use SPI transaction in Ethernet W5100 init
This commit is contained in:
parent
8aaca2fbb6
commit
a0f5a2ee4c
@ -35,9 +35,11 @@ void W5100Class::init(void)
|
|||||||
SPI.setClockDivider(SPI_CS, 21);
|
SPI.setClockDivider(SPI_CS, 21);
|
||||||
SPI.setDataMode(SPI_CS, SPI_MODE0);
|
SPI.setDataMode(SPI_CS, SPI_MODE0);
|
||||||
#endif
|
#endif
|
||||||
|
SPI.beginTransaction(SPI_ETHERNET_SETTINGS);
|
||||||
writeMR(1<<RST);
|
writeMR(1<<RST);
|
||||||
writeTMSR(0x55);
|
writeTMSR(0x55);
|
||||||
writeRMSR(0x55);
|
writeRMSR(0x55);
|
||||||
|
SPI.endTransaction();
|
||||||
|
|
||||||
for (int i=0; i<MAX_SOCK_NUM; i++) {
|
for (int i=0; i<MAX_SOCK_NUM; i++) {
|
||||||
SBASE[i] = TXBUF_BASE + SSIZE * i;
|
SBASE[i] = TXBUF_BASE + SSIZE * i;
|
||||||
|
Loading…
Reference in New Issue
Block a user