stm32l4/stm32l4x5/quadspi/dr16.rs
1///Register `DR16` reader
2pub type R = crate::R<DR16rs>;
3///Register `DR16` writer
4pub type W = crate::W<DR16rs>;
5///Field `DATA` reader - Data
6pub type DATA_R = crate::FieldReader<u16>;
7///Field `DATA` writer - Data
8pub type DATA_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16, crate::Safe>;
9impl R {
10 ///Bits 0:15 - 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("DR16").field("data", &self.data()).finish()
19 }
20}
21impl W {
22 ///Bits 0:15 - Data
23 #[inline(always)]
24 pub fn data(&mut self) -> DATA_W<DR16rs> {
25 DATA_W::new(self, 0)
26 }
27}
28/**Data register: half word (16 bit) access
29
30You can [`read`](crate::Reg::read) this register and get [`dr16::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dr16::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/STM32L4x5.html#QUADSPI:DR16)*/
33pub struct DR16rs;
34impl crate::RegisterSpec for DR16rs {
35 type Ux = u16;
36}
37///`read()` method returns [`dr16::R`](R) reader structure
38impl crate::Readable for DR16rs {}
39///`write(|w| ..)` method takes [`dr16::W`](W) writer structure
40impl crate::Writable for DR16rs {
41 type Safety = crate::Safe;
42}
43///`reset()` method sets DR16 to value 0
44impl crate::Resettable for DR16rs {}