1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-24 19:42:27 +03:00
Files
esp8266/libraries/lwIP_Ethernet/src/LwipEthernet.cpp
david gauchard 5f2af1945b lwIP on ethernet: examples (#8395)
* 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
2022-06-02 14:03:38 +02:00

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);
}