#[repr(transparent)]pub struct DivCsr(pub u32);
Expand description
Control and status register for divider.
Tuple Fields§
§0: u32
Implementations§
Source§impl DivCsr
impl DivCsr
Sourcepub const fn ready(&self) -> bool
pub const fn ready(&self) -> bool
Reads as 0 when a calculation is in progress, 1 otherwise. Writing an operand (xDIVIDEND, xDIVISOR) will immediately start a new calculation, no matter if one is already in progress. Writing to a result register will immediately terminate any in-progress calculation and set the READY and DIRTY flags.
Sourcepub fn set_ready(&mut self, val: bool)
pub fn set_ready(&mut self, val: bool)
Reads as 0 when a calculation is in progress, 1 otherwise. Writing an operand (xDIVIDEND, xDIVISOR) will immediately start a new calculation, no matter if one is already in progress. Writing to a result register will immediately terminate any in-progress calculation and set the READY and DIRTY flags.
Sourcepub const fn dirty(&self) -> bool
pub const fn dirty(&self) -> bool
Changes to 1 when any register is written, and back to 0 when QUOTIENT is read. Software can use this flag to make save/restore more efficient (skip if not DIRTY). If the flag is used in this way, it’s recommended to either read QUOTIENT only, or REMAINDER and then QUOTIENT, to prevent data loss on context switch.
Sourcepub fn set_dirty(&mut self, val: bool)
pub fn set_dirty(&mut self, val: bool)
Changes to 1 when any register is written, and back to 0 when QUOTIENT is read. Software can use this flag to make save/restore more efficient (skip if not DIRTY). If the flag is used in this way, it’s recommended to either read QUOTIENT only, or REMAINDER and then QUOTIENT, to prevent data loss on context switch.