Skip to content

Commit 6f2e0ff

Browse files
authored
Merge pull request #122 from anecdata/disconnect
Expose NINA disconnect
2 parents fce466b + ba68b3e commit 6f2e0ff

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)