Skip to content

Commit a0f5a2e

Browse files
Use SPI transaction in Ethernet W5100 init
1 parent 8aaca2f commit a0f5a2e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libraries/Ethernet/src/utility/w5100.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ void W5100Class::init(void)
3535
SPI.setClockDivider(SPI_CS, 21);
3636
SPI.setDataMode(SPI_CS, SPI_MODE0);
3737
#endif
38+
SPI.beginTransaction(SPI_ETHERNET_SETTINGS);
3839
writeMR(1<<RST);
3940
writeTMSR(0x55);
4041
writeRMSR(0x55);
42+
SPI.endTransaction();
4143

4244
for (int i=0; i<MAX_SOCK_NUM; i++) {
4345
SBASE[i] = TXBUF_BASE + SSIZE * i;

0 commit comments

Comments
 (0)