esp32s3/apb_ctrl/
spi_mem_pms_ctrl.rs

1#[doc = "Register `SPI_MEM_PMS_CTRL` reader"]
2pub type R = crate::R<SPI_MEM_PMS_CTRL_SPEC>;
3#[doc = "Register `SPI_MEM_PMS_CTRL` writer"]
4pub type W = crate::W<SPI_MEM_PMS_CTRL_SPEC>;
5#[doc = "Field `SPI_MEM_REJECT_INT` reader - ******* Description ***********"]
6pub type SPI_MEM_REJECT_INT_R = crate::BitReader;
7#[doc = "Field `SPI_MEM_REJECT_CLR` writer - ******* Description ***********"]
8pub type SPI_MEM_REJECT_CLR_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `SPI_MEM_REJECT_CDE` reader - ******* Description ***********"]
10pub type SPI_MEM_REJECT_CDE_R = crate::FieldReader;
11impl R {
12    #[doc = "Bit 0 - ******* Description ***********"]
13    #[inline(always)]
14    pub fn spi_mem_reject_int(&self) -> SPI_MEM_REJECT_INT_R {
15        SPI_MEM_REJECT_INT_R::new((self.bits & 1) != 0)
16    }
17    #[doc = "Bits 2:6 - ******* Description ***********"]
18    #[inline(always)]
19    pub fn spi_mem_reject_cde(&self) -> SPI_MEM_REJECT_CDE_R {
20        SPI_MEM_REJECT_CDE_R::new(((self.bits >> 2) & 0x1f) as u8)
21    }
22}
23#[cfg(feature = "impl-register-debug")]
24impl core::fmt::Debug for R {
25    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
26        f.debug_struct("SPI_MEM_PMS_CTRL")
27            .field("spi_mem_reject_int", &self.spi_mem_reject_int())
28            .field("spi_mem_reject_cde", &self.spi_mem_reject_cde())
29            .finish()
30    }
31}
32impl W {
33    #[doc = "Bit 1 - ******* Description ***********"]
34    #[inline(always)]
35    pub fn spi_mem_reject_clr(&mut self) -> SPI_MEM_REJECT_CLR_W<SPI_MEM_PMS_CTRL_SPEC> {
36        SPI_MEM_REJECT_CLR_W::new(self, 1)
37    }
38}
39#[doc = "******* Description ***********\n\nYou can [`read`](crate::Reg::read) this register and get [`spi_mem_pms_ctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`spi_mem_pms_ctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct SPI_MEM_PMS_CTRL_SPEC;
41impl crate::RegisterSpec for SPI_MEM_PMS_CTRL_SPEC {
42    type Ux = u32;
43}
44#[doc = "`read()` method returns [`spi_mem_pms_ctrl::R`](R) reader structure"]
45impl crate::Readable for SPI_MEM_PMS_CTRL_SPEC {}
46#[doc = "`write(|w| ..)` method takes [`spi_mem_pms_ctrl::W`](W) writer structure"]
47impl crate::Writable for SPI_MEM_PMS_CTRL_SPEC {
48    type Safety = crate::Unsafe;
49    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
50    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
51}
52#[doc = "`reset()` method sets SPI_MEM_PMS_CTRL to value 0"]
53impl crate::Resettable for SPI_MEM_PMS_CTRL_SPEC {
54    const RESET_VALUE: u32 = 0;
55}