You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: shared-bindings/_canio/CAN.c
+10-13Lines changed: 10 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -42,35 +42,32 @@
42
42
//| """CAN bus protocol"""
43
43
//|
44
44
//| def __init__(self,
45
-
//| rx: Optional[microcontroller.Pin]=None,
46
-
//| tx: Optional[microcontroller.Pin]=None,
45
+
//| tx: microcontroller.Pin,
46
+
//| rx: microcontroller.Pin,
47
47
//| *,
48
48
//| baudrate: int = 250000,
49
49
//| loopback: bool = False,
50
+
//| silent: bool = False,
50
51
//| auto_restart: bool = False,
51
52
//| ):
52
53
//| """A common shared-bus protocol. The rx and tx pins are generally
53
54
//| connected to a transceiver which controls the H and L pins on a
54
55
//| shared bus.
55
56
//|
56
-
//| Normally, both ``tx`` and ``rx`` pins will be specified. However,
57
-
//| in silent and loopback modes, the other pin may not be required and
58
-
//| can be used for other purposes.
59
-
//|
60
-
//| :param ~microcontroller.Pin rx: the pin to receive with, or None.
61
-
//| :param ~microcontroller.Pin tx: the pin to transmit with, or None.
57
+
//| :param ~microcontroller.Pin rx: the pin to receive with
58
+
//| :param ~microcontroller.Pin tx: the pin to transmit with
62
59
//| :param int baudrate: The bit rate of the bus in Hz. All devices on the bus must agree on this value.
63
-
//| :param bool loopback: True if the peripheral will be operated in loopback mode. In loopback mode, the ``rx`` pin's value is ignored, and the device receives the packets it sends.
64
-
//| :param bool silent: True if the peripheral will be operated in silent mode. In silent mode, the ``tx`` pin is always driven to the high logic level. This mode can be used to "sniff" a CAN bus without interfering.
60
+
//| :param bool loopback: When True the ``rx`` pin's value is ignored, and the device receives the packets it sends.
61
+
//| :param bool silent: When True the ``tx`` pin is always driven to the high logic level. This mode can be used to "sniff" a CAN bus without interfering.
65
62
//| :param bool auto_restart: If True, will restart communications after entering bus-off state
0 commit comments