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