stm32h5/stm32h573/hash/csr2.rs
1///Register `CSR2` reader
2pub type R = crate::R<CSR2rs>;
3///Register `CSR2` writer
4pub type W = crate::W<CSR2rs>;
5///Field `CSx` reader - Context swap 2 Refer to introduction.
6pub type CSX_R = crate::FieldReader<u32>;
7///Field `CSx` writer - Context swap 2 Refer to introduction.
8pub type CSX_W<'a, REG> = crate::FieldWriter<'a, REG, 32, u32>;
9impl R {
10 ///Bits 0:31 - Context swap 2 Refer to introduction.
11 #[inline(always)]
12 pub fn csx(&self) -> CSX_R {
13 CSX_R::new(self.bits)
14 }
15}
16impl core::fmt::Debug for R {
17 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
18 f.debug_struct("CSR2").field("csx", &self.csx()).finish()
19 }
20}
21impl W {
22 ///Bits 0:31 - Context swap 2 Refer to introduction.
23 #[inline(always)]
24 pub fn csx(&mut self) -> CSX_W<CSR2rs> {
25 CSX_W::new(self, 0)
26 }
27}
28/**HASH context swap register 2
29
30You can [`read`](crate::Reg::read) this register and get [`csr2::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`csr2::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
31
32See register [structure](https://stm32-rs.github.io/stm32-rs/STM32H573.html#HASH:CSR2)*/
33pub struct CSR2rs;
34impl crate::RegisterSpec for CSR2rs {
35 type Ux = u32;
36}
37///`read()` method returns [`csr2::R`](R) reader structure
38impl crate::Readable for CSR2rs {}
39///`write(|w| ..)` method takes [`csr2::W`](W) writer structure
40impl crate::Writable for CSR2rs {
41 type Safety = crate::Unsafe;
42}
43///`reset()` method sets CSR2 to value 0x0022_0002
44impl crate::Resettable for CSR2rs {
45 const RESET_VALUE: u32 = 0x0022_0002;
46}