bl602_pac/sf_ctrl/
sf_if_iahb_6.rs

1#[doc = "Register `sf_if_iahb_6` reader"]
2pub struct R(crate::R<SF_IF_IAHB_6_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SF_IF_IAHB_6_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SF_IF_IAHB_6_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SF_IF_IAHB_6_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `sf_if_iahb_6` writer"]
17pub struct W(crate::W<SF_IF_IAHB_6_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<SF_IF_IAHB_6_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<SF_IF_IAHB_6_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<SF_IF_IAHB_6_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `sf_if_3_cmd_byte` reader - "]
38pub type SF_IF_3_CMD_BYTE_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `sf_if_3_cmd_byte` writer - "]
40pub type SF_IF_3_CMD_BYTE_W<'a, const O: u8> =
41    crate::FieldWriter<'a, u32, SF_IF_IAHB_6_SPEC, u8, u8, 3, O>;
42#[doc = "Field `sf_if_3_spi_mode` reader - "]
43pub type SF_IF_3_SPI_MODE_R = crate::FieldReader<u8, u8>;
44#[doc = "Field `sf_if_3_spi_mode` writer - "]
45pub type SF_IF_3_SPI_MODE_W<'a, const O: u8> =
46    crate::FieldWriter<'a, u32, SF_IF_IAHB_6_SPEC, u8, u8, 3, O>;
47#[doc = "Field `sf_if_3_qpi_mode_en` reader - "]
48pub type SF_IF_3_QPI_MODE_EN_R = crate::BitReader<bool>;
49#[doc = "Field `sf_if_3_qpi_mode_en` writer - "]
50pub type SF_IF_3_QPI_MODE_EN_W<'a, const O: u8> =
51    crate::BitWriter<'a, u32, SF_IF_IAHB_6_SPEC, bool, O>;
52impl R {
53    #[doc = "Bits 20:22"]
54    #[inline(always)]
55    pub fn sf_if_3_cmd_byte(&self) -> SF_IF_3_CMD_BYTE_R {
56        SF_IF_3_CMD_BYTE_R::new(((self.bits >> 20) & 7) as u8)
57    }
58    #[doc = "Bits 28:30"]
59    #[inline(always)]
60    pub fn sf_if_3_spi_mode(&self) -> SF_IF_3_SPI_MODE_R {
61        SF_IF_3_SPI_MODE_R::new(((self.bits >> 28) & 7) as u8)
62    }
63    #[doc = "Bit 31"]
64    #[inline(always)]
65    pub fn sf_if_3_qpi_mode_en(&self) -> SF_IF_3_QPI_MODE_EN_R {
66        SF_IF_3_QPI_MODE_EN_R::new(((self.bits >> 31) & 1) != 0)
67    }
68}
69impl W {
70    #[doc = "Bits 20:22"]
71    #[inline(always)]
72    #[must_use]
73    pub fn sf_if_3_cmd_byte(&mut self) -> SF_IF_3_CMD_BYTE_W<20> {
74        SF_IF_3_CMD_BYTE_W::new(self)
75    }
76    #[doc = "Bits 28:30"]
77    #[inline(always)]
78    #[must_use]
79    pub fn sf_if_3_spi_mode(&mut self) -> SF_IF_3_SPI_MODE_W<28> {
80        SF_IF_3_SPI_MODE_W::new(self)
81    }
82    #[doc = "Bit 31"]
83    #[inline(always)]
84    #[must_use]
85    pub fn sf_if_3_qpi_mode_en(&mut self) -> SF_IF_3_QPI_MODE_EN_W<31> {
86        SF_IF_3_QPI_MODE_EN_W::new(self)
87    }
88    #[doc = "Writes raw bits to the register."]
89    #[inline(always)]
90    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
91        self.0.bits(bits);
92        self
93    }
94}
95#[doc = "sf_if_iahb_6.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [sf_if_iahb_6](index.html) module"]
96pub struct SF_IF_IAHB_6_SPEC;
97impl crate::RegisterSpec for SF_IF_IAHB_6_SPEC {
98    type Ux = u32;
99}
100#[doc = "`read()` method returns [sf_if_iahb_6::R](R) reader structure"]
101impl crate::Readable for SF_IF_IAHB_6_SPEC {
102    type Reader = R;
103}
104#[doc = "`write(|w| ..)` method takes [sf_if_iahb_6::W](W) writer structure"]
105impl crate::Writable for SF_IF_IAHB_6_SPEC {
106    type Writer = W;
107    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
108    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
109}
110#[doc = "`reset()` method sets sf_if_iahb_6 to value 0x8000_0000"]
111impl crate::Resettable for SF_IF_IAHB_6_SPEC {
112    const RESET_VALUE: Self::Ux = 0x8000_0000;
113}