cc2538_pac/uart1/
ibrd.rs

1#[doc = "Register `IBRD` reader"]
2pub type R = crate::R<IbrdSpec>;
3#[doc = "Register `IBRD` writer"]
4pub type W = crate::W<IbrdSpec>;
5#[doc = "Field `DIVINT` reader - Integer baud-rate divisor"]
6pub type DivintR = crate::FieldReader<u16>;
7#[doc = "Field `DIVINT` writer - Integer baud-rate divisor"]
8pub type DivintW<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
9impl R {
10    #[doc = "Bits 0:15 - Integer baud-rate divisor"]
11    #[inline(always)]
12    pub fn divint(&self) -> DivintR {
13        DivintR::new((self.bits & 0xffff) as u16)
14    }
15}
16impl W {
17    #[doc = "Bits 0:15 - Integer baud-rate divisor"]
18    #[inline(always)]
19    pub fn divint(&mut self) -> DivintW<IbrdSpec> {
20        DivintW::new(self, 0)
21    }
22}
23#[doc = "UART integer baud-rate divisor The IBRD register is the integer part of the baud-rate divisor value. All the bits are cleared on reset. The minimum possible divide ratio is 1 (when IBRD = 0), in which case the FBRD register is ignored. When changing the IBRD register, the new value does not take effect until transmission or reception of the current character is complete. Any changes to the baud-rate divisor must be followed by a write to the LCRH register.\n\nYou can [`read`](crate::Reg::read) this register and get [`ibrd::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ibrd::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
24pub struct IbrdSpec;
25impl crate::RegisterSpec for IbrdSpec {
26    type Ux = u32;
27}
28#[doc = "`read()` method returns [`ibrd::R`](R) reader structure"]
29impl crate::Readable for IbrdSpec {}
30#[doc = "`write(|w| ..)` method takes [`ibrd::W`](W) writer structure"]
31impl crate::Writable for IbrdSpec {
32    type Safety = crate::Unsafe;
33    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
34    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
35}
36#[doc = "`reset()` method sets IBRD to value 0"]
37impl crate::Resettable for IbrdSpec {
38    const RESET_VALUE: u32 = 0;
39}