a possible idea here would be to define a driver target definition such as:
TARGET_EXTERNAL_SPI_W5100
which makes it clear it is an external component using an SPI interface - the developer would simply specify the corresponding pinout uses for SPI (MOSI, MISO, SCLK, CS). for example; using the nRF51-DK with the WizNet library the configuration connected to the arduino headers provided was as simple as
SPI spi(P0_25, P0_28, P0_29); mosi, miso, sclk
WIZnetInterface eth(&spi, P0_24, P0_0); spi, cs, reset
while it may not seem an obvious thing right now - you can imagine the possibilities when there is a desire to take advantage of anything that it built on top of lwip (more notably; IPv6) :) most of these external boards provide a basic TCP/UDP layers and in addition to raw modes (IPRAW and MACRAW) - but naturally the provided drivers may not be yet fully exploiting this.
Aaron
Horst Hevert wrote:
Hi, I miss two functions. With the old version of EthernetNetIf I control the physical port state.
eth.link() = returns the current ethernet port state (link or no link).
eth.set_link() = sets the ethernet port parameter speed and duplex mode.
Do you plan to implement these functions in the future ?
Best regards, Horst
PS: Please excuse my bad english!
+1 for this, especially the eth.link(). Unless someone knows of another way to get the link and speed led status from the PHY. I know they are connected to P1_25 and P1_26 but DigitalIn(P1_25) seems to kill the mbed.
Adrian.