tests/pyb: Adjust UART and Timer tests to work on PYBD_SF6.
This commit is contained in:
parent
073c5f3a40
commit
39bc430e44
|
@ -16,4 +16,4 @@ print(tim.period())
|
||||||
tim = Timer(2, freq=100)
|
tim = Timer(2, freq=100)
|
||||||
print(tim.freq())
|
print(tim.freq())
|
||||||
tim.freq(0.001)
|
tim.freq(0.001)
|
||||||
print(tim.freq())
|
print('{:.3f}'.format(tim.freq()))
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from pyb import UART
|
from pyb import UART
|
||||||
|
|
||||||
# test we can correctly create by id
|
# test we can correctly create by id
|
||||||
for bus in (-1, 0, 1, 2, 5, 6, 7):
|
for bus in (-1, 0, 1, 2, 5, 6):
|
||||||
try:
|
try:
|
||||||
UART(bus, 9600)
|
UART(bus, 9600)
|
||||||
print("UART", bus)
|
print("UART", bus)
|
||||||
|
|
|
@ -4,7 +4,6 @@ UART 1
|
||||||
UART 2
|
UART 2
|
||||||
ValueError 5
|
ValueError 5
|
||||||
UART 6
|
UART 6
|
||||||
ValueError 7
|
|
||||||
UART(1, baudrate=9600, bits=8, parity=None, stop=1, flow=0, timeout=0, timeout_char=3, rxbuf=64)
|
UART(1, baudrate=9600, bits=8, parity=None, stop=1, flow=0, timeout=0, timeout_char=3, rxbuf=64)
|
||||||
UART(1, baudrate=2400, bits=8, parity=None, stop=1, flow=0, timeout=0, timeout_char=7, rxbuf=64)
|
UART(1, baudrate=2400, bits=8, parity=None, stop=1, flow=0, timeout=0, timeout_char=7, rxbuf=64)
|
||||||
0
|
0
|
||||||
|
|
Loading…
Reference in New Issue