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/can.py | |
| parent | 6a15ac80dcc41dd950a9177b044ff8876d59710b (diff) | |
stmhal: Improve CAN print function.
Diffstat (limited to 'tests/pyb/can.py')
| -rw-r--r-- | tests/pyb/can.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/pyb/can.py b/tests/pyb/can.py index 931578bc5..923a83860 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 |
