corstone300_pac/scc/
aid.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 `AID` reader"]
6pub struct R(crate::R<AID_SPEC>);
7impl core::ops::Deref for R {
8    type Target = crate::R<AID_SPEC>;
9    #[inline(always)]
10    fn deref(&self) -> &Self::Target {
11        &self.0
12    }
13}
14impl From<crate::R<AID_SPEC>> for R {
15    #[inline(always)]
16    fn from(reader: crate::R<AID_SPEC>) -> Self {
17        R(reader)
18    }
19}
20#[doc = "Field `NUM_CFG_REG` reader - Number of SCC configuration register"]
21pub type NUM_CFG_REG_R = crate::FieldReader<u8, u8>;
22#[doc = "Field `MPS3_REV` reader - V2M-MPS3 target Board Revision (A=0,B=1,C=2)"]
23pub type MPS3_REV_R = crate::FieldReader<u8, u8>;
24#[doc = "Field `FPGA_BUILD` reader - FPGA Build Number"]
25pub type FPGA_BUILD_R = crate::FieldReader<u8, u8>;
26impl R {
27    #[doc = "Bits 0:7 - Number of SCC configuration register"]
28    #[inline(always)]
29    pub fn num_cfg_reg(&self) -> NUM_CFG_REG_R {
30        NUM_CFG_REG_R::new((self.bits & 0xff) as u8)
31    }
32    #[doc = "Bits 20:23 - V2M-MPS3 target Board Revision (A=0,B=1,C=2)"]
33    #[inline(always)]
34    pub fn mps3_rev(&self) -> MPS3_REV_R {
35        MPS3_REV_R::new(((self.bits >> 20) & 0x0f) as u8)
36    }
37    #[doc = "Bits 24:31 - FPGA Build Number"]
38    #[inline(always)]
39    pub fn fpga_build(&self) -> FPGA_BUILD_R {
40        FPGA_BUILD_R::new(((self.bits >> 24) & 0xff) as u8)
41    }
42}
43#[doc = "\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 [aid](index.html) module"]
44pub struct AID_SPEC;
45impl crate::RegisterSpec for AID_SPEC {
46    type Ux = u32;
47}
48#[doc = "`read()` method returns [aid::R](R) reader structure"]
49impl crate::Readable for AID_SPEC {
50    type Reader = R;
51}
52#[doc = "`reset()` method sets AID to value 0"]
53impl crate::Resettable for AID_SPEC {
54    #[inline(always)]
55    fn reset_value() -> Self::Ux {
56        0
57    }
58}