stm32h7_staging/common/axi/c1c5e047/
ini3_fn_mod.rs

1///Register `INI3_FN_MOD` reader
2pub type R = crate::R<INI3_FN_MODrs>;
3///Register `INI3_FN_MOD` writer
4pub type W = crate::W<INI3_FN_MODrs>;
5/**Override ASIB read issuing capability
6
7Value on reset: 0*/
8#[cfg_attr(feature = "defmt", derive(defmt::Format))]
9#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10pub enum READ_ISS_OVERRIDE {
11    ///0: Normal ASIB read issuing capability
12    Normal = 0,
13    ///1: Force ASIB read issuing capability to 1
14    Force1 = 1,
15}
16impl From<READ_ISS_OVERRIDE> for bool {
17    #[inline(always)]
18    fn from(variant: READ_ISS_OVERRIDE) -> Self {
19        variant as u8 != 0
20    }
21}
22///Field `READ_ISS_OVERRIDE` reader - Override ASIB read issuing capability
23pub type READ_ISS_OVERRIDE_R = crate::BitReader<READ_ISS_OVERRIDE>;
24impl READ_ISS_OVERRIDE_R {
25    ///Get enumerated values variant
26    #[inline(always)]
27    pub const fn variant(&self) -> READ_ISS_OVERRIDE {
28        match self.bits {
29            false => READ_ISS_OVERRIDE::Normal,
30            true => READ_ISS_OVERRIDE::Force1,
31        }
32    }
33    ///Normal ASIB read issuing capability
34    #[inline(always)]
35    pub fn is_normal(&self) -> bool {
36        *self == READ_ISS_OVERRIDE::Normal
37    }
38    ///Force ASIB read issuing capability to 1
39    #[inline(always)]
40    pub fn is_force1(&self) -> bool {
41        *self == READ_ISS_OVERRIDE::Force1
42    }
43}
44///Field `READ_ISS_OVERRIDE` writer - Override ASIB read issuing capability
45pub type READ_ISS_OVERRIDE_W<'a, REG> = crate::BitWriter<'a, REG, READ_ISS_OVERRIDE>;
46impl<'a, REG> READ_ISS_OVERRIDE_W<'a, REG>
47where
48    REG: crate::Writable + crate::RegisterSpec,
49{
50    ///Normal ASIB read issuing capability
51    #[inline(always)]
52    pub fn normal(self) -> &'a mut crate::W<REG> {
53        self.variant(READ_ISS_OVERRIDE::Normal)
54    }
55    ///Force ASIB read issuing capability to 1
56    #[inline(always)]
57    pub fn force1(self) -> &'a mut crate::W<REG> {
58        self.variant(READ_ISS_OVERRIDE::Force1)
59    }
60}
61/**Override ASIB write issuing capability
62
63Value on reset: 0*/
64#[cfg_attr(feature = "defmt", derive(defmt::Format))]
65#[derive(Clone, Copy, Debug, PartialEq, Eq)]
66pub enum WRITE_ISS_OVERRIDE {
67    ///0: Normal ASIB write issuing capability
68    Normal = 0,
69    ///1: Force ASIB write issuing capability to 1
70    Force1 = 1,
71}
72impl From<WRITE_ISS_OVERRIDE> for bool {
73    #[inline(always)]
74    fn from(variant: WRITE_ISS_OVERRIDE) -> Self {
75        variant as u8 != 0
76    }
77}
78///Field `WRITE_ISS_OVERRIDE` reader - Override ASIB write issuing capability
79pub type WRITE_ISS_OVERRIDE_R = crate::BitReader<WRITE_ISS_OVERRIDE>;
80impl WRITE_ISS_OVERRIDE_R {
81    ///Get enumerated values variant
82    #[inline(always)]
83    pub const fn variant(&self) -> WRITE_ISS_OVERRIDE {
84        match self.bits {
85            false => WRITE_ISS_OVERRIDE::Normal,
86            true => WRITE_ISS_OVERRIDE::Force1,
87        }
88    }
89    ///Normal ASIB write issuing capability
90    #[inline(always)]
91    pub fn is_normal(&self) -> bool {
92        *self == WRITE_ISS_OVERRIDE::Normal
93    }
94    ///Force ASIB write issuing capability to 1
95    #[inline(always)]
96    pub fn is_force1(&self) -> bool {
97        *self == WRITE_ISS_OVERRIDE::Force1
98    }
99}
100///Field `WRITE_ISS_OVERRIDE` writer - Override ASIB write issuing capability
101pub type WRITE_ISS_OVERRIDE_W<'a, REG> = crate::BitWriter<'a, REG, WRITE_ISS_OVERRIDE>;
102impl<'a, REG> WRITE_ISS_OVERRIDE_W<'a, REG>
103where
104    REG: crate::Writable + crate::RegisterSpec,
105{
106    ///Normal ASIB write issuing capability
107    #[inline(always)]
108    pub fn normal(self) -> &'a mut crate::W<REG> {
109        self.variant(WRITE_ISS_OVERRIDE::Normal)
110    }
111    ///Force ASIB write issuing capability to 1
112    #[inline(always)]
113    pub fn force1(self) -> &'a mut crate::W<REG> {
114        self.variant(WRITE_ISS_OVERRIDE::Force1)
115    }
116}
117impl R {
118    ///Bit 0 - Override ASIB read issuing capability
119    #[inline(always)]
120    pub fn read_iss_override(&self) -> READ_ISS_OVERRIDE_R {
121        READ_ISS_OVERRIDE_R::new((self.bits & 1) != 0)
122    }
123    ///Bit 1 - Override ASIB write issuing capability
124    #[inline(always)]
125    pub fn write_iss_override(&self) -> WRITE_ISS_OVERRIDE_R {
126        WRITE_ISS_OVERRIDE_R::new(((self.bits >> 1) & 1) != 0)
127    }
128}
129impl core::fmt::Debug for R {
130    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
131        f.debug_struct("INI3_FN_MOD")
132            .field("read_iss_override", &self.read_iss_override())
133            .field("write_iss_override", &self.write_iss_override())
134            .finish()
135    }
136}
137impl W {
138    ///Bit 0 - Override ASIB read issuing capability
139    #[inline(always)]
140    pub fn read_iss_override(&mut self) -> READ_ISS_OVERRIDE_W<INI3_FN_MODrs> {
141        READ_ISS_OVERRIDE_W::new(self, 0)
142    }
143    ///Bit 1 - Override ASIB write issuing capability
144    #[inline(always)]
145    pub fn write_iss_override(&mut self) -> WRITE_ISS_OVERRIDE_W<INI3_FN_MODrs> {
146        WRITE_ISS_OVERRIDE_W::new(self, 1)
147    }
148}
149/**AXI interconnect - INI x issuing functionality modification register
150
151You can [`read`](crate::Reg::read) this register and get [`ini3_fn_mod::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ini3_fn_mod::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).*/
152pub struct INI3_FN_MODrs;
153impl crate::RegisterSpec for INI3_FN_MODrs {
154    type Ux = u32;
155}
156///`read()` method returns [`ini3_fn_mod::R`](R) reader structure
157impl crate::Readable for INI3_FN_MODrs {}
158///`write(|w| ..)` method takes [`ini3_fn_mod::W`](W) writer structure
159impl crate::Writable for INI3_FN_MODrs {
160    type Safety = crate::Unsafe;
161    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
162    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
163}
164///`reset()` method sets INI3_FN_MOD to value 0x04
165impl crate::Resettable for INI3_FN_MODrs {
166    const RESET_VALUE: u32 = 0x04;
167}