Embassy
rp-pac

Crates

git

Versions

default

Flavors

Struct rp_pac::pio::regs::SmExecctrl

source ·
#[repr(transparent)]
pub struct SmExecctrl(pub u32);
Expand description

Execution/behavioural settings for state machine 2

Tuple Fields§

§0: u32

Implementations§

source§

impl SmExecctrl

source

pub const fn status_n(&self) -> u8

Comparison level for the MOV x, STATUS instruction

source

pub fn set_status_n(&mut self, val: u8)

Comparison level for the MOV x, STATUS instruction

source

pub const fn status_sel(&self) -> SmExecctrlStatusSel

Comparison used for the MOV x, STATUS instruction.

source

pub fn set_status_sel(&mut self, val: SmExecctrlStatusSel)

Comparison used for the MOV x, STATUS instruction.

source

pub const fn wrap_bottom(&self) -> u8

After reaching wrap_top, execution is wrapped to this address.

source

pub fn set_wrap_bottom(&mut self, val: u8)

After reaching wrap_top, execution is wrapped to this address.

source

pub const fn wrap_top(&self) -> u8

After reaching this address, execution is wrapped to wrap_bottom. If the instruction is a jump, and the jump condition is true, the jump takes priority.

source

pub fn set_wrap_top(&mut self, val: u8)

After reaching this address, execution is wrapped to wrap_bottom. If the instruction is a jump, and the jump condition is true, the jump takes priority.

source

pub const fn out_sticky(&self) -> bool

Continuously assert the most recent OUT/SET to the pins

source

pub fn set_out_sticky(&mut self, val: bool)

Continuously assert the most recent OUT/SET to the pins

source

pub const fn inline_out_en(&self) -> bool

If 1, use a bit of OUT data as an auxiliary write enable When used in conjunction with OUT_STICKY, writes with an enable of 0 will deassert the latest pin write. This can create useful masking/override behaviour due to the priority ordering of state machine pin writes (SM0 < SM1 < …)

source

pub fn set_inline_out_en(&mut self, val: bool)

If 1, use a bit of OUT data as an auxiliary write enable When used in conjunction with OUT_STICKY, writes with an enable of 0 will deassert the latest pin write. This can create useful masking/override behaviour due to the priority ordering of state machine pin writes (SM0 < SM1 < …)

source

pub const fn out_en_sel(&self) -> u8

Which data bit to use for inline OUT enable

source

pub fn set_out_en_sel(&mut self, val: u8)

Which data bit to use for inline OUT enable

source

pub const fn jmp_pin(&self) -> u8

The GPIO number to use as condition for JMP PIN. Unaffected by input mapping.

source

pub fn set_jmp_pin(&mut self, val: u8)

The GPIO number to use as condition for JMP PIN. Unaffected by input mapping.

source

pub const fn side_pindir(&self) -> bool

If 1, side-set data is asserted to pin directions, instead of pin values

source

pub fn set_side_pindir(&mut self, val: bool)

If 1, side-set data is asserted to pin directions, instead of pin values

source

pub const fn side_en(&self) -> bool

If 1, the MSB of the Delay/Side-set instruction field is used as side-set enable, rather than a side-set data bit. This allows instructions to perform side-set optionally, rather than on every instruction, but the maximum possible side-set width is reduced from 5 to 4. Note that the value of PINCTRL_SIDESET_COUNT is inclusive of this enable bit.

source

pub fn set_side_en(&mut self, val: bool)

If 1, the MSB of the Delay/Side-set instruction field is used as side-set enable, rather than a side-set data bit. This allows instructions to perform side-set optionally, rather than on every instruction, but the maximum possible side-set width is reduced from 5 to 4. Note that the value of PINCTRL_SIDESET_COUNT is inclusive of this enable bit.

source

pub const fn exec_stalled(&self) -> bool

If 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes.

source

pub fn set_exec_stalled(&mut self, val: bool)

If 1, an instruction written to SMx_INSTR is stalled, and latched by the state machine. Will clear to 0 once this instruction completes.

Trait Implementations§

source§

impl Clone for SmExecctrl

source§

fn clone(&self) -> SmExecctrl

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 Default for SmExecctrl

source§

fn default() -> SmExecctrl

Returns the “default value” for a type. Read more
source§

impl PartialEq<SmExecctrl> for SmExecctrl

source§

fn eq(&self, other: &SmExecctrl) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for SmExecctrl

source§

impl Eq for SmExecctrl

source§

impl StructuralEq for SmExecctrl

source§

impl StructuralPartialEq for SmExecctrl

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.