[][src]Struct probe_rs::config::flash_algorithm::FlashAlgorithm

pub struct FlashAlgorithm {
    pub name: String,
    pub default: bool,
    pub load_address: u32,
    pub instructions: Vec<u32>,
    pub pc_init: Option<u32>,
    pub pc_uninit: Option<u32>,
    pub pc_program_page: u32,
    pub pc_erase_sector: u32,
    pub pc_erase_all: Option<u32>,
    pub static_base: u32,
    pub begin_stack: u32,
    pub begin_data: u32,
    pub page_buffers: Vec<u32>,
    pub flash_properties: FlashProperties,
}

Fields

name: String

The name of the flash algorithm.

default: bool

Whether this flash algorithm is the default one or not.

load_address: u32

Memory address where the flash algo instructions will be loaded to.

instructions: Vec<u32>

List of 32-bit words containing the position-independent code for the algo.

pc_init: Option<u32>

Address of the Init() entry point. Optional.

pc_uninit: Option<u32>

Address of the UnInit() entry point. Optional.

pc_program_page: u32

Address of the ProgramPage() entry point.

pc_erase_sector: u32

Address of the EraseSector() entry point.

pc_erase_all: Option<u32>

Address of the EraseAll() entry point. Optional.

static_base: u32

Initial value of the R9 register for calling flash algo entry points, which determines where the position-independent data resides.

begin_stack: u32

Initial value of the stack pointer when calling any flash algo API.

begin_data: u32

Base address of the page buffer. Used if page_buffers is not provided.

page_buffers: Vec<u32>

An optional list of base addresses for page buffers. The buffers must be at least as large as the region's page_size attribute. If at least 2 buffers are included in the list, then double buffered programming will be enabled.

flash_properties: FlashProperties

The properties of the flash on the device.

Methods

impl FlashAlgorithm[src]

pub fn sector_info(&self, address: u32) -> Option<SectorInfo>[src]

pub fn page_info(&self, address: u32) -> Option<PageInfo>[src]

Returns the necessary information about the page which address resides in if the address is inside the flash region.

pub fn is_erased(&self, data: &[u8]) -> bool[src]

Returns true if the entire contents of the argument array equal the erased byte value.

Trait Implementations

impl Clone for FlashAlgorithm[src]

impl Debug for FlashAlgorithm[src]

impl Default for FlashAlgorithm[src]

impl<'de> Deserialize<'de> for FlashAlgorithm[src]

impl Serialize for FlashAlgorithm[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.