mirror of https://github.com/ARMmbed/mbed-os.git
DISCO_F469NI: allow the use of CAN2 instance when CAN1 is not activated
parent
feb7569da7
commit
deb7be1376
|
@ -43,6 +43,7 @@ void can_init(can_t *obj, PinName rd, PinName td)
|
||||||
}
|
}
|
||||||
#if defined(CAN2_BASE) && (CAN_NUM == 2)
|
#if defined(CAN2_BASE) && (CAN_NUM == 2)
|
||||||
else if (obj->can == CAN_2) {
|
else if (obj->can == CAN_2) {
|
||||||
|
__HAL_RCC_CAN1_CLK_ENABLE(); // needed to set filters
|
||||||
__HAL_RCC_CAN2_CLK_ENABLE();
|
__HAL_RCC_CAN2_CLK_ENABLE();
|
||||||
obj->index = 1;
|
obj->index = 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue