Actually start the timer
This commit is contained in:
parent
1eb45897a1
commit
f66d2dd55f
|
@ -1,7 +1,7 @@
|
|||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use atsamd_hal::clock::ClockGenId;
|
||||
use atsamd_hal::prelude::{_atsamd21_hal_time_U32Ext, _embedded_hal_timer_CountDown};
|
||||
use panic_halt as _; // you can put a breakpoint on `rust_begin_unwind` to catch panics
|
||||
use trinket_m0 as hal;
|
||||
|
||||
|
@ -104,9 +104,11 @@ fn main() -> ! {
|
|||
.init();
|
||||
|
||||
let timer_clock = clocks.gclk0();
|
||||
clocks.configure_standby(ClockGenId::GCLK1, true);
|
||||
let tc45 = &clocks.tc4_tc5(&timer_clock).unwrap();
|
||||
let timer = atsamd_hal::timer::TimerCounter::tc4_(tc45, peripherals.TC4, &mut peripherals.PM);
|
||||
let mut timer =
|
||||
atsamd_hal::timer::TimerCounter::tc4_(tc45, peripherals.TC4, &mut peripherals.PM);
|
||||
|
||||
timer.start(128_u32.hz());
|
||||
|
||||
let mut rgb = Dotstar {
|
||||
ci: pins.dotstar_ci,
|
||||
|
|
Loading…
Reference in a new issue