Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Verified Commit acaadaad authored by Ayush Singh's avatar Ayush Singh
Browse files

bb-imager: Code refactor


- Move Bcf config to flasher::bcf

Signed-off-by: Ayush Singh's avatarAyush Singh <ayush@beagleboard.org>
parent 26ea5825
Branches
Tags
1 merge request!31bb-imager: Remove use of unwrap
Pipeline #21246 passed with stages
in 5 minutes and 7 seconds
......@@ -236,7 +236,7 @@ impl Flasher {
#[derive(Clone, Debug)]
pub enum FlashingConfig {
LinuxSd(Option<sd::FlashingSdLinuxConfig>),
Bcf(FlashingBcfConfig),
Bcf(bcf::FlashingBcfConfig),
Msp430,
}
......@@ -252,21 +252,3 @@ impl FlashingConfig {
}
}
}
#[derive(Clone, Debug)]
pub struct FlashingBcfConfig {
pub verify: bool,
}
impl FlashingBcfConfig {
pub fn update_verify(mut self, verify: bool) -> Self {
self.verify = verify;
self
}
}
impl Default for FlashingBcfConfig {
fn default() -> Self {
Self { verify: true }
}
}
......@@ -398,3 +398,21 @@ pub fn possible_devices() -> std::collections::HashSet<crate::Destination> {
.map(crate::Destination::port)
.collect()
}
#[derive(Clone, Debug)]
pub struct FlashingBcfConfig {
pub verify: bool,
}
impl FlashingBcfConfig {
pub fn update_verify(mut self, verify: bool) -> Self {
self.verify = verify;
self
}
}
impl Default for FlashingBcfConfig {
fn default() -> Self {
Self { verify: true }
}
}
pub mod common;
pub mod config;
pub mod download;
pub mod error;
pub(crate) mod flasher;
pub mod img;
pub(crate) mod util;
pub mod common;
pub(crate) mod pal;
pub(crate) mod flasher;
pub(crate) mod util;
pub use common::*;
pub use flasher::sd::FlashingSdLinuxConfig;
pub use flasher::{bcf::FlashingBcfConfig, sd::FlashingSdLinuxConfig};
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment