Skip to content

Commit ba68b3e

Browse files
committed
Expose NINA disconnect
1 parent fce466b commit ba68b3e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

adafruit_esp32spi/adafruit_esp32spi.py

+6
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,12 @@ def ap_listening(self):
505505
self.reset()
506506
return False
507507

508+
def disconnect(self):
509+
"""Disconnect from the access point"""
510+
resp = self._send_command_get_response(_DISCONNECT_CMD)
511+
if resp[0][0] != 1:
512+
raise RuntimeError("Failed to disconnect")
513+
508514
def connect(self, secrets):
509515
"""Connect to an access point using a secrets dictionary
510516
that contains a 'ssid' and 'password' entry"""

0 commit comments

Comments
 (0)