diff options
author | Damien George <damien.p.george@gmail.com> | 2014-10-30 23:13:53 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-10-30 23:16:05 +0000 |
commit | efc49c5591d23f606a2e6203f9b4e4976aa3e6e3 (patch) | |
tree | b6223488fccd0f88dc84baa434d27bbb7c8974e6 /tests/pyb | |
parent | 6a15ac80dcc41dd950a9177b044ff8876d59710b (diff) | |
download | micropython-efc49c5591d23f606a2e6203f9b4e4976aa3e6e3.tar.gz micropython-efc49c5591d23f606a2e6203f9b4e4976aa3e6e3.zip |
stmhal: Improve CAN print function.
Diffstat (limited to 'tests/pyb')
-rw-r--r-- | tests/pyb/can.py | 9 | ||||
-rw-r--r-- | tests/pyb/can.py.exp | 6 |
2 files changed, 8 insertions, 7 deletions
diff --git a/tests/pyb/can.py b/tests/pyb/can.py index 931578bc53..923a83860f 100644 --- a/tests/pyb/can.py +++ b/tests/pyb/can.py @@ -1,8 +1,12 @@ from pyb import CAN -can = CAN(1, CAN.LOOPBACK) +can = CAN(1) +print(can) + +can.init(CAN.LOOPBACK) print(can) print(can.any(0)) + can.send('abcd', 123) print(can.any(0)) print(can.recv(0)) @@ -37,6 +41,3 @@ else: print('passed') else: print('failed, wrong data received') - - -print('end')
\ No newline at end of file diff --git a/tests/pyb/can.py.exp b/tests/pyb/can.py.exp index d12643a5fb..4058202046 100644 --- a/tests/pyb/can.py.exp +++ b/tests/pyb/can.py.exp @@ -1,10 +1,10 @@ -CAN(1, LOOPBACK, False) +CAN(1) +CAN(1, CAN.LOOPBACK, extframe=False) False True (123, 0, 0, b'abcd') (2047, 0, 0, b'abcd') (0, 0, 0, b'abcd') passed -CAN(1, LOOPBACK, True) +CAN(1, CAN.LOOPBACK, extframe=True) passed -end |