diff options
author | Determinant <ted.sybil@gmail.com> | 2017-09-25 21:17:18 -0400 |
---|---|---|
committer | Determinant <ted.sybil@gmail.com> | 2017-09-25 21:17:18 -0400 |
commit | e3a0899abde145a2212082041ffeaf0ca6529300 (patch) | |
tree | 13f7a49a9139c86b35f3a413a4e03b10d88b37df /src/main.rs | |
parent | 33063316e02911b1d2e0d02b53043b89ce87dea1 (diff) |
...
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs index a79107c..0b63e58 100644 --- a/src/main.rs +++ b/src/main.rs @@ -53,9 +53,7 @@ fn update_clock() { minute: min, hour: hr, ..} = RTC.as_mut().unwrap() .read_fulldate(); - TIME = Clock{sec: sec, - min: min, - hr: hr, + TIME = Clock{sec, min, hr, reset: RESET_PERIOD}; } @@ -74,9 +72,9 @@ fn systick_handler() { exception!(SYS_TICK, systick_handler); impl<'a> ShiftRegister<'a> { - fn new(g: &'a stm32f103xx::gpioa::RegisterBlock, + fn new(gpioa: &'a stm32f103xx::gpioa::RegisterBlock, width: u8) -> ShiftRegister<'a> { - let this = ShiftRegister{gpioa: g, width: width}; + let this = ShiftRegister{gpioa, width}; this } |