stm32l4/stm32l4x5/swpmi1/brr.rs
1///Register `BRR` reader
2pub type R = crate::R<BRRrs>;
3///Register `BRR` writer
4pub type W = crate::W<BRRrs>;
5///Field `BR` reader - Bitrate prescaler
6pub type BR_R = crate::FieldReader;
7///Field `BR` writer - Bitrate prescaler
8pub type BR_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
9impl R {
10 ///Bits 0:5 - Bitrate prescaler
11 #[inline(always)]
12 pub fn br(&self) -> BR_R {
13 BR_R::new((self.bits & 0x3f) as u8)
14 }
15}
16impl core::fmt::Debug for R {
17 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
18 f.debug_struct("BRR").field("br", &self.br()).finish()
19 }
20}
21impl W {
22 ///Bits 0:5 - Bitrate prescaler
23 #[inline(always)]
24 pub fn br(&mut self) -> BR_W<BRRrs> {
25 BR_W::new(self, 0)
26 }
27}
28/**SWPMI Bitrate register
29
30You can [`read`](crate::Reg::read) this register and get [`brr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`brr::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#SWPMI1:BRR)*/
33pub struct BRRrs;
34impl crate::RegisterSpec for BRRrs {
35 type Ux = u32;
36}
37///`read()` method returns [`brr::R`](R) reader structure
38impl crate::Readable for BRRrs {}
39///`write(|w| ..)` method takes [`brr::W`](W) writer structure
40impl crate::Writable for BRRrs {
41 type Safety = crate::Unsafe;
42}
43///`reset()` method sets BRR to value 0x01
44impl crate::Resettable for BRRrs {
45 const RESET_VALUE: u32 = 0x01;
46}