pub struct Div(pub *mut u8);
Tuple Fields§
§0: *mut u8
Implementations§
Source§impl Div
impl Div
Sourcepub fn udividend(self) -> Reg<u32, RW>
pub 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 fn udivisor(self) -> Reg<u32, RW>
pub 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 fn sdividend(self) -> Reg<u32, RW>
pub fn sdividend(self) -> Reg<u32, RW>
Divider signed dividend The same as UDIVIDEND, but starts a signed calculation, rather than unsigned.
Sourcepub fn sdivisor(self) -> Reg<u32, RW>
pub fn sdivisor(self) -> Reg<u32, RW>
Divider signed divisor The same as UDIVISOR, but starts a signed calculation, rather than unsigned.
Sourcepub fn quotient(self) -> Reg<u32, RW>
pub 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 fn remainder(self) -> Reg<u32, RW>
pub 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.