Skip to content

Commit df4112a

Browse files
committed
These are OSErrors - or connection errors, we got an unexpected response from the spi device.
1 parent 71f3856 commit df4112a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_esp32spi/adafruit_esp32spi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ def set_digital_read(self, pin):
920920
return False
921921
if resp[0] == 1:
922922
return True
923-
raise ValueError(
923+
raise OSError(
924924
"_SET_DIGITAL_READ response error: response is not boolean", resp[0]
925925
)
926926

@@ -950,7 +950,7 @@ def get_time(self):
950950
resp = self._send_command_get_response(_GET_TIME)
951951
resp_time = struct.unpack("<i", resp[0])
952952
if resp_time == (0,):
953-
raise ValueError("_GET_TIME returned 0")
953+
raise OSError("_GET_TIME returned 0")
954954
return resp_time
955955
if self.status in (WL_AP_LISTENING, WL_AP_CONNECTED):
956956
raise OSError(

0 commit comments

Comments
 (0)