Skip to main content

mcxa_pac/syscon/
gray_code_lsb.rs

1#[doc = "Register `GRAY_CODE_LSB` reader"]
2pub type R = crate::R<GrayCodeLsbSpec>;
3#[doc = "Register `GRAY_CODE_LSB` writer"]
4pub type W = crate::W<GrayCodeLsbSpec>;
5#[doc = "Field `code_gray_31_0` reader - Gray code \\[31:0\\]"]
6pub type CodeGray31_0R = crate::FieldReader<u32>;
7#[doc = "Field `code_gray_31_0` writer - Gray code \\[31:0\\]"]
8pub type CodeGray31_0W<'a, REG> = crate::FieldWriter<'a, REG, 32, u32>;
9impl R {
10    #[doc = "Bits 0:31 - Gray code \\[31:0\\]"]
11    #[inline(always)]
12    pub fn code_gray_31_0(&self) -> CodeGray31_0R {
13        CodeGray31_0R::new(self.bits)
14    }
15}
16#[cfg(feature = "debug")]
17impl core::fmt::Debug for R {
18    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
19        f.debug_struct("GRAY_CODE_LSB")
20            .field("code_gray_31_0", &self.code_gray_31_0())
21            .finish()
22    }
23}
24impl W {
25    #[doc = "Bits 0:31 - Gray code \\[31:0\\]"]
26    #[inline(always)]
27    pub fn code_gray_31_0(&mut self) -> CodeGray31_0W<'_, GrayCodeLsbSpec> {
28        CodeGray31_0W::new(self, 0)
29    }
30}
31#[doc = "Gray to Binary Converter Gray Code \\[31:0\\]\n\nYou can [`read`](crate::Reg::read) this register and get [`gray_code_lsb::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`gray_code_lsb::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
32pub struct GrayCodeLsbSpec;
33impl crate::RegisterSpec for GrayCodeLsbSpec {
34    type Ux = u32;
35}
36#[doc = "`read()` method returns [`gray_code_lsb::R`](R) reader structure"]
37impl crate::Readable for GrayCodeLsbSpec {}
38#[doc = "`write(|w| ..)` method takes [`gray_code_lsb::W`](W) writer structure"]
39impl crate::Writable for GrayCodeLsbSpec {
40    type Safety = crate::Unsafe;
41}
42#[doc = "`reset()` method sets GRAY_CODE_LSB to value 0"]
43impl crate::Resettable for GrayCodeLsbSpec {}