summaryrefslogtreecommitdiffstatshomepage
path: root/tests/pyb/can.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pyb/can.py')
-rw-r--r--tests/pyb/can.py9
1 files changed, 5 insertions, 4 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