You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
240 B
16 lines
240 B
10 years ago
|
# test hal errors
|
||
|
|
||
|
import pyb
|
||
|
|
||
|
i2c = pyb.I2C(2, pyb.I2C.MASTER)
|
||
|
try:
|
||
|
i2c.recv(1, 1)
|
||
|
except OSError as e:
|
||
|
print(repr(e))
|
||
|
|
||
|
can = pyb.CAN(1, pyb.CAN.NORMAL)
|
||
|
try:
|
||
|
can.send('1', 1, timeout=50)
|
||
|
except OSError as e:
|
||
|
print(repr(e))
|