mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2025-01-11 04:51:31 +11:00
Replace hal::timer::Timer with hal::Timer or Timer
This commit is contained in:
parent
def0ed97f7
commit
6e184a91a7
|
@ -8,7 +8,6 @@ use embedded_hal::digital::v2::OutputPin;
|
|||
use embedded_hal::timer::CountDown;
|
||||
use embedded_time::duration::Extensions;
|
||||
use panic_halt as _;
|
||||
use rp2040_hal::pio::PIOExt;
|
||||
use smart_leds::{brightness, SmartLedsWrite, RGB8};
|
||||
use ws2812_pio::Ws2812;
|
||||
|
||||
|
@ -16,8 +15,9 @@ use itsy_bitsy_rp2040::{
|
|||
hal::{
|
||||
clocks::{init_clocks_and_plls, Clock},
|
||||
pac,
|
||||
pio::PIOExt,
|
||||
watchdog::Watchdog,
|
||||
Sio,
|
||||
Sio, Timer,
|
||||
},
|
||||
Pins, XOSC_CRYSTAL_FREQ,
|
||||
};
|
||||
|
@ -59,7 +59,7 @@ fn main() -> ! {
|
|||
.set_high()
|
||||
.unwrap();
|
||||
|
||||
let timer = rp2040_hal::timer::Timer::new(pac.TIMER, &mut pac.RESETS);
|
||||
let timer = Timer::new(pac.TIMER, &mut pac.RESETS);
|
||||
let mut delay = timer.count_down();
|
||||
|
||||
let (mut pio, sm0, _, _, _) = pac.PIO0.split(&mut pac.RESETS);
|
||||
|
|
|
@ -61,7 +61,7 @@ fn main() -> ! {
|
|||
.unwrap();
|
||||
|
||||
// Configure the Timer peripheral in count-down mode
|
||||
let timer = hal::timer::Timer::new(pac.TIMER, &mut pac.RESETS);
|
||||
let timer = hal::Timer::new(pac.TIMER, &mut pac.RESETS);
|
||||
let mut count_down = timer.count_down();
|
||||
|
||||
// The single-cycle I/O block controls our GPIO pins
|
||||
|
|
|
@ -89,7 +89,7 @@ fn main() -> ! {
|
|||
.device_class(2) // from: https://www.usb.org/defined-class-codes
|
||||
.build();
|
||||
|
||||
let timer = hal::timer::Timer::new(pac.TIMER, &mut pac.RESETS);
|
||||
let timer = hal::Timer::new(pac.TIMER, &mut pac.RESETS);
|
||||
let mut said_hello = false;
|
||||
loop {
|
||||
// A welcome message at the beginning
|
||||
|
|
|
@ -8,7 +8,6 @@ use embedded_hal::digital::v2::OutputPin;
|
|||
use embedded_hal::timer::CountDown;
|
||||
use embedded_time::duration::Extensions;
|
||||
use panic_halt as _;
|
||||
use rp2040_hal::pio::PIOExt;
|
||||
use smart_leds::{brightness, SmartLedsWrite, RGB8};
|
||||
use ws2812_pio::Ws2812;
|
||||
|
||||
|
@ -16,8 +15,9 @@ use qt_py_rp2040::{
|
|||
hal::{
|
||||
clocks::{init_clocks_and_plls, Clock},
|
||||
pac,
|
||||
pio::PIOExt,
|
||||
watchdog::Watchdog,
|
||||
Sio,
|
||||
Sio, Timer,
|
||||
},
|
||||
Pins, XOSC_CRYSTAL_FREQ,
|
||||
};
|
||||
|
@ -59,7 +59,7 @@ fn main() -> ! {
|
|||
.set_high()
|
||||
.unwrap();
|
||||
|
||||
let timer = rp2040_hal::timer::Timer::new(pac.TIMER, &mut pac.RESETS);
|
||||
let timer = Timer::new(pac.TIMER, &mut pac.RESETS);
|
||||
let mut delay = timer.count_down();
|
||||
|
||||
let (mut pio, sm0, _, _, _) = pac.PIO0.split(&mut pac.RESETS);
|
||||
|
|
Loading…
Reference in a new issue