esp32h2/spi0/
xts_state.rs1#[doc = "Register `XTS_STATE` reader"]
2pub type R = crate::R<XTS_STATE_SPEC>;
3#[doc = "Field `SPI_XTS_STATE` reader - This bits stores the status of manual encryption. 0: idle, 1: busy of encryption calculation, 2: encryption calculation is done but the encrypted result is invisible to mspi, 3: the encrypted result is visible to mspi."]
4pub type SPI_XTS_STATE_R = crate::FieldReader;
5impl R {
6 #[doc = "Bits 0:1 - This bits stores the status of manual encryption. 0: idle, 1: busy of encryption calculation, 2: encryption calculation is done but the encrypted result is invisible to mspi, 3: the encrypted result is visible to mspi."]
7 #[inline(always)]
8 pub fn spi_xts_state(&self) -> SPI_XTS_STATE_R {
9 SPI_XTS_STATE_R::new((self.bits & 3) as u8)
10 }
11}
12#[cfg(feature = "impl-register-debug")]
13impl core::fmt::Debug for R {
14 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
15 f.debug_struct("XTS_STATE")
16 .field("spi_xts_state", &self.spi_xts_state())
17 .finish()
18 }
19}
20#[doc = "Manual Encryption physical address register\n\nYou can [`read`](crate::Reg::read) this register and get [`xts_state::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
21pub struct XTS_STATE_SPEC;
22impl crate::RegisterSpec for XTS_STATE_SPEC {
23 type Ux = u32;
24}
25#[doc = "`read()` method returns [`xts_state::R`](R) reader structure"]
26impl crate::Readable for XTS_STATE_SPEC {}
27#[doc = "`reset()` method sets XTS_STATE to value 0"]
28impl crate::Resettable for XTS_STATE_SPEC {
29 const RESET_VALUE: u32 = 0;
30}