esp32s2/crypto_dma/
state0.rs

1#[doc = "Register `STATE0` reader"]
2pub type R = crate::R<STATE0_SPEC>;
3#[doc = "Field `INLINK_DSCR_ADDR` reader - This register stores the current receive descriptor’s address."]
4pub type INLINK_DSCR_ADDR_R = crate::FieldReader<u32>;
5#[doc = "Field `IN_DSCR_STATE` reader - Reserved"]
6pub type IN_DSCR_STATE_R = crate::FieldReader;
7#[doc = "Field `IN_STATE` reader - Reserved"]
8pub type IN_STATE_R = crate::FieldReader;
9#[doc = "Field `INFIFO_CNT_DEBUG` reader - This register stores the byte number of the data in the receive descriptor’s FIFO."]
10pub type INFIFO_CNT_DEBUG_R = crate::FieldReader;
11impl R {
12    #[doc = "Bits 0:17 - This register stores the current receive descriptor’s address."]
13    #[inline(always)]
14    pub fn inlink_dscr_addr(&self) -> INLINK_DSCR_ADDR_R {
15        INLINK_DSCR_ADDR_R::new(self.bits & 0x0003_ffff)
16    }
17    #[doc = "Bits 18:19 - Reserved"]
18    #[inline(always)]
19    pub fn in_dscr_state(&self) -> IN_DSCR_STATE_R {
20        IN_DSCR_STATE_R::new(((self.bits >> 18) & 3) as u8)
21    }
22    #[doc = "Bits 20:22 - Reserved"]
23    #[inline(always)]
24    pub fn in_state(&self) -> IN_STATE_R {
25        IN_STATE_R::new(((self.bits >> 20) & 7) as u8)
26    }
27    #[doc = "Bits 23:26 - This register stores the byte number of the data in the receive descriptor’s FIFO."]
28    #[inline(always)]
29    pub fn infifo_cnt_debug(&self) -> INFIFO_CNT_DEBUG_R {
30        INFIFO_CNT_DEBUG_R::new(((self.bits >> 23) & 0x0f) as u8)
31    }
32}
33#[cfg(feature = "impl-register-debug")]
34impl core::fmt::Debug for R {
35    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
36        f.debug_struct("STATE0")
37            .field("inlink_dscr_addr", &self.inlink_dscr_addr())
38            .field("in_dscr_state", &self.in_dscr_state())
39            .field("in_state", &self.in_state())
40            .field("infifo_cnt_debug", &self.infifo_cnt_debug())
41            .finish()
42    }
43}
44#[doc = "Status register of receiving data\n\nYou can [`read`](crate::Reg::read) this register and get [`state0::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
45pub struct STATE0_SPEC;
46impl crate::RegisterSpec for STATE0_SPEC {
47    type Ux = u32;
48}
49#[doc = "`read()` method returns [`state0::R`](R) reader structure"]
50impl crate::Readable for STATE0_SPEC {}
51#[doc = "`reset()` method sets STATE0 to value 0"]
52impl crate::Resettable for STATE0_SPEC {
53    const RESET_VALUE: u32 = 0;
54}