W5500 driver for mbed OS 5
Dependents: http-webserver-example mbed-os-example-sockets
Fork of W5500Interface by
Diff: W5500Interface.h
- Revision:
- 8:c71c66d43703
- Parent:
- 6:e2ab76b2be07
- Child:
- 10:925201b1603f
diff -r 1877881f3516 -r c71c66d43703 W5500Interface.h --- a/W5500Interface.h Thu Aug 09 08:42:47 2018 +0000 +++ b/W5500Interface.h Fri Aug 10 04:22:24 2018 +0000 @@ -23,6 +23,25 @@ #include "mbed.h" #include "W5500.h" //#include "rtos.h" +#include "PinNames.h" + +// Arduino pin defaults for convenience +#if !defined(W5500_SPI_MOSI) +#define W5500_SPI_MOSI D11 +#endif +#if !defined(W5500_SPI_MISO) +#define W5500_SPI_MISO D12 +#endif +#if !defined(W5500_SPI_SCLK) +#define W5500_SPI_SCLK D13 +#endif +#if !defined(W5500_SPI_CS) +#define W5500_SPI_CS D10 +#endif +#if !defined(W5500_SPI_RST) +#define W5500_SPI_RST NC +#endif + /** w5500_socket struct * W5500 socket @@ -43,7 +62,7 @@ class W5500Interface : public NetworkStack, public EthInterface { public: - W5500Interface(SPI* spi, PinName cs, PinName reset); + //W5500Interface(SPI* spi, PinName cs, PinName reset); W5500Interface(PinName mosi, PinName miso, PinName sclk, PinName cs, PinName reset); int init();