corstone300_pac/ethernet/
id_rev.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 `ID_REV` reader"]
6pub struct R(crate::R<ID_REV_SPEC>);
7impl core::ops::Deref for R {
8    type Target = crate::R<ID_REV_SPEC>;
9    #[inline(always)]
10    fn deref(&self) -> &Self::Target {
11        &self.0
12    }
13}
14impl From<crate::R<ID_REV_SPEC>> for R {
15    #[inline(always)]
16    fn from(reader: crate::R<ID_REV_SPEC>) -> Self {
17        R(reader)
18    }
19}
20#[doc = "Field `REV` reader - "]
21pub type REV_R = crate::FieldReader<u16, u16>;
22#[doc = "Field `ID` reader - "]
23pub type ID_R = crate::FieldReader<u16, u16>;
24impl R {
25    #[doc = "Bits 0:15"]
26    #[inline(always)]
27    pub fn rev(&self) -> REV_R {
28        REV_R::new((self.bits & 0xffff) as u16)
29    }
30    #[doc = "Bits 16:31"]
31    #[inline(always)]
32    pub fn id(&self) -> ID_R {
33        ID_R::new(((self.bits >> 16) & 0xffff) as u16)
34    }
35}
36#[doc = "ID and Revision\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 [id_rev](index.html) module"]
37pub struct ID_REV_SPEC;
38impl crate::RegisterSpec for ID_REV_SPEC {
39    type Ux = u32;
40}
41#[doc = "`read()` method returns [id_rev::R](R) reader structure"]
42impl crate::Readable for ID_REV_SPEC {
43    type Reader = R;
44}
45#[doc = "`reset()` method sets ID_REV to value 0x9220_0000"]
46impl crate::Resettable for ID_REV_SPEC {
47    #[inline(always)]
48    fn reset_value() -> Self::Ux {
49        0x9220_0000
50    }
51}