atsamd_hal::icm

Struct RegionConfiguration

Source
#[repr(C)]
pub struct RegionConfiguration(pub u32);
Expand description

Region Configuration Structure

Follows C-structure conventions

Tuple Fields§

§0: u32

Implementations§

Source§

impl RegionConfiguration

Source

pub fn get_cdwbn(&self) -> bool

Compare Digest or Write Back Digest

  • true: in Compare Digest mode.
  • false: in Write Back Digest mode.
Source

pub fn set_cdwbn(&mut self, value: bool)

Compare Digest or Write Back Digest

  • true: in Compare Digest mode.
  • false: in Write Back Digest mode.
Source

pub fn get_wrap(&self) -> bool

Wrap Command

  • true: next region descriptor address loaded is DSCR.
  • false: the next region descriptor address is current + 0x10.
Source

pub fn set_wrap(&mut self, value: bool)

Wrap Command

  • true: next region descriptor address loaded is DSCR.
  • false: the next region descriptor address is current + 0x10.
Source

pub fn get_eom(&self) -> bool

End of Monitoring

  • true: the current descriptor terminates the Main List, WRAP bit has no effect.
  • false: the current descriptor does not terminate the monitoring.
Source

pub fn set_eom(&mut self, value: bool)

End of Monitoring

  • true: the current descriptor terminates the Main List, WRAP bit has no effect.
  • false: the current descriptor does not terminate the monitoring.
Source

pub fn get_rhien(&self) -> bool

Region Hash Completed Interrupt Disable

  • true: the RHC flag remains cleared even if the setting condition is met.
  • false: the RHC flag is set when the field NEXT = 0 is found in main or secondary list.
Source

pub fn set_rhien(&mut self, value: bool)

Region Hash Completed Interrupt Disable

  • true: the RHC flag remains cleared even if the setting condition is met.
  • false: the RHC flag is set when the field NEXT = 0 is found in main or secondary list.
Source

pub fn get_dmien(&self) -> bool

Digest Mismatch Interrupt Disable

  • true: the RBE flag remains cleared even if the setting condition is met.
  • false: the RBE flag is set when the hash value just calculated from the processed region differs from expected hash value.
Source

pub fn set_dmien(&mut self, value: bool)

Digest Mismatch Interrupt Disable

  • true: the RBE flag remains cleared even if the setting condition is met.
  • false: the RBE flag is set when the hash value just calculated from the processed region differs from expected hash value.
Source

pub fn get_beien(&self) -> bool

Bus Error Interrupt Disable

  • true: the flag remains cleared even if the setting condition is met.
  • false: the flag is set when an error is reported on the sysstem bus by the bus MATRIX.
Source

pub fn set_beien(&mut self, value: bool)

Bus Error Interrupt Disable

  • true: the flag remains cleared even if the setting condition is met.
  • false: the flag is set when an error is reported on the sysstem bus by the bus MATRIX.
Source

pub fn get_wcien(&self) -> bool

Wrap Condition Interrupt Disable

  • true: the RWC flag remains cleared even if the setting condition is met.
  • false: the RWC flag is set when the WRAP is encountered.
Source

pub fn set_wcien(&mut self, value: bool)

Wrap Condition Interrupt Disable

  • true: the RWC flag remains cleared even if the setting condition is met.
  • false: the RWC flag is set when the WRAP is encountered.
Source

pub fn get_ecien(&self) -> bool

End Bit Condition Interrupt Enable

  • true: the REC flag remains cleared even if the setting condition is met.
  • false: the REC flag is set when the descriptor having the EOM bit set is processed.
Source

pub fn set_ecien(&mut self, value: bool)

End Bit Condition Interrupt Enable

  • true: the REC flag remains cleared even if the setting condition is met.
  • false: the REC flag is set when the descriptor having the EOM bit set is processed.
Source

pub fn get_suien(&self) -> bool

Monitoring Status Updated Condition Interrupt Enable

  • true: the RSU flag remains cleared even if the condition is met.
  • false: the RSU flag is set when the corresponding descriptor is loaded from memory to ICM.
Source

pub fn set_suien(&mut self, value: bool)

Monitoring Status Updated Condition Interrupt Enable

  • true: the RSU flag remains cleared even if the condition is met.
  • false: the RSU flag is set when the corresponding descriptor is loaded from memory to ICM.
Source

pub fn get_procdly(&self) -> bool

Processing Delay

Allows setting short or long delay.

See ProcessingDelay

Source

pub fn set_procdly(&mut self, value: bool)

Processing Delay

Allows setting short or long delay.

See ProcessingDelay

Source§

impl RegionConfiguration

Source

pub fn set_algo(&mut self, value: icm_algorithm)

User SHA Algorithm

Allow setting this regions icm_algorithm.

Source

pub fn get_algo(&mut self) -> icm_algorithm

User SHA Algorithm

Get the current user sha algorithm

Source

pub fn reset_region_configuration_to_default(&mut self)

Reset the RegionConfiguration to default values

Useful if changing between hashing and monitoring, etc.

Trait Implementations§

Source§

impl<T> BitRange<T> for RegionConfiguration
where u32: BitRange<T>,

Source§

fn bit_range(&self, msb: usize, lsb: usize) -> T

Get a range of bits.
Source§

fn set_bit_range(&mut self, msb: usize, lsb: usize, value: T)

Set a range of bits.
Source§

impl Clone for RegionConfiguration

Source§

fn clone(&self) -> RegionConfiguration

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RegionConfiguration

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for RegionConfiguration

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Bit for T
where T: BitRange<u8>,

Source§

fn bit(&self, bit: usize) -> bool

Get a single bit.
Source§

fn set_bit(&mut self, bit: usize, value: bool)

Set a single bit.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.