tests: Add simple CAN test.

This commit is contained in:
Damien George 2014-10-02 17:30:28 +01:00
parent 3550de4ebe
commit e535a61983
2 changed files with 13 additions and 0 deletions

9
tests/pyb/can.py Normal file
View 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
View File

@ -0,0 +1,4 @@
CAN(1)
False
True
(123, 0, 0, b'abcd')