esp32s2/crypto_dma/
state1.rs

1#[doc = "Register `STATE1` reader"]
2pub type R = crate::R<STATE1_SPEC>;
3#[doc = "Field `OUTLINK_DSCR_ADDR` reader - This register stores the current transmit descriptor’s address."]
4pub type OUTLINK_DSCR_ADDR_R = crate::FieldReader<u32>;
5#[doc = "Field `OUT_DSCR_STATE` reader - Reserved"]
6pub type OUT_DSCR_STATE_R = crate::FieldReader;
7#[doc = "Field `OUT_STATE` reader - Reserved"]
8pub type OUT_STATE_R = crate::FieldReader;
9#[doc = "Field `OUTFIFO_CNT_DEBUG` reader - This register stores the byte number of the data in the transmit descriptor’s FIFO."]
10pub type OUTFIFO_CNT_DEBUG_R = crate::FieldReader;
11impl R {
12    #[doc = "Bits 0:17 - This register stores the current transmit descriptor’s address."]
13    #[inline(always)]
14    pub fn outlink_dscr_addr(&self) -> OUTLINK_DSCR_ADDR_R {
15        OUTLINK_DSCR_ADDR_R::new(self.bits & 0x0003_ffff)
16    }
17    #[doc = "Bits 18:19 - Reserved"]
18    #[inline(always)]
19    pub fn out_dscr_state(&self) -> OUT_DSCR_STATE_R {
20        OUT_DSCR_STATE_R::new(((self.bits >> 18) & 3) as u8)
21    }
22    #[doc = "Bits 20:22 - Reserved"]
23    #[inline(always)]
24    pub fn out_state(&self) -> OUT_STATE_R {
25        OUT_STATE_R::new(((self.bits >> 20) & 7) as u8)
26    }
27    #[doc = "Bits 23:27 - This register stores the byte number of the data in the transmit descriptor’s FIFO."]
28    #[inline(always)]
29    pub fn outfifo_cnt_debug(&self) -> OUTFIFO_CNT_DEBUG_R {
30        OUTFIFO_CNT_DEBUG_R::new(((self.bits >> 23) & 0x1f) 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("STATE1")
37            .field("outlink_dscr_addr", &self.outlink_dscr_addr())
38            .field("out_dscr_state", &self.out_dscr_state())
39            .field("out_state", &self.out_state())
40            .field("outfifo_cnt_debug", &self.outfifo_cnt_debug())
41            .finish()
42    }
43}
44#[doc = "Status register of transmitting data\n\nYou can [`read`](crate::Reg::read) this register and get [`state1::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
45pub struct STATE1_SPEC;
46impl crate::RegisterSpec for STATE1_SPEC {
47    type Ux = u32;
48}
49#[doc = "`read()` method returns [`state1::R`](R) reader structure"]
50impl crate::Readable for STATE1_SPEC {}
51#[doc = "`reset()` method sets STATE1 to value 0"]
52impl crate::Resettable for STATE1_SPEC {}