Struct probe_rs_target::ChipFamily
source · pub struct ChipFamily {
pub name: String,
pub manufacturer: Option<JEP106Code>,
pub generated_from_pack: bool,
pub pack_file_release: Option<String>,
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.
generated_from_pack: bool
The target-gen
process will set this to true
.
Please change this to false
if this file is modified from the generated, or is a manually created target description.
pack_file_release: Option<String>
The latest release of the pack file from which this was generated. Values:
Some("1.3.0")
if the latest pack file release was for example “1.3.0”.None
if this was not generated from a pack file, or has been modified since it was generated.
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§
source§impl 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!
source§impl 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§
source§impl Clone for ChipFamily
impl Clone for ChipFamily
source§fn clone(&self) -> ChipFamily
fn clone(&self) -> ChipFamily
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more