Skip to content

Commit

Permalink
use get_clock() instead of hard code freq for baud rate calc
Browse files Browse the repository at this point in the history
  • Loading branch information
dstric-aqueduct authored and mciantyre committed Dec 19, 2022
1 parent fd8e1ae commit df48822
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imxrt-hal/src/can/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ where
}

pub fn set_baud_rate(&mut self, baud: u32) {
let clock_freq = 24_000_000;
let clock_freq = self.get_clock();

let mut divisor = 0;
let mut best_divisor: u32 = 0;
Expand Down

0 comments on commit df48822

Please sign in to comment.