Skip to content

Commit 1251bc7

Browse files
Revert "rebase fixes"
This reverts commit 707c199.
1 parent 37d6518 commit 1251bc7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

examples/usb/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ cortex-m = "0.6.2"
99
cortex-m-rt = "0.6.12"
1010
cortex-m-semihosting = "0.3.5"
1111
panic-semihosting = "0.5.3"
12-
nrf52840-pac = "0.9.0"
12+
nrf52840-pac = "0.8.0"
1313
usb-device = "0.2.5"
1414
usbd-serial = "0.1.0"
1515

1616
[dependencies.nrf52840-hal]
17-
version = "0.10.0"
17+
version = "0.8.0"
1818
path = "../../nrf52840-hal"

examples/usb/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ fn TIMER0() {
2424
fn main() -> ! {
2525
static mut EP_BUF: [u8; 512] = [0; 512];
2626

27+
let core = cortex_m::Peripherals::take().unwrap();
2728
let periph = Peripherals::take().unwrap();
2829
while !periph
2930
.POWER
@@ -45,6 +46,7 @@ fn main() -> ! {
4546
let clocks = Clocks::new(periph.CLOCK);
4647
let clocks = clocks.enable_ext_hfosc();
4748

49+
let mut nvic = core.NVIC;
4850
let mut timer = Timer::one_shot(periph.TIMER0);
4951
let usbd = periph.USBD;
5052
let p0 = p0::Parts::new(periph.P0);
@@ -54,7 +56,7 @@ fn main() -> ! {
5456
let btn = p1.p1_00.into_pullup_input();
5557
while btn.is_high().unwrap() {}
5658

57-
timer.enable_interrupt();
59+
timer.enable_interrupt(Some(&mut nvic));
5860
timer.start(Timer::<TIMER0, OneShot>::TICKS_PER_SECOND * 3);
5961

6062
led.set_low().unwrap();

0 commit comments

Comments
 (0)