@@ -1240,7 +1240,7 @@ def rtr(self, retry_time: int) -> None:
1240
1240
1241
1241
def _chip_read (self , device : "busio.SPI" , address : int , call_back : int ) -> None :
1242
1242
"""Chip specific calls for _read method."""
1243
- if self ._chip_type == "w5500" :
1243
+ if self ._chip_type in ( "w5500" , "w6100" ) :
1244
1244
device .write ((address >> 8 ).to_bytes (1 , "big" ))
1245
1245
device .write ((address & 0xFF ).to_bytes (1 , "big" ))
1246
1246
device .write (call_back .to_bytes (1 , "big" ))
@@ -1251,7 +1251,7 @@ def _chip_read(self, device: "busio.SPI", address: int, call_back: int) -> None:
1251
1251
1252
1252
def _chip_write (self , device : "busio.SPI" , address : int , call_back : int ) -> None :
1253
1253
"""Chip specific calls for _write."""
1254
- if self ._chip_type == "w5500" :
1254
+ if self ._chip_type in ( "w5500" , "w6100" ) :
1255
1255
device .write ((address >> 8 ).to_bytes (1 , "big" ))
1256
1256
device .write ((address & 0xFF ).to_bytes (1 , "big" ))
1257
1257
device .write (call_back .to_bytes (1 , "big" ))
@@ -1262,7 +1262,7 @@ def _chip_write(self, device: "busio.SPI", address: int, call_back: int) -> None
1262
1262
1263
1263
def _chip_socket_read (self , socket_number , pointer , bytes_to_read ):
1264
1264
"""Chip specific calls for socket_read."""
1265
- if self ._chip_type == "w5500" :
1265
+ if self ._chip_type in ( "w5500" , "w6100" ) :
1266
1266
# Read data from the starting address of snrx_rd
1267
1267
ctrl_byte = 0x18 + (socket_number << 5 )
1268
1268
bytes_read = self ._read (pointer , ctrl_byte , bytes_to_read )
@@ -1283,7 +1283,7 @@ def _chip_socket_write(
1283
1283
self , socket_number : int , offset : int , bytes_to_write : int , buffer : bytes
1284
1284
):
1285
1285
"""Chip specific calls for socket_write."""
1286
- if self ._chip_type == "w5500" :
1286
+ if self ._chip_type in ( "w5500" , "w6100" ) :
1287
1287
dst_addr = offset + (socket_number * _SOCK_SIZE + 0x8000 )
1288
1288
cntl_byte = 0x14 + (socket_number << 5 )
1289
1289
self ._write (dst_addr , cntl_byte , buffer [:bytes_to_write ])
0 commit comments