fn write_replay_objects(
    core: &mut Core,
    locations: &ObjectLocationMap,
    ktest: &KTest,
) -> Result<()> {
    for test in &ktest.objects {
        let location = locations.get(&test.name);
        match location {
            Some(addr) => {
                let a = addr.unwrap() as u32;
                let slice = test.bytes.as_slice();
                core.write_8(a, slice).with_context(|| {
                    format!("Could not write {:?} to memory address {:x}", &slice, &a)
                })?;
                core.flush()?;
            }
            None => {
                warn!(
                    "Could not find an address in flash for KTestObject \'{:}\' with the data: {:?}",
                    test.name, test.bytes
                );
            }
        }
    }
    Ok(())
}
/// Writes the replay contents of the KTEST file to the objects memory addresses.
/// If no memory address was found for the specific KTEST, it will ignore writing
/// anything to it.
///
/// * `core` - A connected probe-rs _core_
/// * `locations` - A map of RTIC resource names and their memory addresses
/// * `ktest` - The test vector to write to its corresponding memory address
Writes the replay contents of the KTEST file to the objects memory addresses.
If no memory address was found for the specific KTEST, it will ignore writing
anything to it.


Writes the replay contents of the KTEST file to the objects memory addresses . If no memory address was found for the specific KTEST it will ignore writing anything to it .
fn write_replay_objects(
    core: &mut Core,
    locations: &ObjectLocationMap,
    ktest: &KTest,
) -> Result<()> {
    for test in &ktest.objects {
        let location = locations.get(&test.name);
        match location {
            Some(addr) => {
                let a = addr.unwrap() as u32;
                let slice = test.bytes.as_slice();
                core.write_8(a, slice).with_context(|| {
                    format!("Could not write {:?} to memory address {:x}", &slice, &a)
                })?;
                core.flush()?;
            }
            None => {
                warn!(
                    "Could not find an address in flash for KTestObject \'{:}\' with the data: {:?}",
                    test.name, test.bytes
                );
            }
        }
    }
    Ok(())
}
fn write_replay_objects ( core : & mut Core , locations : & ObjectLocationMap , ktest : & KTest , ) -> Result < ( ) > { for test in & ktest . objects { let location = locations . get ( & test . name ) ; match location { Some ( addr ) => { let a = addr . unwrap ( ) as u32 ; let slice = test . bytes . as_slice ( ) ; core . write_8 ( a , slice ) . with_context ( | | { format ! ( " " slice a ) } ) ? ; core . flush ( ) ? ; } None => { warn ! ( " \' \' " test name test bytes ) ; } } } Ok ( ( ) ) }
Writes the replay contents of the KTEST file to the objects memory addresses.
Writes the replay contents of the KTEST file to the objects memory addresses .
core
&mut Core
locations
&ObjectLocationMap
ktest
&KTest
core
&mut Core
locations
&ObjectLocationMap
ktest
&KTest