nrf5340_app_pac/cti_s/
pidr1.rs1#[doc = "Register `PIDR1` reader"]
2pub struct R(crate::R<PIDR1_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<PIDR1_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<PIDR1_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<PIDR1_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `PART_1` reader - Bits\\[11:8\\]
17of the 12-bit part number of the component. The designer of the component assigns this part number."]
18pub type PART_1_R = crate::FieldReader<u8, PART_1_A>;
19#[doc = "Bits\\[11:8\\]
20of the 12-bit part number of the component. The designer of the component assigns this part number.\n\nValue on reset: 13"]
21#[derive(Clone, Copy, Debug, PartialEq)]
22#[repr(u8)]
23pub enum PART_1_A {
24 #[doc = "13: Indicates bits\\[11:8\\]
25of the part number of the component."]
26 PARTNUMBER_H = 13,
27}
28impl From<PART_1_A> for u8 {
29 #[inline(always)]
30 fn from(variant: PART_1_A) -> Self {
31 variant as _
32 }
33}
34impl PART_1_R {
35 #[doc = "Get enumerated values variant"]
36 #[inline(always)]
37 pub fn variant(&self) -> Option<PART_1_A> {
38 match self.bits {
39 13 => Some(PART_1_A::PARTNUMBER_H),
40 _ => None,
41 }
42 }
43 #[doc = "Checks if the value of the field is `PARTNUMBER_H`"]
44 #[inline(always)]
45 pub fn is_partnumber_h(&self) -> bool {
46 *self == PART_1_A::PARTNUMBER_H
47 }
48}
49#[doc = "Field `DES_0` reader - Together, PIDR1.DES_0, PIDR2.DES_1, and PIDR4.DES_2 identify the designer of the component."]
50pub type DES_0_R = crate::FieldReader<u8, DES_0_A>;
51#[doc = "Together, PIDR1.DES_0, PIDR2.DES_1, and PIDR4.DES_2 identify the designer of the component.\n\nValue on reset: 11"]
52#[derive(Clone, Copy, Debug, PartialEq)]
53#[repr(u8)]
54pub enum DES_0_A {
55 #[doc = "11: Arm. Bits\\[3:0\\]
56of the JEDEC JEP106 Identity Code"]
57 ARM = 11,
58}
59impl From<DES_0_A> for u8 {
60 #[inline(always)]
61 fn from(variant: DES_0_A) -> Self {
62 variant as _
63 }
64}
65impl DES_0_R {
66 #[doc = "Get enumerated values variant"]
67 #[inline(always)]
68 pub fn variant(&self) -> Option<DES_0_A> {
69 match self.bits {
70 11 => Some(DES_0_A::ARM),
71 _ => None,
72 }
73 }
74 #[doc = "Checks if the value of the field is `ARM`"]
75 #[inline(always)]
76 pub fn is_arm(&self) -> bool {
77 *self == DES_0_A::ARM
78 }
79}
80impl R {
81 #[doc = "Bits 0:3 - Bits\\[11:8\\]
82of the 12-bit part number of the component. The designer of the component assigns this part number."]
83 #[inline(always)]
84 pub fn part_1(&self) -> PART_1_R {
85 PART_1_R::new((self.bits & 0x0f) as u8)
86 }
87 #[doc = "Bits 4:7 - Together, PIDR1.DES_0, PIDR2.DES_1, and PIDR4.DES_2 identify the designer of the component."]
88 #[inline(always)]
89 pub fn des_0(&self) -> DES_0_R {
90 DES_0_R::new(((self.bits >> 4) & 0x0f) as u8)
91 }
92}
93#[doc = "Peripheral ID1 Register\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 [pidr1](index.html) module"]
94pub struct PIDR1_SPEC;
95impl crate::RegisterSpec for PIDR1_SPEC {
96 type Ux = u32;
97}
98#[doc = "`read()` method returns [pidr1::R](R) reader structure"]
99impl crate::Readable for PIDR1_SPEC {
100 type Reader = R;
101}
102#[doc = "`reset()` method sets PIDR1 to value 0xbd"]
103impl crate::Resettable for PIDR1_SPEC {
104 #[inline(always)]
105 fn reset_value() -> Self::Ux {
106 0xbd
107 }
108}