mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #4664 from bperry730/fix/st_can_api_freq
STM32: Fix the CAN initializing to the wrong frequencypull/4792/head
commit
a75f935348
|
@ -85,8 +85,8 @@ void can_init_freq (can_t *obj, PinName rd, PinName td, int hz)
|
|||
error("Cannot initialize CAN");
|
||||
}
|
||||
|
||||
// Set initial CAN frequency to 100 kb/s
|
||||
if (can_frequency(obj, 100000) != 1) {
|
||||
// Set initial CAN frequency to specified frequency
|
||||
if (can_frequency(obj, hz) != 1) {
|
||||
error("Can frequency could not be set\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue