corstone300_pac/isram0mpc/
pidr3.rs

1// Copyright 2022 Arm Limited and/or its affiliates <open-source-office@arm.com>
2//
3// SPDX-License-Identifier: MIT
4
5#[doc = "Register `PIDR3` reader"]
6pub struct R(crate::R<PIDR3_SPEC>);
7impl core::ops::Deref for R {
8    type Target = crate::R<PIDR3_SPEC>;
9    #[inline(always)]
10    fn deref(&self) -> &Self::Target {
11        &self.0
12    }
13}
14impl From<crate::R<PIDR3_SPEC>> for R {
15    #[inline(always)]
16    fn from(reader: crate::R<PIDR3_SPEC>) -> Self {
17        R(reader)
18    }
19}
20#[doc = "Field `customer_mod_number` reader - Customer modification number"]
21pub type CUSTOMER_MOD_NUMBER_R = crate::FieldReader<u8, u8>;
22#[doc = "Field `evo_rev` reader - ECO revision number"]
23pub type EVO_REV_R = crate::FieldReader<u8, u8>;
24impl R {
25    #[doc = "Bits 0:3 - Customer modification number"]
26    #[inline(always)]
27    pub fn customer_mod_number(&self) -> CUSTOMER_MOD_NUMBER_R {
28        CUSTOMER_MOD_NUMBER_R::new((self.bits & 0x0f) as u8)
29    }
30    #[doc = "Bits 4:7 - ECO revision number"]
31    #[inline(always)]
32    pub fn evo_rev(&self) -> EVO_REV_R {
33        EVO_REV_R::new(((self.bits >> 4) & 0x0f) as u8)
34    }
35}
36#[doc = "Peripheral ID 3\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 [pidr3](index.html) module"]
37pub struct PIDR3_SPEC;
38impl crate::RegisterSpec for PIDR3_SPEC {
39    type Ux = u32;
40}
41#[doc = "`read()` method returns [pidr3::R](R) reader structure"]
42impl crate::Readable for PIDR3_SPEC {
43    type Reader = R;
44}
45#[doc = "`reset()` method sets PIDR3 to value 0"]
46impl crate::Resettable for PIDR3_SPEC {
47    #[inline(always)]
48    fn reset_value() -> Self::Ux {
49        0
50    }
51}