Skip to content

Commit 91caaa4

Browse files
author
James Munns
committed
Why, nrf52833, why?
1 parent 5bafcbc commit 91caaa4

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

nrf-hal-common/src/timer.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,16 @@ use nb::{self, block};
2121
use void::{unreachable, Void};
2222

2323
#[cfg(any(feature = "52832", feature = "52833", feature = "52840"))]
24-
use crate::pac::{timer3::RegisterBlock as RegBlock3, TIMER3, TIMER4};
24+
use crate::pac::{TIMER3, TIMER4};
25+
26+
// The 832 and 840 expose TIMER3 and TIMER for as timer3::RegisterBlock...
27+
#[cfg(any(feature = "52832", feature = "52840"))]
28+
use crate::pac::timer3::RegisterBlock as RegBlock3;
29+
30+
// ...but the 833 exposes them as timer0::RegisterBlock. This might be a bug
31+
// in the PAC, and could be fixed later. For now, it is equivalent anyway.
32+
#[cfg(feature = "52833")]
33+
use crate::pac::timer0::RegisterBlock as RegBlock3;
2534

2635
use core::marker::PhantomData;
2736

0 commit comments

Comments
 (0)