mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-24 19:42:27 +03:00
* ethernet: examples * remove duplicate * styling * fix comment restyle + comment eth.setdefault() * comment and add comments about eth.setDefault() * update comments when using interface::setDefault() * repair bad merge * fix default interface case * factorize * change comment
16 lines
299 B
C++
16 lines
299 B
C++
|
|
#include <LwipEthernet.h>
|
|
#include <SPI.h>
|
|
|
|
#ifndef ETHERNET_SPI_CLOCK_DIV
|
|
#define ETHERNET_SPI_CLOCK_DIV SPI_CLOCK_DIV4 // 4MHz (SPI.h)
|
|
#endif
|
|
|
|
void SPI4EthInit()
|
|
{
|
|
SPI.begin();
|
|
SPI.setClockDivider(ETHERNET_SPI_CLOCK_DIV);
|
|
SPI.setBitOrder(MSBFIRST);
|
|
SPI.setDataMode(SPI_MODE0);
|
|
}
|