File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
stm32/libcanard/bxcan/src Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1515
1616/// Configure the system core clock frequency in Hz.
1717/// Only used by the busy wait in waitMSRINAKBitStateChange().
18- #if !defined(BXCAN_BUSYWAIT_DELAY_SYSTEM_CORE_CLOCK )
19- # error "Please set BXCAN_BUSYWAIT_DELAY_SYSTEM_CORE_CLOCK to the current system core clock."
18+ /// If using official HAL from ST, set to global variable SystemCoreClock
19+ #if defined(USE_HAL_DRIVER ) && USE_HAL_DRIVER
20+ extern uint32_t SystemCoreClock ;
21+ # define BXCAN_BUSYWAIT_DELAY_SYSTEM_CORE_CLOCK SystemCoreClock
22+ #else
23+ # if !defined(BXCAN_BUSYWAIT_DELAY_SYSTEM_CORE_CLOCK )
24+ # error "Please set BXCAN_BUSYWAIT_DELAY_SYSTEM_CORE_CLOCK to the current system core clock."
25+ # endif
2026#endif
2127
2228/// By default, this macro resolves to the standard assert(). The user can redefine this if necessary.
You can’t perform that action at this time.
0 commit comments