eos_s3/wdt/
wdogperiphid4.rs

1#[doc = "Register `WDOGPERIPHID4` reader"]
2pub struct R(crate::R<WDOGPERIPHID4_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<WDOGPERIPHID4_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<WDOGPERIPHID4_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<WDOGPERIPHID4_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `WDOGPERIPHID4` reader - Peripheral ID Register 4: \\[7:4\\]
17Block count. \\[3:0\\]
18jep106_c_code."]
19pub struct WDOGPERIPHID4_R(crate::FieldReader<u8, u8>);
20impl WDOGPERIPHID4_R {
21    #[inline(always)]
22    pub(crate) fn new(bits: u8) -> Self {
23        WDOGPERIPHID4_R(crate::FieldReader::new(bits))
24    }
25}
26impl core::ops::Deref for WDOGPERIPHID4_R {
27    type Target = crate::FieldReader<u8, u8>;
28    #[inline(always)]
29    fn deref(&self) -> &Self::Target {
30        &self.0
31    }
32}
33impl R {
34    #[doc = "Bits 0:7 - Peripheral ID Register 4: \\[7:4\\]
35Block count. \\[3:0\\]
36jep106_c_code."]
37    #[inline(always)]
38    pub fn wdogperiphid4(&self) -> WDOGPERIPHID4_R {
39        WDOGPERIPHID4_R::new((self.bits & 0xff) as u8)
40    }
41}
42#[doc = "Peripheral ID Register 4: \\[7:4\\]
43Block count. \\[3:0\\]
44jep106_c_code.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [wdogperiphid4](index.html) module"]
45pub struct WDOGPERIPHID4_SPEC;
46impl crate::RegisterSpec for WDOGPERIPHID4_SPEC {
47    type Ux = u32;
48}
49#[doc = "`read()` method returns [wdogperiphid4::R](R) reader structure"]
50impl crate::Readable for WDOGPERIPHID4_SPEC {
51    type Reader = R;
52}
53#[doc = "`reset()` method sets WDOGPERIPHID4 to value 0x04"]
54impl crate::Resettable for WDOGPERIPHID4_SPEC {
55    #[inline(always)]
56    fn reset_value() -> Self::Ux {
57        0x04
58    }
59}