Fixing the problem where the CAN is initialized to the wrong frequency at startup regardless of the value set in the constructor. Issue #3863

pull/4664/head
Brad Perry 2017-06-28 12:07:14 -07:00
parent a39ac60305
commit f7d76b5d29
1 changed files with 2 additions and 2 deletions

View File

@ -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");
}