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

Allow for an explicit change of SPI speed #160

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
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
7 changes: 6 additions & 1 deletion src/utility/w5100.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@
#include <Arduino.h>
#include <SPI.h>

// add SPI_ETHERNET_SPEED to allow for an explicit change of SPI speed
#ifndef SPI_ETHERNET_SPEED
#define SPI_ETHERNET_SPEED 14000000
#endif

// Safe for all chips
#define SPI_ETHERNET_SETTINGS SPISettings(14000000, MSBFIRST, SPI_MODE0)
#define SPI_ETHERNET_SETTINGS SPISettings(SPI_ETHERNET_SPEED, MSBFIRST, SPI_MODE0)

// Safe for W5200 and W5500, but too fast for W5100
// Uncomment this if you know you'll never need W5100 support.
Expand Down