-
Notifications
You must be signed in to change notification settings - Fork 48
Ethernet.MACAddress should be a getter, not setter #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm confused, what is the problem for this library? You mention the Arduino Ethernet library which uses the WIZnet chips. |
in this library it is a setter. that is wrong |
Have a look to the documentation. The implementation is different to the original Arduino library. This is necessary to override builtin mac address. |
Agreed with @sstaub . Getter is available with different prototype which is more clear: |
isn't Arduino about using same functions on different hardware? at least functions with the same name should do the same thing. Arduino Ethernet libraries have A few months back I stared to write down all my experience with creating and maintaining Arduino networking libraries, because new libraries appear and have the same mistakes I try to eliminate in old libraries. But writing the Guide let to necessity of defining the networking API by analyzing the significant libraries. I found many often simple differences so I started to do PR in all repositories. Then I wrote test sketches for basic functions and those found more errors in implementations than I would expect (even in my libraries.). So more PR. https://github.com./JAndrassy/Arduino-Networking-API |
References: https://www.arduino.cc/reference/en/libraries/ethernet/ethernet.macaddress/ https://www.arduino.cc/reference/en/libraries/ethernet/ethernet.setmacaddress/ Pay attention that setMACAddress have to be called before Begin(). Else new MAC will be ignored. Fixes stm32duino#81 Signed-off-by: Frederic Pillon <[email protected]>
References: https://www.arduino.cc/reference/en/libraries/ethernet/ethernet.macaddress/ https://www.arduino.cc/reference/en/libraries/ethernet/ethernet.setmacaddress/ Pay attention that setMACAddress have to be called before Begin(). Else new MAC will be ignored. Fixes stm32duino#81 Signed-off-by: Frederic Pillon <[email protected]>
Ethernet.MACAddress should be a getter, not setter
https://github.com./arduino-libraries/Ethernet/blob/39103da0e1bc569023625ee4693272773397dbb6/src/Ethernet.cpp#L147-L153
The text was updated successfully, but these errors were encountered: