updates for APIs

This commit is contained in:
2025-04-24 12:41:37 +02:00
parent 75a339222b
commit 1071acf328
26 changed files with 64 additions and 370 deletions

View File

@@ -10,7 +10,7 @@ use num_enum::TryFromPrimitive;
use panic_probe as _;
// Import logger.
use defmt_rtt as _;
use va108xx_hal::{pac, time::Hertz, timer::CountdownTimer};
use va108xx_hal::{pac, spi::SpiClkConfig, time::Hertz, timer::CountdownTimer};
use vorago_reb1::m95m01::M95M01;
// Useful for debugging and see what the bootloader is doing. Enabled currently, because
@@ -104,9 +104,10 @@ fn main() -> ! {
}
let dp = pac::Peripherals::take().unwrap();
let cp = cortex_m::Peripherals::take().unwrap();
let mut timer = CountdownTimer::new(CLOCK_FREQ, dp.tim0);
let mut timer = CountdownTimer::new(dp.tim0, CLOCK_FREQ);
let mut nvm = M95M01::new(CLOCK_FREQ, dp.spic);
let clk_config = SpiClkConfig::new(2, 4);
let mut nvm = M95M01::new(dp.spic, clk_config);
if FLASH_SELF {
let mut first_four_bytes: [u8; 4] = [0; 4];