tests: Add simple CAN test.
This commit is contained in:
parent
3550de4ebe
commit
e535a61983
9
tests/pyb/can.py
Normal file
9
tests/pyb/can.py
Normal file
@ -0,0 +1,9 @@
|
||||
from pyb import CAN
|
||||
|
||||
can = CAN(1)
|
||||
print(can)
|
||||
can.init(CAN.LOOPBACK)
|
||||
print(can.any(0))
|
||||
can.send('abcd', 123)
|
||||
print(can.any(0))
|
||||
print(can.recv(0))
|
4
tests/pyb/can.py.exp
Normal file
4
tests/pyb/can.py.exp
Normal file
@ -0,0 +1,4 @@
|
||||
CAN(1)
|
||||
False
|
||||
True
|
||||
(123, 0, 0, b'abcd')
|
Loading…
Reference in New Issue
Block a user