File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,8 @@ def __init__(
255
255
:param ~digitalio.DigitalInOut cs_pin: SPI bus enable pin
256
256
:param int baudrate: The bit rate of the bus in Hz, using a 16Mhz crystal. All devices on\
257
257
the bus must agree on this value. Defaults to 250000.
258
- :param bool xtal_frequency: MCP2515 crystal frequency. Valid values are: 16000000 and 8000000. Defaults to 16000000 (16MHz).\
258
+ :param bool xtal_frequency: MCP2515 crystal frequency. Valid values are:\
259
+ 16000000 and 8000000. Defaults to 16000000 (16MHz).\
259
260
:param bool loopback: Receive only packets sent from this device, and send only to this\
260
261
device. Requires that `silent` is also set to `True`, but only prevents transmission to\
261
262
other devices. Otherwise the send/receive behavior is normal.
@@ -633,7 +634,7 @@ def _get_tx_buffer(self):
633
634
634
635
def _set_baud_rate (self ):
635
636
# ******* set baud rate ***********
636
- if self ._xtal_frequency != 16000000 and self . _xtal_frequency != 8000000 :
637
+ if self ._xtal_frequency not in ( 16000000 , 8000000 ) :
637
638
raise RuntimeError ("Incorrect xtal frequency" )
638
639
639
640
cnf1 , cnf2 , cnf3 = _BAUD_RATES [self ._xtal_frequency ][self .baudrate ]
You can’t perform that action at this time.
0 commit comments