Type Alias R

Source
pub type R = R<ECRrs>;
Expand description

Register ECR reader

Aliased Type§

pub struct R { /* private fields */ }

Implementations§

Source§

impl R

Source

pub fn ie(&self) -> IE_R

Bit 0 - Index enable This bit indicates if the Index event resets the counter.

Source

pub fn idir(&self) -> IDIR_R

Bits 1:2 - Index direction This bit indicates in which direction the Index event resets the counter. Note: The IDR[1:0] bitfield must be written when IE bit is reset (index disabled).

Source

pub fn iblk(&self) -> IBLK_R

Bits 3:4 - Index blanking This bit indicates if the Index event is conditioned by the tim_ti3 input

Source

pub fn fidx(&self) -> FIDX_R

Bit 5 - First index This bit indicates if the first index only is taken into account

Source

pub fn ipos(&self) -> IPOS_R

Bits 6:7 - Index positioning In quadrature encoder mode (SMS[3:0] = 0001, 0010, 0011, 1110, 1111), this bit indicates in which AB input configuration the Index event resets the counter. In directional clock mode or clock plus direction mode (SMS[3:0] = 1010, 1011, 1100, 1101), these bits indicates on which level the Index event resets the counter. In bidirectional clock mode, this applies for both clock inputs. x0: Index resets the counter when clock is 0 x1: Index resets the counter when clock is 1 Note: IPOS[1] bit is not significant

Source

pub fn pw(&self) -> PW_R

Bits 16:23 - Pulse width This bitfield defines the pulse duration, as following: tPW = PW[7:0] x tPWG

Source

pub fn pwprsc(&self) -> PWPRSC_R

Bits 24:26 - Pulse width prescaler This bitfield sets the clock prescaler for the pulse generator, as following: tPWG = (2(PWPRSC[2:0])) x ttim_ker_ck

Trait Implementations§

Source§

impl Debug for R

Source§

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

Formats the value using the given formatter. Read more