pub struct Div { /* private fields */ }
Implementations§
source§impl Div
impl Div
pub const unsafe fn from_ptr(ptr: *mut ()) -> Self
pub const fn as_ptr(&self) -> *mut ()
sourcepub const fn udividend(self) -> Reg<u32, RW>
pub const fn udividend(self) -> Reg<u32, RW>
Divider unsigned dividend Write to the DIVIDEND operand of the divider, i.e. the p in p / q
. Any operand write starts a new calculation. The results appear in QUOTIENT, REMAINDER. UDIVIDEND/SDIVIDEND are aliases of the same internal register. The U alias starts an unsigned calculation, and the S alias starts a signed calculation.
sourcepub const fn udivisor(self) -> Reg<u32, RW>
pub const fn udivisor(self) -> Reg<u32, RW>
Divider unsigned divisor Write to the DIVISOR operand of the divider, i.e. the q in p / q
. Any operand write starts a new calculation. The results appear in QUOTIENT, REMAINDER. UDIVISOR/SDIVISOR are aliases of the same internal register. The U alias starts an unsigned calculation, and the S alias starts a signed calculation.
sourcepub const fn sdividend(self) -> Reg<u32, RW>
pub const fn sdividend(self) -> Reg<u32, RW>
Divider signed dividend The same as UDIVIDEND, but starts a signed calculation, rather than unsigned.
sourcepub const fn sdivisor(self) -> Reg<u32, RW>
pub const fn sdivisor(self) -> Reg<u32, RW>
Divider signed divisor The same as UDIVISOR, but starts a signed calculation, rather than unsigned.
sourcepub const fn quotient(self) -> Reg<u32, RW>
pub const fn quotient(self) -> Reg<u32, RW>
Divider result quotient The result of DIVIDEND / DIVISOR
(division). Contents undefined while CSR_READY is low. For signed calculations, QUOTIENT is negative when the signs of DIVIDEND and DIVISOR differ. This register can be written to directly, for context save/restore purposes. This halts any in-progress calculation and sets the CSR_READY and CSR_DIRTY flags. Reading from QUOTIENT clears the CSR_DIRTY flag, so should read results in the order REMAINDER, QUOTIENT if CSR_DIRTY is used.
sourcepub const fn remainder(self) -> Reg<u32, RW>
pub const fn remainder(self) -> Reg<u32, RW>
Divider result remainder The result of DIVIDEND % DIVISOR
(modulo). Contents undefined while CSR_READY is low. For signed calculations, REMAINDER is negative only when DIVIDEND is negative. This register can be written to directly, for context save/restore purposes. This halts any in-progress calculation and sets the CSR_READY and CSR_DIRTY flags.
Trait Implementations§
impl Copy for Div
impl Eq for Div
impl Send for Div
impl StructuralPartialEq for Div
impl Sync for Div
Auto Trait Implementations§
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
)