Code cleanup. Bugfix after rebase with master. Formating.

This commit is contained in:
Dmitry
2021-04-19 12:03:43 +03:00
parent f8197c2446
commit 00a7ecb5a3
23 changed files with 130 additions and 194 deletions
+4 -6
View File
@@ -50,18 +50,16 @@ class SerialReader(StoppableThread):
self.serial.baudrate = self.baud
# We can come to this thread at startup or from external application line GDB.
# If we come from GDB we would like to continue to run without reset.
if self.gdb_exit is False:
if self.gdb_exit:
self.serial.rts = False
self.serial.dtr = True
else: # if we exit from GDB, we don't need to reset the target
# This sequence of DTR/RTS and open/close set the serial port to
# condition when GDB not make reset of the target by switching DTR/RTS.
self.serial.rts = True # IO0=LOW
self.serial.dtr = self.serial.dtr # usbser.sys workaround
self.serial.open()
self.serial.close()
self.serial.rts = False # IO0=HIGH
self.serial.dtr = False
else: # if we exit from GDB, we don't need to reset the target
self.serial.rts = False
self.serial.dtr = True
# Current state not reset the target!
self.gdb_exit = False