Skip to content

Commit

Permalink
enc424j600_api: additionally check for CPU clock consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryMakes committed Sep 27, 2021
1 parent e8bd495 commit 373f6b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/enc424j600_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ pub struct EpochClock<const CPUFREQ: u32> {

impl<const CPUFREQ: u32> EpochClock<CPUFREQ> {
pub fn new() -> Self {
assert!(CPUFREQ == crate::CPU_FREQ);

Self {
epoch_time_ms: Milliseconds::<u32>::new(0),
epoch_time_ticks: Instant::<Self>::new(0),
Expand Down

0 comments on commit 373f6b8

Please sign in to comment.