Skip to content

Commit 5a9402c

Browse files
committed
Change all inner types to unsigned
1 parent d1ae2c2 commit 5a9402c

File tree

8 files changed

+271
-286
lines changed

8 files changed

+271
-286
lines changed

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/nrf52_dk/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ extern crate panic_rtt;
55

66
use cortex_m::mutex::CriticalSectionMutex as Mutex;
77
use cortex_m_rt::entry;
8-
use embedded_time::{self as time, Clock, Instant, Period, TimeInt};
8+
use embedded_time::{self as time, traits::*, Clock, Instant, Period};
99
use mutex_trait::Mutex as _;
1010

1111
pub mod nrf52 {
@@ -40,7 +40,7 @@ pub mod nrf52 {
4040
pub struct SysClock;
4141

4242
impl time::Clock for SysClock {
43-
type Rep = i64;
43+
type Rep = u64;
4444
const PERIOD: Period = Period::new(1, 16_000_000);
4545

4646
fn now() -> Instant<Self> {
@@ -156,12 +156,12 @@ where
156156
led2.set_high()?;
157157
led3.set_high()?;
158158
led4.set_low()?;
159-
SysClock::delay(250.milliseconds());
159+
SysClock::delay(250_u32.milliseconds());
160160

161161
led1.set_high()?;
162162
led2.set_low()?;
163163
led3.set_low()?;
164164
led4.set_high()?;
165-
SysClock::delay(250.milliseconds());
165+
SysClock::delay(250_u32.milliseconds());
166166
}
167167
}

0 commit comments

Comments
 (0)