Struct rp2040_pac2::sio::Div [−][src]
Implementations
impl Div
[src]
pub fn udividend(self) -> Reg<u32, RW>
[src]
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.
pub fn udivisor(self) -> Reg<u32, RW>
[src]
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. UDIVIDEND/SDIVIDEND are aliases of the same internal register. The U alias starts an unsigned calculation, and the S alias starts a signed calculation.
pub fn sdividend(self) -> Reg<u32, RW>
[src]
Divider signed dividend The same as UDIVIDEND, but starts a signed calculation, rather than unsigned.
pub fn sdivisor(self) -> Reg<u32, RW>
[src]
Divider signed divisor The same as UDIVISOR, but starts a signed calculation, rather than unsigned.
pub fn quotient(self) -> Reg<u32, RW>
[src]
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.
pub fn remainder(self) -> Reg<u32, RW>
[src]
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.
pub fn csr(self) -> Reg<DivCsr, RW>
[src]
Control and status register for divider.
Trait Implementations
impl Clone for Div
[src]
fn clone(&self) -> Div
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Div
[src]
impl Send for Div
[src]
impl Sync for Div
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,