@@ -289,15 +289,16 @@ def chip(self) -> str:
289
289
"""
290
290
Ethernet controller chip type.
291
291
292
- :return str: The chip type."""
292
+ :return str: The chip type.
293
+ """
293
294
return self ._chip_type
294
295
295
296
@property
296
297
def ip_address (self ) -> bytearray :
297
298
"""
298
299
Configured IP address.
299
300
300
- :return bytearray.
301
+ :return bytearray: IP address as four bytes .
301
302
"""
302
303
return self .read (REG_SIPR , 0x00 , 4 )
303
304
@@ -307,7 +308,7 @@ def pretty_ip(
307
308
ip : bytearray ,
308
309
) -> str :
309
310
"""
310
- Convert a bytearray IP address to a dotted-quad string for printing.
311
+ Convert a 4 byte IP address to a dotted-quad string for printing.
311
312
312
313
:param bytearray ip: A four byte IP address.
313
314
@@ -323,9 +324,9 @@ def unpretty_ip(
323
324
"""
324
325
Convert a dotted-quad string to a four byte IP address.
325
326
326
- :param str ip: The IP address (a string of the form '255.255.255.255') to be converted.
327
+ :param str ip: IP address (a string of the form '255.255.255.255') to be converted.
327
328
328
- :return bytes: The IP address in four bytes.
329
+ :return bytes: IP address in four bytes.
329
330
"""
330
331
octets = [int (x ) for x in ip .split ("." )]
331
332
return bytes (octets )
@@ -335,7 +336,7 @@ def mac_address(self) -> bytearray:
335
336
"""
336
337
Ethernet hardware's MAC address.
337
338
338
- :return bytearray: The six byte MAC address."""
339
+ :return bytearray: Six byte MAC address."""
339
340
return self .read (REG_SHAR , 0x00 , 6 )
340
341
341
342
@mac_address .setter
@@ -374,7 +375,7 @@ def remote_ip(self, socket_num: int) -> Union[str, bytearray]:
374
375
375
376
:param int socket_num: ID number of the socket to check.
376
377
377
- :return Union[str, bytearray]: The four byte IP address.
378
+ :return Union[str, bytearray]: A four byte IP address.
378
379
"""
379
380
if socket_num >= self .max_sockets :
380
381
return self ._pbuff
@@ -553,7 +554,7 @@ def read(
553
554
:param int length: Number of bytes to read from the register, defaults to 1.
554
555
:param Optional[WriteableBuffer] buffer: Buffer to read data into, defaults to None.
555
556
556
- :return Union[WriteableBuffer, bytearray]: The data read from the chip.
557
+ :return Union[WriteableBuffer, bytearray]: Data read from the chip.
557
558
"""
558
559
with self ._device as bus_device :
559
560
if self ._chip_type == "w5500" :
@@ -609,6 +610,7 @@ def socket_available(self, socket_num: int, sock_type: int = SNMR_TCP) -> int:
609
610
:param int socket_num: Socket to check for available bytes.
610
611
:param int sock_type: Socket type. Use SNMR_TCP for TCP or SNMR_UDP for UDP, \
611
612
defaults to SNMR_TCP.
613
+
612
614
:return int: Number of bytes available to read.
613
615
"""
614
616
if self ._debug :
0 commit comments