Struct rp2040_pac2::sio::Div[][src]

pub struct Div(pub *mut u8);

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]

impl Copy for Div[src]

impl Send for Div[src]

impl Sync for Div[src]

Auto Trait Implementations

impl Unpin for Div

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.