#[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.
Trait Implementations§
impl Copy for DivCsr
impl Eq for DivCsr
impl StructuralPartialEq for DivCsr
Auto Trait Implementations§
impl Freeze for DivCsr
impl RefUnwindSafe for DivCsr
impl Send for DivCsr
impl Sync for DivCsr
impl Unpin for DivCsr
impl UnwindSafe for DivCsr
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)