diff --git a/va108xx/flashloader/Cargo.toml b/va108xx/flashloader/Cargo.toml index ae7991c..786c3ae 100644 --- a/va108xx/flashloader/Cargo.toml +++ b/va108xx/flashloader/Cargo.toml @@ -12,7 +12,7 @@ defmt-rtt = { version = "1" } panic-probe = { version = "1", features = ["print-defmt"] } num_enum = { version = "0.7", default-features = false } cobs = { version = "0.5", default-features = false } -satrs = { version = "0.3.0-alpha.1", git = "https://egit.irs.uni-stuttgart.de/rust/sat-rs.git", default-features = false, features = ["defmt"] } +satrs = { version = "0.3.0-alpha.3", default-features = false, features = ["defmt"] } arbitrary-int = "2" ringbuf = { version = "0.4.7", default-features = false, features = ["portable-atomic"] } # spacepackets = { version = "0.17", path = "https://egit.irs.uni-stuttgart.de/rust/spacepackets.git", default-features = false, features = ["defmt"] } diff --git a/va108xx/flashloader/src/main.rs b/va108xx/flashloader/src/main.rs index 60496cf..85c21c3 100644 --- a/va108xx/flashloader/src/main.rs +++ b/va108xx/flashloader/src/main.rs @@ -282,7 +282,7 @@ mod app { prod.buf.push_slice(&cx.local.verif_buf[0..written_size]); }); }; - let request_id = VerificationReportCreator::read_request_id_from_tc(&pus_tc); + let request_id = cx.local.verif_reporter.read_request_id(&pus_tc); let tm = cx .local .verif_reporter @@ -297,7 +297,7 @@ mod app { .expect("acceptance success failed"); write_and_send(&tm); - if pus_tc.service() == PusServiceId::Action as u8 { + if pus_tc.service_type_id() == PusServiceId::Action as u8 { let mut corrupt_image = |base_addr: u32| { let mut buf = [0u8; 4]; cx.local @@ -316,15 +316,15 @@ mod app { .expect("completion success failed"); write_and_send(&tm); }; - if pus_tc.subservice() == ActionId::CorruptImageA as u8 { + if pus_tc.message_subtype_id() == ActionId::CorruptImageA as u8 { defmt::info!("corrupting App Image A"); corrupt_image(APP_A_START_ADDR); } - if pus_tc.subservice() == ActionId::CorruptImageB as u8 { + if pus_tc.message_subtype_id() == ActionId::CorruptImageB as u8 { defmt::info!("corrupting App Image B"); corrupt_image(APP_B_START_ADDR); } - if pus_tc.subservice() == ActionId::SetBootSlot as u8 { + if pus_tc.message_subtype_id() == ActionId::SetBootSlot as u8 { if pus_tc.app_data().is_empty() { defmt::warn!("App data for preferred image command too short"); } @@ -348,7 +348,8 @@ mod app { write_and_send(&tm); } } - if pus_tc.service() == PusServiceId::Test as u8 && pus_tc.subservice() == 1 { + if pus_tc.service_type_id() == PusServiceId::Test as u8 && pus_tc.message_subtype_id() == 1 + { defmt::info!("received ping TC"); let tm = cx .local @@ -356,7 +357,7 @@ mod app { .completion_success(cx.local.src_data_buf, &request_id, u14::ZERO, 0, &[]) .expect("completion success failed"); write_and_send(&tm); - } else if pus_tc.service() == PusServiceId::MemoryManagement as u8 { + } else if pus_tc.service_type_id() == PusServiceId::MemoryManagement as u8 { let tm = cx .local .verif_reporter @@ -371,7 +372,7 @@ mod app { .expect("step success failed"); write_and_send(&tm); // Raw memory write TC - if pus_tc.subservice() == 2 { + if pus_tc.message_subtype_id() == 2 { let app_data = pus_tc.app_data(); if app_data.len() < 10 { defmt::warn!( diff --git a/va416xx/flashloader/Cargo.toml b/va416xx/flashloader/Cargo.toml index 1a8b7a7..d7a369e 100644 --- a/va416xx/flashloader/Cargo.toml +++ b/va416xx/flashloader/Cargo.toml @@ -12,7 +12,7 @@ panic-probe = { version = "1", features = ["defmt"] } static_cell = "2" ringbuf = { version = "0.4", default-features = false } once_cell = { version = "1", default-features = false, features = ["critical-section"] } -satrs = { version = "0.3.0-alpha.1", git = "https://egit.irs.uni-stuttgart.de/rust/sat-rs.git", default-features = false, features = ["defmt"] } +satrs = { version = "0.3.0-alpha.3", default-features = false, features = ["defmt"] } cobs = { version = "0.5", default-features = false } arbitrary-int = "2" diff --git a/va416xx/flashloader/src/main.rs b/va416xx/flashloader/src/main.rs index b091f54..852f569 100644 --- a/va416xx/flashloader/src/main.rs +++ b/va416xx/flashloader/src/main.rs @@ -358,7 +358,7 @@ mod app { .push_slice(&cx.local.verif_buf[0..written_size]); }); }; - let request_id = VerificationReportCreator::read_request_id_from_tc(&pus_tc); + let request_id = cx.local.verif_reporter.read_request_id(&pus_tc); let tm = cx .local .verif_reporter @@ -373,7 +373,7 @@ mod app { .expect("acceptance success failed"); write_and_send(&tm); - if pus_tc.service() == PusServiceId::Action as u8 { + if pus_tc.service_type_id() == PusServiceId::Action as u8 { let mut corrupt_image = |base_addr: u32| { // Safety: We only use this for NVM handling and we only do NVM // handling here. @@ -393,16 +393,17 @@ mod app { .expect("completion success failed"); write_and_send(&tm); }; - if pus_tc.subservice() == ActionId::CorruptImageA as u8 { + if pus_tc.message_subtype_id() == ActionId::CorruptImageA as u8 { defmt::info!("corrupting App Image A"); corrupt_image(APP_A_START_ADDR); } - if pus_tc.subservice() == ActionId::CorruptImageB as u8 { + if pus_tc.message_subtype_id() == ActionId::CorruptImageB as u8 { defmt::info!("corrupting App Image B"); corrupt_image(APP_B_START_ADDR); } } - if pus_tc.service() == PusServiceId::Test as u8 && pus_tc.subservice() == 1 { + if pus_tc.service_type_id() == PusServiceId::Test as u8 && pus_tc.message_subtype_id() == 1 + { defmt::info!("received ping TC"); let tm = cx .local @@ -410,7 +411,7 @@ mod app { .completion_success(cx.local.src_data_buf, &request_id, u14::ZERO, 0, &[]) .expect("completion success failed"); write_and_send(&tm); - } else if pus_tc.service() == PusServiceId::MemoryManagement as u8 { + } else if pus_tc.service_type_id() == PusServiceId::MemoryManagement as u8 { let tm = cx .local .verif_reporter @@ -425,7 +426,7 @@ mod app { .expect("step success failed"); write_and_send(&tm); // Raw memory write TC - if pus_tc.subservice() == 2 { + if pus_tc.message_subtype_id() == 2 { let app_data = pus_tc.app_data(); if app_data.len() < 10 { defmt::warn!( diff --git a/va416xx/va416xx-hal/src/clock.rs b/va416xx/va416xx-hal/src/clock.rs index fd533ec..e2b1cc1 100644 --- a/va416xx/va416xx-hal/src/clock.rs +++ b/va416xx/va416xx-hal/src/clock.rs @@ -205,7 +205,7 @@ impl ClockConfigurator { /// This function can be used to utilize the XTAL_N clock input directly without the /// oscillator. /// - /// It sets the internal configuration to [ClkselSys::XtalN] and [RefClkSel::XtalN]. + /// It sets the internal configuration to [ClockSelect::XtalN] and [ReferenceClockSelect::XtalN]. #[inline] pub fn xtal_n_clk(mut self) -> Self { self.clksel_sys = ClockSelect::XtalN;