clippy
Some checks failed
Rust/va416xx-rs/pipeline/pr-main There was a failure building this commit

This commit is contained in:
Robin Müller 2024-09-17 12:14:45 +02:00
parent d25108f85d
commit 9b26f79bed
Signed by: muellerr
GPG Key ID: A649FB78196E3849
3 changed files with 11 additions and 6 deletions

View File

@ -12,6 +12,7 @@ use embassy_time_driver::{time_driver_impl, AlarmHandle, Driver, TICK_HZ};
use va416xx_hal::{ use va416xx_hal::{
clock::Clocks, clock::Clocks,
enable_interrupt, enable_interrupt,
irq_router::enable_and_init_irq_router,
pac::{self, interrupt}, pac::{self, interrupt},
pwm::{assert_tim_reset, deassert_tim_reset, enable_tim_clk, ValidTim}, pwm::{assert_tim_reset, deassert_tim_reset, enable_tim_clk, ValidTim},
}; };
@ -24,10 +25,12 @@ pub type AlarmClk2 = pac::Tim12;
/// This has to be called to initiate the time driver for embassy. /// This has to be called to initiate the time driver for embassy.
pub fn init( pub fn init(
syscfg: &mut pac::Sysconfig, syscfg: &mut pac::Sysconfig,
irq_router: &pac::IrqRouter,
timekeeper: TimekeeperClk, timekeeper: TimekeeperClk,
alarm: AlarmClk0, alarm: AlarmClk0,
clocks: &Clocks, clocks: &Clocks,
) { ) {
enable_and_init_irq_router(syscfg, irq_router);
DRIVER.init(syscfg, timekeeper, alarm, clocks) DRIVER.init(syscfg, timekeeper, alarm, clocks)
} }

View File

@ -25,7 +25,13 @@ async fn main(_spawner: Spawner) {
.xtal_n_clk_with_src_freq(Hertz::from_raw(EXTCLK_FREQ)) .xtal_n_clk_with_src_freq(Hertz::from_raw(EXTCLK_FREQ))
.freeze(&mut dp.sysconfig) .freeze(&mut dp.sysconfig)
.unwrap(); .unwrap();
embassy_example::init(&mut dp.sysconfig, dp.tim15, dp.tim14, &clocks); embassy_example::init(
&mut dp.sysconfig,
&dp.irq_router,
dp.tim15,
dp.tim14,
&clocks,
);
let portg = PinsG::new(&mut dp.sysconfig, dp.portg); let portg = PinsG::new(&mut dp.sysconfig, dp.portg);
let mut led = portg.pg5.into_readable_push_pull_output(); let mut led = portg.pg5.into_readable_push_pull_output();
loop { loop {

View File

@ -10,12 +10,8 @@ use panic_rtt_target as _;
use rtt_target::{rprintln, rtt_init_print}; use rtt_target::{rprintln, rtt_init_print};
use simple_examples::peb1; use simple_examples::peb1;
use va416xx_hal::{ use va416xx_hal::{
clock::{
assert_periph_reset, deassert_periph_reset, disable_peripheral_clock,
enable_peripheral_clock, PeripheralSelect,
},
irq_router::enable_and_init_irq_router, irq_router::enable_and_init_irq_router,
pac::{self, adc::rxfifoirqtrg::W, interrupt}, pac::{self, interrupt},
prelude::*, prelude::*,
timer::{default_ms_irq_handler, set_up_ms_tick, CountdownTimer, MS_COUNTER}, timer::{default_ms_irq_handler, set_up_ms_tick, CountdownTimer, MS_COUNTER},
}; };