Skip to content

Commit

Permalink
Future proofed w5500 initialisation.
Browse files Browse the repository at this point in the history
  • Loading branch information
BiffoBear committed Apr 27, 2023
1 parent ffb5e32 commit 9231943
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions adafruit_wiznet5k/adafruit_wiznet5k.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,9 @@ def _detect_and_reset_w5500() -> bool:
"""
self._chip_type = "w5500"
self._write_mr(0x80)
while self._read_mr()[0] & 0x80:
pass
time.sleep(0.05)
if self._read_mr()[0] & 0x80:
return False

# assert self.sw_reset() == 0, "Chip not reset properly!"
self._write_mr(0x08)
Expand Down

0 comments on commit 9231943

Please sign in to comment.