When the CAN0.begin() function is called, it checks whether the default or alternative pins should be used. If the default pins are used, the config of the alternative pins is set to 0.
This means that if pins 29 or 30 (On a Teensy 3.5 or 3.6) are in use as outputs, they will no longer function as their config has been reset.
Steps to reproduce (Using Teensy 3.5 or 3.6):
Set pinMode(29, OUTPUT) and pinMode(30, OUTPUT)
Run Can0.begin()
Try to perform an output on pin 29 or 30 (Eg digitalWrite(29, HIGH))
Actual Behaviour:
The pins (29 and 30) will not output a high state
Expected behaviour:
The pin state of 29 and 30 should be retained because they are not in use by CAN0.
When the
CAN0.begin()
function is called, it checks whether the default or alternative pins should be used. If the default pins are used, the config of the alternative pins is set to 0.This means that if pins 29 or 30 (On a Teensy 3.5 or 3.6) are in use as outputs, they will no longer function as their config has been reset.
Steps to reproduce (Using Teensy 3.5 or 3.6):
pinMode(29, OUTPUT)
andpinMode(30, OUTPUT)
Can0.begin()
digitalWrite(29, HIGH)
)Actual Behaviour: The pins (29 and 30) will not output a high state
Expected behaviour: The pin state of 29 and 30 should be retained because they are not in use by CAN0.