stm32mp1/stm32mp157/bsec/scratch.rs
1///Register `SCRATCH` reader
2pub type R = crate::R<SCRATCHrs>;
3///Register `SCRATCH` writer
4pub type W = crate::W<SCRATCHrs>;
5///Field `DATA` reader - DATA
6pub type DATA_R = crate::FieldReader<u32>;
7///Field `DATA` writer - DATA
8pub type DATA_W<'a, REG> = crate::FieldWriter<'a, REG, 32, u32>;
9impl R {
10 ///Bits 0:31 - DATA
11 #[inline(always)]
12 pub fn data(&self) -> DATA_R {
13 DATA_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("SCRATCH")
19 .field("data", &self.data())
20 .finish()
21 }
22}
23impl W {
24 ///Bits 0:31 - DATA
25 #[inline(always)]
26 pub fn data(&mut self) -> DATA_W<SCRATCHrs> {
27 DATA_W::new(self, 0)
28 }
29}
30/**BSEC scratch register
31
32You can [`read`](crate::Reg::read) this register and get [`scratch::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`scratch::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
33
34See register [structure](https://stm32-rs.github.io/stm32-rs/STM32MP157.html#BSEC:SCRATCH)*/
35pub struct SCRATCHrs;
36impl crate::RegisterSpec for SCRATCHrs {
37 type Ux = u32;
38}
39///`read()` method returns [`scratch::R`](R) reader structure
40impl crate::Readable for SCRATCHrs {}
41///`write(|w| ..)` method takes [`scratch::W`](W) writer structure
42impl crate::Writable for SCRATCHrs {
43 type Safety = crate::Unsafe;
44}
45///`reset()` method sets SCRATCH to value 0
46impl crate::Resettable for SCRATCHrs {}