Skip to content

Commit

Permalink
rebase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
japaric authored and fnafnio committed May 12, 2021
1 parent 9f903d9 commit bf633c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/usb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ cortex-m = "0.6.2"
cortex-m-rt = "0.6.12"
cortex-m-semihosting = "0.3.5"
panic-semihosting = "0.5.3"
nrf52840-pac = "0.8.0"
nrf52840-pac = "0.9.0"
usb-device = "0.2.5"
usbd-serial = "0.1.0"

[dependencies.nrf52840-hal]
version = "0.8.0"
version = "0.10.0"
path = "../../nrf52840-hal"
4 changes: 1 addition & 3 deletions examples/usb/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ fn TIMER0() {
fn main() -> ! {
static mut EP_BUF: [u8; 512] = [0; 512];

let core = cortex_m::Peripherals::take().unwrap();
let periph = Peripherals::take().unwrap();
while !periph
.POWER
Expand All @@ -46,7 +45,6 @@ fn main() -> ! {
let clocks = Clocks::new(periph.CLOCK);
let clocks = clocks.enable_ext_hfosc();

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

timer.enable_interrupt(Some(&mut nvic));
timer.enable_interrupt();
timer.start(Timer::<TIMER0, OneShot>::TICKS_PER_SECOND * 3);

led.set_low().unwrap();
Expand Down

0 comments on commit bf633c3

Please sign in to comment.