Skip to content

Commit 991931a

Browse files
authored
Merge pull request #1295 from jepler/feather_can_fixes
fix BOOST_STANDBY pin handling
2 parents d18e18a + 122cd4d commit 991931a

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

FeatherCAN_CircuitPython/listener-ack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
# If the CAN transceiver is powered by a boost converter, turn on its supply
1313
if hasattr(board, 'BOOST_ENABLE'):
14-
standby = digitalio.DigitalInOut(board.CAN_STANDBY)
15-
standby.switch_to_output(True)
14+
boost_enable = digitalio.DigitalInOut(board.BOOST_ENABLE)
15+
boost_enable.switch_to_output(True)
1616

1717
can = canio.CAN(rx=board.CAN_RX, tx=board.CAN_TX, baudrate=250_000, auto_restart=True)
1818
listener = can.listen(matches=[canio.Match(0x408)], timeout=.9)

FeatherCAN_CircuitPython/listener.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
# If the CAN transceiver is powered by a boost converter, turn on its supply
1313
if hasattr(board, 'BOOST_ENABLE'):
14-
standby = digitalio.DigitalInOut(board.CAN_STANDBY)
15-
standby.switch_to_output(True)
14+
boost_enable = digitalio.DigitalInOut(board.BOOST_ENABLE)
15+
boost_enable.switch_to_output(True)
1616

1717
can = canio.CAN(rx=board.CAN_RX, tx=board.CAN_TX, baudrate=250_000, auto_restart=True)
1818
listener = can.listen(matches=[canio.Match(0x408)], timeout=.9)

FeatherCAN_CircuitPython/sender-ack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
# If the CAN transceiver is powered by a boost converter, turn on its supply
1414
if hasattr(board, 'BOOST_ENABLE'):
15-
standby = digitalio.DigitalInOut(board.CAN_STANDBY)
16-
standby.switch_to_output(True)
15+
boost_enable = digitalio.DigitalInOut(board.BOOST_ENABLE)
16+
boost_enable.switch_to_output(True)
1717

1818
can = canio.CAN(rx=board.CAN_RX, tx=board.CAN_TX, baudrate=250_000, auto_restart=True)
1919
listener = can.listen(matches=[canio.Match(0x409)], timeout=.1)

FeatherCAN_CircuitPython/sender.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
# If the CAN transceiver is powered by a boost converter, turn on its supply
1414
if hasattr(board, 'BOOST_ENABLE'):
15-
standby = digitalio.DigitalInOut(board.CAN_STANDBY)
16-
standby.switch_to_output(True)
15+
boost_enable = digitalio.DigitalInOut(board.BOOST_ENABLE)
16+
boost_enable.switch_to_output(True)
1717

1818
can = canio.CAN(rx=board.CAN_RX, tx=board.CAN_TX, baudrate=250_000, auto_restart=True)
1919

0 commit comments

Comments
 (0)