eric6/MicroPython/MicroPythonDevices.py

branch
micropython
changeset 7068
e3200e4dfa63
parent 7065
e3d04faced34
child 7082
ec199ef0cfc6
equal deleted inserted replaced
7067:3fc4082fc6ba 7068:e3200e4dfa63
278 278
279 @param commandsList list of commands to be sent to the device 279 @param commandsList list of commands to be sent to the device
280 @type list of str 280 @type list of str
281 """ 281 """
282 rawOn = [ # sequence of commands to enter raw mode 282 rawOn = [ # sequence of commands to enter raw mode
283 b'\x02', # Ctrl-B: exit raw repl (just in case) 283 b'\x02', # Ctrl-B: exit raw repl (just in case)
284 b'\r\x03\x03', # Ctrl-C twice: interrupt any running program 284 b'\r\x03\x03\x03', # Ctrl-C three times: interrupt any running
285 b'\r\x01', # Ctrl-A: enter raw REPL 285 # program
286 b'\r\x01', # Ctrl-A: enter raw REPL
286 ] 287 ]
287 newLine = [b'print("\\n")\r', ] 288 newLine = [b'print("\\n")\r', ]
288 commands = [c.encode("utf-8)") + b'\r' for c in commandsList] 289 commands = [c.encode("utf-8)") + b'\r' for c in commandsList]
289 commands.append(b'\r') 290 commands.append(b'\r')
290 commands.append(b'\x04') 291 commands.append(b'\x04')

eric ide

mercurial