corstone300_pac/isram0mpc/
int_info2.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 `INT_INFO2` reader"]
6pub struct R(crate::R<INT_INFO2_SPEC>);
7impl core::ops::Deref for R {
8    type Target = crate::R<INT_INFO2_SPEC>;
9    #[inline(always)]
10    fn deref(&self) -> &Self::Target {
11        &self.0
12    }
13}
14impl From<crate::R<INT_INFO2_SPEC>> for R {
15    #[inline(always)]
16    fn from(reader: crate::R<INT_INFO2_SPEC>) -> Self {
17        R(reader)
18    }
19}
20#[doc = "Field `hmaster` reader - hmaster"]
21pub type HMASTER_R = crate::FieldReader<u16, u16>;
22#[doc = "Field `hnonsec` reader - hnonsec"]
23pub type HNONSEC_R = crate::BitReader<bool>;
24#[doc = "Field `cfg_ns` reader - cfg_ns"]
25pub type CFG_NS_R = crate::BitReader<bool>;
26impl R {
27    #[doc = "Bits 0:15 - hmaster"]
28    #[inline(always)]
29    pub fn hmaster(&self) -> HMASTER_R {
30        HMASTER_R::new((self.bits & 0xffff) as u16)
31    }
32    #[doc = "Bit 16 - hnonsec"]
33    #[inline(always)]
34    pub fn hnonsec(&self) -> HNONSEC_R {
35        HNONSEC_R::new(((self.bits >> 16) & 1) != 0)
36    }
37    #[doc = "Bit 17 - cfg_ns"]
38    #[inline(always)]
39    pub fn cfg_ns(&self) -> CFG_NS_R {
40        CFG_NS_R::new(((self.bits >> 17) & 1) != 0)
41    }
42}
43#[doc = "Interrupt information 2\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 [int_info2](index.html) module"]
44pub struct INT_INFO2_SPEC;
45impl crate::RegisterSpec for INT_INFO2_SPEC {
46    type Ux = u32;
47}
48#[doc = "`read()` method returns [int_info2::R](R) reader structure"]
49impl crate::Readable for INT_INFO2_SPEC {
50    type Reader = R;
51}
52#[doc = "`reset()` method sets INT_INFO2 to value 0"]
53impl crate::Resettable for INT_INFO2_SPEC {
54    #[inline(always)]
55    fn reset_value() -> Self::Ux {
56        0
57    }
58}