esp32p4/spi0/
rd_status.rs

1#[doc = "Register `RD_STATUS` reader"]
2pub type R = crate::R<RD_STATUS_SPEC>;
3#[doc = "Register `RD_STATUS` writer"]
4pub type W = crate::W<RD_STATUS_SPEC>;
5#[doc = "Field `WB_MODE` reader - Mode bits in the flash fast read mode it is combined with spi_mem_fastrd_mode bit."]
6pub type WB_MODE_R = crate::FieldReader;
7#[doc = "Field `WB_MODE` writer - Mode bits in the flash fast read mode it is combined with spi_mem_fastrd_mode bit."]
8pub type WB_MODE_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9impl R {
10    #[doc = "Bits 16:23 - Mode bits in the flash fast read mode it is combined with spi_mem_fastrd_mode bit."]
11    #[inline(always)]
12    pub fn wb_mode(&self) -> WB_MODE_R {
13        WB_MODE_R::new(((self.bits >> 16) & 0xff) as u8)
14    }
15}
16#[cfg(feature = "impl-register-debug")]
17impl core::fmt::Debug for R {
18    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
19        f.debug_struct("RD_STATUS")
20            .field("wb_mode", &format_args!("{}", self.wb_mode().bits()))
21            .finish()
22    }
23}
24#[cfg(feature = "impl-register-debug")]
25impl core::fmt::Debug for crate::generic::Reg<RD_STATUS_SPEC> {
26    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
27        core::fmt::Debug::fmt(&self.read(), f)
28    }
29}
30impl W {
31    #[doc = "Bits 16:23 - Mode bits in the flash fast read mode it is combined with spi_mem_fastrd_mode bit."]
32    #[inline(always)]
33    #[must_use]
34    pub fn wb_mode(&mut self) -> WB_MODE_W<RD_STATUS_SPEC> {
35        WB_MODE_W::new(self, 16)
36    }
37}
38#[doc = "SPI0 read control register.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`rd_status::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`rd_status::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
39pub struct RD_STATUS_SPEC;
40impl crate::RegisterSpec for RD_STATUS_SPEC {
41    type Ux = u32;
42}
43#[doc = "`read()` method returns [`rd_status::R`](R) reader structure"]
44impl crate::Readable for RD_STATUS_SPEC {}
45#[doc = "`write(|w| ..)` method takes [`rd_status::W`](W) writer structure"]
46impl crate::Writable for RD_STATUS_SPEC {
47    type Safety = crate::Unsafe;
48    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
49    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
50}
51#[doc = "`reset()` method sets RD_STATUS to value 0"]
52impl crate::Resettable for RD_STATUS_SPEC {
53    const RESET_VALUE: u32 = 0;
54}