Make trait comments more consistent.

This commit is contained in:
Jonathan Pallant (42 Technology) 2021-09-27 19:01:46 +01:00
parent 8876159687
commit d251627e47
8 changed files with 20 additions and 11 deletions

View file

@ -20,7 +20,7 @@ use panic_halt as _;
// Alias for our HAL crate
use rp2040_hal as hal;
// The traits we need
// Some traits we need
use core::fmt::Write;
use embedded_hal::adc::OneShot;
use embedded_time::fixed_point::FixedPoint;

View file

@ -23,7 +23,7 @@ use rp2040_hal as hal;
// register access
use hal::pac;
// A GPIO trait we need
// Some traits we need
use embedded_hal::digital::v2::OutputPin;
use embedded_time::fixed_point::FixedPoint;
use rp2040_hal::clocks::Clock;

View file

@ -23,7 +23,7 @@ use rp2040_hal as hal;
// register access
use hal::pac;
// The traits we need
// Some traits we need
use embedded_hal::digital::v2::InputPin;
use embedded_hal::digital::v2::OutputPin;

View file

@ -16,10 +16,8 @@ use cortex_m_rt::entry;
// be linked)
use panic_halt as _;
// The I²C trait from Embedded HAL we need
// Some traits we need
use embedded_hal::blocking::i2c::Write;
// A frequency/time related trait we need
use embedded_time::rate::Extensions;
// Alias for our HAL crate

View file

@ -25,7 +25,7 @@ use rp2040_hal as hal;
// Our LCD driver
use hd44780_driver as hd44780;
// Traits we need
// Some traits we need
use embedded_time::fixed_point::FixedPoint;
use rp2040_hal::clocks::Clock;
@ -118,3 +118,5 @@ fn main() -> ! {
// Empty loop
}
}
// End of file

View file

@ -22,7 +22,7 @@ use panic_halt as _;
// Alias for our HAL crate
use rp2040_hal as hal;
// Traits we need
// Some traits we need
use cortex_m::prelude::*;
use embedded_time::rate::Extensions;
use rp2040_hal::clocks::Clock;
@ -122,5 +122,9 @@ fn main() -> ! {
};
#[allow(clippy::empty_loop)]
loop {}
loop {
// Empty loop
}
}
// End of file

View file

@ -104,3 +104,5 @@ fn main() -> ! {
value += 1
}
}
// End of file

View file

@ -23,7 +23,7 @@ use rp2040_hal as hal;
// register access
use hal::pac;
// Traits we need
// Some traits we need
use embedded_hal::digital::v2::OutputPin;
use embedded_hal::watchdog::{Watchdog, WatchdogEnable};
use embedded_time::duration::Extensions;
@ -46,7 +46,8 @@ const XTAL_FREQ_HZ: u32 = 12_000_000u32;
/// as soon as all global variables are initialised.
///
/// The function configures the RP2040 peripherals, then toggles a GPIO pin in
/// an infinite loop. If there is an LED connected to that pin, it will blink.
/// an infinite loop. After a period of time, the watchdog will kick in to reset
/// the CPU.
#[entry]
fn main() -> ! {
// Grab our singleton objects
@ -110,3 +111,5 @@ fn main() -> ! {
delay.delay_ms(100);
}
}
// End of file