stm32f1/stm32f102/spi2/dr8.rs
1///Register `DR8` reader
2pub type R = crate::R<DR8rs>;
3///Register `DR8` writer
4pub type W = crate::W<DR8rs>;
5///Field `DR` reader - Data register
6pub type DR_R = crate::FieldReader;
7///Field `DR` writer - Data register
8pub type DR_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
9impl R {
10 ///Bits 0:7 - Data register
11 #[inline(always)]
12 pub fn dr(&self) -> DR_R {
13 DR_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("DR8").field("dr", &self.dr()).finish()
19 }
20}
21impl W {
22 ///Bits 0:7 - Data register
23 #[inline(always)]
24 pub fn dr(&mut self) -> DR_W<DR8rs> {
25 DR_W::new(self, 0)
26 }
27}
28/**Direct 8-bit access to data register
29
30You can [`read`](crate::Reg::read) this register and get [`dr8::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dr8::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/STM32F102.html#SPI2:DR8)*/
33pub struct DR8rs;
34impl crate::RegisterSpec for DR8rs {
35 type Ux = u8;
36}
37///`read()` method returns [`dr8::R`](R) reader structure
38impl crate::Readable for DR8rs {}
39///`write(|w| ..)` method takes [`dr8::W`](W) writer structure
40impl crate::Writable for DR8rs {
41 type Safety = crate::Safe;
42}
43///`reset()` method sets DR8 to value 0
44impl crate::Resettable for DR8rs {}