nrf5340_net_pac/cti_ns/
pidr0.rs1#[doc = "Register `PIDR0` reader"]
2pub struct R(crate::R<PIDR0_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<PIDR0_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<PIDR0_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<PIDR0_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `PART_0` reader - Bits\\[7:0\\]
17of the 12-bit part number of the component. The designer of the component assigns this part number."]
18pub type PART_0_R = crate::FieldReader<u8, PART_0_A>;
19#[doc = "Bits\\[7:0\\]
20of the 12-bit part number of the component. The designer of the component assigns this part number.\n\nValue on reset: 33"]
21#[derive(Clone, Copy, Debug, PartialEq)]
22#[repr(u8)]
23pub enum PART_0_A {
24 #[doc = "33: Indicates bits\\[7:0\\]
25of the part number of the component."]
26 PARTNUMBER_L = 33,
27}
28impl From<PART_0_A> for u8 {
29 #[inline(always)]
30 fn from(variant: PART_0_A) -> Self {
31 variant as _
32 }
33}
34impl PART_0_R {
35 #[doc = "Get enumerated values variant"]
36 #[inline(always)]
37 pub fn variant(&self) -> Option<PART_0_A> {
38 match self.bits {
39 33 => Some(PART_0_A::PARTNUMBER_L),
40 _ => None,
41 }
42 }
43 #[doc = "Checks if the value of the field is `PARTNUMBER_L`"]
44 #[inline(always)]
45 pub fn is_partnumber_l(&self) -> bool {
46 *self == PART_0_A::PARTNUMBER_L
47 }
48}
49impl R {
50 #[doc = "Bits 0:7 - Bits\\[7:0\\]
51of the 12-bit part number of the component. The designer of the component assigns this part number."]
52 #[inline(always)]
53 pub fn part_0(&self) -> PART_0_R {
54 PART_0_R::new((self.bits & 0xff) as u8)
55 }
56}
57#[doc = "Peripheral ID0 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 [pidr0](index.html) module"]
58pub struct PIDR0_SPEC;
59impl crate::RegisterSpec for PIDR0_SPEC {
60 type Ux = u32;
61}
62#[doc = "`read()` method returns [pidr0::R](R) reader structure"]
63impl crate::Readable for PIDR0_SPEC {
64 type Reader = R;
65}
66#[doc = "`reset()` method sets PIDR0 to value 0x21"]
67impl crate::Resettable for PIDR0_SPEC {
68 #[inline(always)]
69 fn reset_value() -> Self::Ux {
70 0x21
71 }
72}