Skip to content

Commit 6dd78e5

Browse files
committed
rustfmt
1 parent bc39aa8 commit 6dd78e5

File tree

6 files changed

+19
-20
lines changed

6 files changed

+19
-20
lines changed

drv/lpc55-gpio/src/main.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ struct ServerImpl<'a> {
5555
inputmux: &'a device::inputmux::RegisterBlock,
5656
}
5757

58-
impl ServerImpl <'_> {
58+
impl ServerImpl<'_> {
5959
fn set_pin_direction(&self, port: usize, pin: usize, dir: Direction) {
6060
match dir {
6161
Direction::Input => self.gpio.dirclr[port]
@@ -64,7 +64,6 @@ impl ServerImpl <'_> {
6464
.write(|w| unsafe { w.dirsetp().bits(1 << pin) }),
6565
}
6666
}
67-
6867
}
6968

7069
impl idl::InOrderPinsImpl for ServerImpl<'_> {
@@ -174,7 +173,8 @@ impl idl::InOrderPinsImpl for ServerImpl<'_> {
174173
syscon.enable_clock(Peripheral::Mux);
175174
syscon.leave_reset(Peripheral::Mux);
176175
unsafe {
177-
self.inputmux.pintsel[pint_slot as usize].write(|w| w.bits(pin as u32));
176+
self.inputmux.pintsel[pint_slot as usize]
177+
.write(|w| w.bits(pin as u32));
178178
}
179179
syscon.disable_clock(Peripheral::Mux);
180180

@@ -289,7 +289,6 @@ impl idl::InOrderPinsImpl for ServerImpl<'_> {
289289
let status = self.pint.ist.read().bits() & pint_mask;
290290
Ok(status)
291291
}
292-
293292
}
294293

295294
impl NotificationHandler for ServerImpl<'_> {

drv/lpc55-sprot-server/src/main.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ use drv_sprot_api::{
5656
};
5757
use lpc55_pac as device;
5858
use ringbuf::{ringbuf, ringbuf_entry};
59-
use userlib::{
60-
sys_irq_control, sys_recv_notification, task_slot, UnwrapLite,
61-
};
59+
use userlib::{sys_irq_control, sys_recv_notification, task_slot, UnwrapLite};
6260

6361
mod handler;
6462

task/button-api/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
77
#![no_std]
88

9-
use userlib::{sys_send, FromPrimitive};
109
use derive_idol_err::IdolError;
10+
use userlib::{sys_send, FromPrimitive};
1111

1212
#[derive(Copy, Clone, Debug, FromPrimitive, IdolError, counters::Count)]
1313
pub enum ButtonError {

task/button/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
44

55
use anyhow::Result;
6-
use idol::{server::ServerStyle, CounterSettings};
76
use build_lpc55pins::PinConfig;
7+
use idol::{server::ServerStyle, CounterSettings};
88
use serde::Deserialize;
99

1010
#[derive(Deserialize)]

task/button/src/main.rs

+3-10
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ use idol_runtime::{
2121
// use serde::Deserialize;
2222
// use zerocopy::AsBytes;
2323
use crate::idl::INCOMING_SIZE;
24-
use userlib::{set_timer_relative, sys_set_timer, task_slot, UnwrapLite, sys_irq_control};
24+
use userlib::{
25+
set_timer_relative, sys_irq_control, sys_set_timer, task_slot, UnwrapLite,
26+
};
2527

2628
// Time is in approximate ms
2729
const ON_DELAY: u32 = 1 * 1000;
@@ -73,12 +75,6 @@ impl ButtonServer {
7375
}
7476

7577
fn timer_expiry(&mut self) {
76-
// then:
77-
// - toggle cycle
78-
// - speed up
79-
// else
80-
// - inrement
81-
8278
if self.on {
8379
// LEDs were on
8480
if self.off_ms > 0 {
@@ -222,9 +218,6 @@ impl NotificationHandler for ButtonServer {
222218

223219
#[export_name = "main"]
224220
fn main() -> ! {
225-
// XXX Safety, if all else fails, then waiting a minute longer after reset
226-
// may help us get a debugger in there.
227-
// hl::sleep_for(60000);
228221
let mut buffer = [0u8; INCOMING_SIZE];
229222

230223
let gpio_driver = GPIO.get_task_id();

task/hiffy/src/lpc55.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,16 @@ fn gpio_configure(
244244
let task = GPIO.get_task_id();
245245
let gpio = drv_lpc55_gpio_api::Pins::from(task);
246246

247-
gpio.iocon_configure(pin, alt, mode, slew, invert, digimode, opendrain, PintSlot::None);
247+
gpio.iocon_configure(
248+
pin,
249+
alt,
250+
mode,
251+
slew,
252+
invert,
253+
digimode,
254+
opendrain,
255+
PintSlot::None,
256+
);
248257

249258
Ok(0)
250259
}

0 commit comments

Comments
 (0)