Skip to content

Commit 2582506

Browse files
author
brentru
committed
update license
1 parent bc30949 commit 2582506

File tree

3 files changed

+24
-23
lines changed

3 files changed

+24
-23
lines changed

LICENSE

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
1-
The MIT License (MIT)
1+
Copyright (c) 2010 Arduino LLC. All right reserved.
22

3-
Copyright (c) 2020 Brent Rubell for Adafruit Industries
3+
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
5+
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
116

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
7+
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

README.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,13 @@ Documentation
113113
=============
114114

115115
For information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_.
116+
117+
License
118+
=============
119+
120+
This library was written by `Arduino LLC<https://github.com/arduino-libraries/Ethernet/blob/master/AUTHORS>`_. We've converted it to work
121+
with `CircuitPython<https://circuitpython.org/>`_ and made changes so it works similarly to `CircuitPython's WIZNET5k wrapper for the WIZnet
122+
5500 Ethernet interface<https://circuitpython.readthedocs.io/en/latest/shared-bindings/wiznet/wiznet5k.html>`_ and CPython's `Socket low-level
123+
networking interface module<https://docs.python.org/3.8/library/socket.html>`_.
124+
125+
This open source code is licensed under the LGPL license (see LICENSE for details).

adafruit_wiznet5k/adafruit_wiznet5k.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# The MIT License (MIT)
22
#
3+
# Copyright (c) 2010 WIZnet
4+
# Copyright (c) 2010 Arduino LLC
35
# Copyright (c) 2008 Bjoern Hartmann
46
# Copyright 2018 Paul Stoffregen
5-
# Copyright (c) 2020 Brent Rubell for Adafruit Industries
7+
# Modified by Brent Rubell for Adafruit Industries, 2020
68
#
79
# Permission is hereby granted, free of charge, to any person obtaining a copy
810
# of this software and associated documentation files (the "Software"), to deal
@@ -27,7 +29,7 @@
2729
2830
Pure-Python interface for WIZNET 5k ethernet modules.
2931
30-
* Author(s): Bjoern Hartmann, Paul Stoffregen, Brent Rubell
32+
* Author(s): WIZnet, Arduino LLC, Bjoern Hartmann, Paul Stoffregen, Brent Rubell
3133
3234
Implementation Notes
3335
--------------------
@@ -288,9 +290,11 @@ def ifconfig(self):
288290
"""Returns the network configuration as a tuple."""
289291
# set subnet and gateway addresses
290292
for octet in range(0, 4):
291-
subnet_mask += self.read(REG_SUBR+octet, 0x04, subnet_mask[octet])
292-
gw_addr += self.read(REG_GAR+octet, 0x04, gw_addr[octet])
293-
params = (self.ip_address, subnet_mask, gw_addr, self._dns)
293+
self._pbuff += self.read(REG_SUBR+octet, 0x04)
294+
for octet in range(0, 4):
295+
self._pbuff[3+octet] += self.read(REG_GAR+octet, 0x04)
296+
297+
params = (self.ip_address, self._pbuff[0:3], self._pbuff[3:7], self._dns)
294298
return params
295299

296300
@ifconfig.setter
@@ -413,6 +417,7 @@ def write(self, addr, callback, data):
413417

414418
# Socket-Register API
415419
def udp_remaining(self):
420+
"""Returns amount of bytes remaining in a udp socket."""
416421
if self._debug:
417422
print("* UDP Bytes Remaining: ", UDP_SOCK['bytes_remaining'])
418423
return UDP_SOCK['bytes_remaining']

0 commit comments

Comments
 (0)