1#[doc = "Register `DIV_CSR` reader"]
2pub type R = crate::R<DIV_CSR_SPEC>;
3#[doc = "Field `READY` reader - Reads as 0 when a calculation is in progress, 1 otherwise.
4 Writing an operand (xDIVIDEND, xDIVISOR) will immediately start a new calculation, no
5 matter if one is already in progress.
6 Writing to a result register will immediately terminate any in-progress calculation
7 and set the READY and DIRTY flags."]
8pub type READY_R = crate::BitReader;
9#[doc = "Field `DIRTY` reader - Changes to 1 when any register is written, and back to 0 when QUOTIENT is read.
10 Software can use this flag to make save/restore more efficient (skip if not DIRTY).
11 If the flag is used in this way, it's recommended to either read QUOTIENT only,
12 or REMAINDER and then QUOTIENT, to prevent data loss on context switch."]
13pub type DIRTY_R = crate::BitReader;
14impl R {
15#[doc = "Bit 0 - Reads as 0 when a calculation is in progress, 1 otherwise.
16 Writing an operand (xDIVIDEND, xDIVISOR) will immediately start a new calculation, no
17 matter if one is already in progress.
18 Writing to a result register will immediately terminate any in-progress calculation
19 and set the READY and DIRTY flags."]
20 #[inline(always)]
21pub fn ready(&self) -> READY_R {
22 READY_R::new((self.bits & 1) != 0)
23 }
24#[doc = "Bit 1 - Changes to 1 when any register is written, and back to 0 when QUOTIENT is read.
25 Software can use this flag to make save/restore more efficient (skip if not DIRTY).
26 If the flag is used in this way, it's recommended to either read QUOTIENT only,
27 or REMAINDER and then QUOTIENT, to prevent data loss on context switch."]
28 #[inline(always)]
29pub fn dirty(&self) -> DIRTY_R {
30 DIRTY_R::new(((self.bits >> 1) & 1) != 0)
31 }
32}
33#[doc = "Control and status register for divider.
3435You can [`read`](crate::generic::Reg::read) this register and get [`div_csr::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
36pub struct DIV_CSR_SPEC;
37impl crate::RegisterSpec for DIV_CSR_SPEC {
38type Ux = u32;
39}
40#[doc = "`read()` method returns [`div_csr::R`](R) reader structure"]
41impl crate::Readable for DIV_CSR_SPEC {}
42#[doc = "`reset()` method sets DIV_CSR to value 0x01"]
43impl crate::Resettable for DIV_CSR_SPEC {
44const RESET_VALUE: u32 = 0x01;
45}