Struct probe_rs_target::ChipFamily
source · [−]pub struct ChipFamily {
pub name: String,
pub manufacturer: Option<JEP106Code>,
pub variants: Vec<Chip>,
pub flash_algorithms: Vec<RawFlashAlgorithm>,
pub source: TargetDescriptionSource,
}
Expand description
This describes a chip family with all its variants.
This struct is usually read from a target description file.
Fields
name: String
This is the name of the chip family in base form.
E.g. nRF52832
.
manufacturer: Option<JEP106Code>
The JEP106 code of the manufacturer.
variants: Vec<Chip>
This vector holds all the variants of the family.
flash_algorithms: Vec<RawFlashAlgorithm>
This vector holds all available algorithms.
source: TargetDescriptionSource
Source of the target description, used for diagnostics
Implementations
sourceimpl ChipFamily
impl ChipFamily
sourcepub fn validate(&self) -> Result<(), String>
pub fn validate(&self) -> Result<(), String>
Validates the ChipFamily
such that probe-rs can make assumptions about the correctness without validating thereafter.
This method should be called right after the ChipFamily
is created!
sourceimpl ChipFamily
impl ChipFamily
sourcepub fn algorithms(&self) -> &[RawFlashAlgorithm]
pub fn algorithms(&self) -> &[RawFlashAlgorithm]
Get all flash algorithms for this family of chips.
sourcepub fn get_algorithm(&self, name: impl AsRef<str>) -> Option<&RawFlashAlgorithm>
pub fn get_algorithm(&self, name: impl AsRef<str>) -> Option<&RawFlashAlgorithm>
Try to find a RawFlashAlgorithm with a given name.
Trait Implementations
sourceimpl Clone for ChipFamily
impl Clone for ChipFamily
sourcefn clone(&self) -> ChipFamily
fn clone(&self) -> ChipFamily
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ChipFamily
impl Debug for ChipFamily
sourceimpl<'de> Deserialize<'de> for ChipFamily
impl<'de> Deserialize<'de> for ChipFamily
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for ChipFamily
impl Serialize for ChipFamily
Auto Trait Implementations
impl RefUnwindSafe for ChipFamily
impl Send for ChipFamily
impl Sync for ChipFamily
impl Unpin for ChipFamily
impl UnwindSafe for ChipFamily
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more