File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ cortex-m = "0.6.2"
9
9
cortex-m-rt = " 0.6.12"
10
10
cortex-m-semihosting = " 0.3.5"
11
11
panic-semihosting = " 0.5.3"
12
- nrf52840-pac = " 0.8 .0"
12
+ nrf52840-pac = " 0.9 .0"
13
13
usb-device = " 0.2.5"
14
14
usbd-serial = " 0.1.0"
15
15
16
16
[dependencies .nrf52840-hal ]
17
- version = " 0.8 .0"
17
+ version = " 0.10 .0"
18
18
path = " ../../nrf52840-hal"
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ fn TIMER0() {
24
24
fn main ( ) -> ! {
25
25
static mut EP_BUF : [ u8 ; 512 ] = [ 0 ; 512 ] ;
26
26
27
- let core = cortex_m:: Peripherals :: take ( ) . unwrap ( ) ;
28
27
let periph = Peripherals :: take ( ) . unwrap ( ) ;
29
28
while !periph
30
29
. POWER
@@ -46,7 +45,6 @@ fn main() -> ! {
46
45
let clocks = Clocks :: new ( periph. CLOCK ) ;
47
46
let clocks = clocks. enable_ext_hfosc ( ) ;
48
47
49
- let mut nvic = core. NVIC ;
50
48
let mut timer = Timer :: one_shot ( periph. TIMER0 ) ;
51
49
let usbd = periph. USBD ;
52
50
let p0 = p0:: Parts :: new ( periph. P0 ) ;
@@ -56,7 +54,7 @@ fn main() -> ! {
56
54
let btn = p1. p1_00 . into_pullup_input ( ) ;
57
55
while btn. is_high ( ) . unwrap ( ) { }
58
56
59
- timer. enable_interrupt ( Some ( & mut nvic ) ) ;
57
+ timer. enable_interrupt ( ) ;
60
58
timer. start ( Timer :: < TIMER0 , OneShot > :: TICKS_PER_SECOND * 3 ) ;
61
59
62
60
led. set_low ( ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments