fix BOOST_STANDBY pin handling

This commit is contained in:
Jeff Epler 2020-11-04 13:38:54 -06:00
parent d18e18a91b
commit 32f981cf28
4 changed files with 4 additions and 4 deletions

View file

@ -11,7 +11,7 @@ if hasattr(board, 'CAN_STANDBY'):
# If the CAN transceiver is powered by a boost converter, turn on its supply
if hasattr(board, 'BOOST_ENABLE'):
standby = digitalio.DigitalInOut(board.CAN_STANDBY)
standby = digitalio.DigitalInOut(board.BOOST_ENABLE)
standby.switch_to_output(True)
can = canio.CAN(rx=board.CAN_RX, tx=board.CAN_TX, baudrate=250_000, auto_restart=True)

View file

@ -11,7 +11,7 @@ if hasattr(board, 'CAN_STANDBY'):
# If the CAN transceiver is powered by a boost converter, turn on its supply
if hasattr(board, 'BOOST_ENABLE'):
standby = digitalio.DigitalInOut(board.CAN_STANDBY)
standby = digitalio.DigitalInOut(board.BOOST_ENABLE)
standby.switch_to_output(True)
can = canio.CAN(rx=board.CAN_RX, tx=board.CAN_TX, baudrate=250_000, auto_restart=True)

View file

@ -12,7 +12,7 @@ if hasattr(board, 'CAN_STANDBY'):
# If the CAN transceiver is powered by a boost converter, turn on its supply
if hasattr(board, 'BOOST_ENABLE'):
standby = digitalio.DigitalInOut(board.CAN_STANDBY)
standby = digitalio.DigitalInOut(board.BOOST_ENABLE)
standby.switch_to_output(True)
can = canio.CAN(rx=board.CAN_RX, tx=board.CAN_TX, baudrate=250_000, auto_restart=True)

View file

@ -12,7 +12,7 @@ if hasattr(board, 'CAN_STANDBY'):
# If the CAN transceiver is powered by a boost converter, turn on its supply
if hasattr(board, 'BOOST_ENABLE'):
standby = digitalio.DigitalInOut(board.CAN_STANDBY)
standby = digitalio.DigitalInOut(board.BOOST_ENABLE)
standby.switch_to_output(True)
can = canio.CAN(rx=board.CAN_RX, tx=board.CAN_TX, baudrate=250_000, auto_restart=True)