esp32h2/i2c_ana_mst/
date.rs1#[doc = "Register `DATE` reader"]
2pub type R = crate::R<DATE_SPEC>;
3#[doc = "Register `DATE` writer"]
4pub type W = crate::W<DATE_SPEC>;
5#[doc = "Field `DATE` reader - Version control register"]
6pub type DATE_R = crate::FieldReader<u32>;
7#[doc = "Field `DATE` writer - Version control register"]
8pub type DATE_W<'a, REG> = crate::FieldWriter<'a, REG, 28, u32>;
9#[doc = "Field `CLK_EN` reader - ?"]
10pub type CLK_EN_R = crate::BitReader;
11#[doc = "Field `CLK_EN` writer - ?"]
12pub type CLK_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14 #[doc = "Bits 0:27 - Version control register"]
15 #[inline(always)]
16 pub fn date(&self) -> DATE_R {
17 DATE_R::new(self.bits & 0x0fff_ffff)
18 }
19 #[doc = "Bit 28 - ?"]
20 #[inline(always)]
21 pub fn clk_en(&self) -> CLK_EN_R {
22 CLK_EN_R::new(((self.bits >> 28) & 1) != 0)
23 }
24}
25#[cfg(feature = "impl-register-debug")]
26impl core::fmt::Debug for R {
27 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
28 f.debug_struct("DATE")
29 .field("date", &self.date())
30 .field("clk_en", &self.clk_en())
31 .finish()
32 }
33}
34impl W {
35 #[doc = "Bits 0:27 - Version control register"]
36 #[inline(always)]
37 pub fn date(&mut self) -> DATE_W<DATE_SPEC> {
38 DATE_W::new(self, 0)
39 }
40 #[doc = "Bit 28 - ?"]
41 #[inline(always)]
42 pub fn clk_en(&mut self) -> CLK_EN_W<DATE_SPEC> {
43 CLK_EN_W::new(self, 28)
44 }
45}
46#[doc = "DATE register\n\nYou can [`read`](crate::Reg::read) this register and get [`date::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`date::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct DATE_SPEC;
48impl crate::RegisterSpec for DATE_SPEC {
49 type Ux = u32;
50}
51#[doc = "`read()` method returns [`date::R`](R) reader structure"]
52impl crate::Readable for DATE_SPEC {}
53#[doc = "`write(|w| ..)` method takes [`date::W`](W) writer structure"]
54impl crate::Writable for DATE_SPEC {
55 type Safety = crate::Unsafe;
56 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
57 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
58}
59#[doc = "`reset()` method sets DATE to value 0x0220_1300"]
60impl crate::Resettable for DATE_SPEC {
61 const RESET_VALUE: u32 = 0x0220_1300;
62}