sstaub / Ethernet3

Ethernet library for Arduino and Ethernetshield2 / WIZ550io / WIZ850io / USR-ES1 with Wiznet W5500 chip
Other
76 stars 34 forks source link

set and get register value from w5500 #13

Closed Ringer23 closed 6 years ago

Ringer23 commented 6 years ago

I used the eonardo ETH with Enernet2.h and the new function in version 3 is more or less what i reach for. 1) Ethernet.begin => Good 2) set reset and CS Pin => good 3) phy support => good start point a) read speed and duplex is good => but better to read the hole register b) also to write the rigister would I needed => so set W5500 to power down PHYCFGR (0x002E) c) also read/write to register MR 0x0000 (needed for wake on lan and Power over ethernet) Function can called like Ethernet.setRegister(enum register,uint8_t value);

sstaub commented 6 years ago

I will do it in the version2 of the library, planned next month.

Ringer23 commented 6 years ago

Hello SStaub,

i saw you have in the layers below the function already implemented. so it can look like void EthernetUDP::setSnMR(bool status, unit8_t bitfield) { uint8_t value; value = w5500.readSnMR(_sock); if (status !=0) { value |= bitfield; } else { value &= ~bitfield; } w5500.writeSnMR(_sock, value); }

call with udp.setSnMR(true, MR_PPPOE);

the reason why I need this is to reduce the current consumption (WoL, Speed to 10MBIT, Power Down)

When you want I can also support you an take over a few function (EthnernetUDP.cpp )

sstaub commented 6 years ago

It is done now with v 1.5.0