eric6/MicroPython/MicroPythonDevices.py

branch
micropython
changeset 7061
9db5a73217bb
parent 7059
a8fad276cbd5
child 7065
e3d04faced34
equal deleted inserted replaced
7059:a8fad276cbd5 7061:9db5a73217bb
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', 283 b'\x02', # Ctrl-B: exit raw repl (just in case)
284 b'\r\x03', 284 b'\r\x03\x03', # Ctrl-C twice: interrupt any running program
285 b'\r\x03', 285 b'\r\x01', # Ctrl-A: enter raw REPL
286 b'\r\x03',
287 b'\r\x01',
288 ] 286 ]
289 newLine = [b'print("\\n")\r',] 287 newLine = [b'print("\\n")\r',]
290 commands = [c.encode("utf-8)") + b'\r' for c in commandsList] 288 commands = [c.encode("utf-8)") + b'\r' for c in commandsList]
291 commands.append(b'\r') 289 commands.append(b'\r')
292 commands.append(b'\x04') 290 commands.append(b'\x04')

eric ide

mercurial