esp32h2/uhci0/
state0.rs

1#[doc = "Register `STATE0` reader"]
2pub type R = crate::R<STATE0_SPEC>;
3#[doc = "Field `RX_ERR_CAUSE` reader - a"]
4pub type RX_ERR_CAUSE_R = crate::FieldReader;
5#[doc = "Field `DECODE_STATE` reader - a"]
6pub type DECODE_STATE_R = crate::FieldReader;
7impl R {
8    #[doc = "Bits 0:2 - a"]
9    #[inline(always)]
10    pub fn rx_err_cause(&self) -> RX_ERR_CAUSE_R {
11        RX_ERR_CAUSE_R::new((self.bits & 7) as u8)
12    }
13    #[doc = "Bits 3:5 - a"]
14    #[inline(always)]
15    pub fn decode_state(&self) -> DECODE_STATE_R {
16        DECODE_STATE_R::new(((self.bits >> 3) & 7) as u8)
17    }
18}
19#[cfg(feature = "impl-register-debug")]
20impl core::fmt::Debug for R {
21    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
22        f.debug_struct("STATE0")
23            .field("rx_err_cause", &self.rx_err_cause())
24            .field("decode_state", &self.decode_state())
25            .finish()
26    }
27}
28#[doc = "a\n\nYou can [`read`](crate::Reg::read) this register and get [`state0::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
29pub struct STATE0_SPEC;
30impl crate::RegisterSpec for STATE0_SPEC {
31    type Ux = u32;
32}
33#[doc = "`read()` method returns [`state0::R`](R) reader structure"]
34impl crate::Readable for STATE0_SPEC {}
35#[doc = "`reset()` method sets STATE0 to value 0"]
36impl crate::Resettable for STATE0_SPEC {
37    const RESET_VALUE: u32 = 0;
38}