Skip to content

SPI Transactions #2223

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

Merged
merged 8 commits into from
Aug 8, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use SPI transaction in Ethernet W5100 init
  • Loading branch information
PaulStoffregen committed Aug 1, 2014
commit a0f5a2ee4ca50a6ea6a796c6ac6d2dfd659c35b0
2 changes: 2 additions & 0 deletions libraries/Ethernet/src/utility/w5100.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ void W5100Class::init(void)
SPI.setClockDivider(SPI_CS, 21);
SPI.setDataMode(SPI_CS, SPI_MODE0);
#endif
SPI.beginTransaction(SPI_ETHERNET_SETTINGS);
writeMR(1<<RST);
writeTMSR(0x55);
writeRMSR(0x55);
SPI.endTransaction();

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