arm: add async tests
This commit is contained in:
18
arm/test.py
Normal file
18
arm/test.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import serial
|
||||
|
||||
s = serial.Serial('tty', 115200, timeout=6)
|
||||
length = 1
|
||||
|
||||
log = open('test.log', 'wb')
|
||||
|
||||
while True:
|
||||
print(f'Writing {length} bytes')
|
||||
s.write(b'b' * length);
|
||||
data = s.read(length)
|
||||
log.write(data)
|
||||
if not data:
|
||||
break
|
||||
|
||||
length += 1
|
||||
|
||||
print(f'Read back 0 bytes')
|
||||
Reference in New Issue
Block a user