Browse Source

Added Sink.boot method

There's no unit test for it because I don't know how it could be tested
in a platform-independent way.
Clara Hobbs 6 years ago
parent
commit
4627f39ed1
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      pdbuddy/__init__.py

+ 6
- 0
pdbuddy/__init__.py View File

88
         """Returns the license text from the PD Buddy Sink"""
88
         """Returns the license text from the PD Buddy Sink"""
89
         return self.send_command("license")
89
         return self.send_command("license")
90
 
90
 
91
+    def boot(self):
92
+        """Runs the PD Buddy Sink's DFU bootloader and closes the serial port"""
93
+        self._port.write(b"boot\r\n")
94
+        self._port.flush()
95
+        self.close()
96
+
91
     def erase(self):
97
     def erase(self):
92
         """Synchronously erases all stored configuration from flash"""
98
         """Synchronously erases all stored configuration from flash"""
93
         self.send_command("erase")
99
         self.send_command("erase")

Loading…
Cancel
Save