esp32c6/slchost/
pkt_len.rs

1#[doc = "Register `PKT_LEN` reader"]
2pub type R = crate::R<PKT_LEN_SPEC>;
3#[doc = "Field `HOSTSLCHOST_SLC0_LEN` reader - *******Description***********"]
4pub type HOSTSLCHOST_SLC0_LEN_R = crate::FieldReader<u32>;
5#[doc = "Field `HOSTSLCHOST_SLC0_LEN_CHECK` reader - *******Description***********"]
6pub type HOSTSLCHOST_SLC0_LEN_CHECK_R = crate::FieldReader<u16>;
7impl R {
8    #[doc = "Bits 0:19 - *******Description***********"]
9    #[inline(always)]
10    pub fn hostslchost_slc0_len(&self) -> HOSTSLCHOST_SLC0_LEN_R {
11        HOSTSLCHOST_SLC0_LEN_R::new(self.bits & 0x000f_ffff)
12    }
13    #[doc = "Bits 20:31 - *******Description***********"]
14    #[inline(always)]
15    pub fn hostslchost_slc0_len_check(&self) -> HOSTSLCHOST_SLC0_LEN_CHECK_R {
16        HOSTSLCHOST_SLC0_LEN_CHECK_R::new(((self.bits >> 20) & 0x0fff) as u16)
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("PKT_LEN")
23            .field("hostslchost_slc0_len", &self.hostslchost_slc0_len())
24            .field(
25                "hostslchost_slc0_len_check",
26                &self.hostslchost_slc0_len_check(),
27            )
28            .finish()
29    }
30}
31#[doc = "*******Description***********\n\nYou can [`read`](crate::Reg::read) this register and get [`pkt_len::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
32pub struct PKT_LEN_SPEC;
33impl crate::RegisterSpec for PKT_LEN_SPEC {
34    type Ux = u32;
35}
36#[doc = "`read()` method returns [`pkt_len::R`](R) reader structure"]
37impl crate::Readable for PKT_LEN_SPEC {}
38#[doc = "`reset()` method sets PKT_LEN to value 0"]
39impl crate::Resettable for PKT_LEN_SPEC {
40    const RESET_VALUE: u32 = 0;
41}