Skip to main content

mcxa_pac/syscon/
binary_code_msb.rs

1#[doc = "Register `BINARY_CODE_MSB` reader"]
2pub type R = crate::R<BinaryCodeMsbSpec>;
3#[doc = "Field `code_bin_41_32` reader - Binary code \\[41:32\\]"]
4pub type CodeBin41_32R = crate::FieldReader<u16>;
5impl R {
6    #[doc = "Bits 0:9 - Binary code \\[41:32\\]"]
7    #[inline(always)]
8    pub fn code_bin_41_32(&self) -> CodeBin41_32R {
9        CodeBin41_32R::new((self.bits & 0x03ff) as u16)
10    }
11}
12#[cfg(feature = "debug")]
13impl core::fmt::Debug for R {
14    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
15        f.debug_struct("BINARY_CODE_MSB")
16            .field("code_bin_41_32", &self.code_bin_41_32())
17            .finish()
18    }
19}
20#[doc = "Gray to Binary Converter Binary Code \\[41:32\\]\n\nYou can [`read`](crate::Reg::read) this register and get [`binary_code_msb::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
21pub struct BinaryCodeMsbSpec;
22impl crate::RegisterSpec for BinaryCodeMsbSpec {
23    type Ux = u32;
24}
25#[doc = "`read()` method returns [`binary_code_msb::R`](R) reader structure"]
26impl crate::Readable for BinaryCodeMsbSpec {}
27#[doc = "`reset()` method sets BINARY_CODE_MSB to value 0"]
28impl crate::Resettable for BinaryCodeMsbSpec {}