1#[doc = "Register `BRR` reader"]
2pub type R = crate::R<BrrSpec>;
3#[doc = "Register `BRR` writer"]
4pub type W = crate::W<BrrSpec>;
5#[doc = "Field `DIV_Fraction` reader - DIV_Fraction"]
6pub type DivFractionR = crate::FieldReader;
7#[doc = "Field `DIV_Fraction` writer - DIV_Fraction"]
8pub type DivFractionW<'a, REG> = crate::FieldWriter<'a, REG, 4>;
9#[doc = "Field `DIV_Mantissa` reader - DIV_Mantissa"]
10pub type DivMantissaR = crate::FieldReader<u16>;
11#[doc = "Field `DIV_Mantissa` writer - DIV_Mantissa"]
12pub type DivMantissaW<'a, REG> = crate::FieldWriter<'a, REG, 12, u16>;
13impl R {
14 #[doc = "Bits 0:3 - DIV_Fraction"]
15 #[inline(always)]
16 pub fn div_fraction(&self) -> DivFractionR {
17 DivFractionR::new((self.bits & 0x0f) as u8)
18 }
19 #[doc = "Bits 4:15 - DIV_Mantissa"]
20 #[inline(always)]
21 pub fn div_mantissa(&self) -> DivMantissaR {
22 DivMantissaR::new(((self.bits >> 4) & 0x0fff) as u16)
23 }
24}
25impl W {
26 #[doc = "Bits 0:3 - DIV_Fraction"]
27 #[inline(always)]
28 pub fn div_fraction(&mut self) -> DivFractionW<BrrSpec> {
29 DivFractionW::new(self, 0)
30 }
31 #[doc = "Bits 4:15 - DIV_Mantissa"]
32 #[inline(always)]
33 pub fn div_mantissa(&mut self) -> DivMantissaW<BrrSpec> {
34 DivMantissaW::new(self, 4)
35 }
36}
37#[doc = "Baud rate register\n\nYou 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)."]
38pub struct BrrSpec;
39impl crate::RegisterSpec for BrrSpec {
40 type Ux = u32;
41}
42#[doc = "`read()` method returns [`brr::R`](R) reader structure"]
43impl crate::Readable for BrrSpec {}
44#[doc = "`write(|w| ..)` method takes [`brr::W`](W) writer structure"]
45impl crate::Writable for BrrSpec {
46 type Safety = crate::Unsafe;
47}
48#[doc = "`reset()` method sets BRR to value 0"]
49impl crate::Resettable for BrrSpec {}