You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/04/07 14:52:32 UTC

[GitHub] [mynewt-core] agross-korg commented on a change in pull request #2262: da1469x: otp and serial script enhancements

agross-korg commented on a change in pull request #2262: da1469x: otp and serial script enhancements
URL: https://github.com/apache/mynewt-core/pull/2262#discussion_r404872299
 
 

 ##########
 File path: hw/bsp/dialog_da1469x-dk-pro/da1469x_serial.py
 ##########
 @@ -35,6 +35,15 @@ def load(infile, uart, reset_script):
     except serial.SerialException:
         raise SystemExit("Failed to open serial port")
 
+    # drain serial port buffer
+    try:
+        while True:
+            data = ser.read(1)
+            if len(data) == 0:
+                break
+    except serial.SerialException:
+        raise SystemExit("Failed to open serial port")
+
 
 Review comment:
   nit.  you're mixing two sets of changes here.  One to drain the port and the other to make the reset optional.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services