CAN: we need both Rx and Tx pins to be valid
This commit is contained in:
parent
dfbd44c705
commit
54274d8022
|
@ -35,7 +35,7 @@ bool isValidCanRxPin(brain_pin_e pin) {
|
|||
}
|
||||
|
||||
CANDriver* detectCanDevice(brain_pin_e pinRx, brain_pin_e pinTx) {
|
||||
if (pinRx == Gpio::Unassigned && pinTx == Gpio::Unassigned) {
|
||||
if (pinRx == Gpio::Unassigned || pinTx == Gpio::Unassigned) {
|
||||
return nullptr;
|
||||
}
|
||||
#if STM32_CAN_USE_CAN1 || STM32_CAN_USE_FDCAN1
|
||||
|
|
Loading…
Reference in New Issue