efm32pg1b_pac/leuart0/
startframe.rs

1///Register `STARTFRAME` reader
2pub type R = crate::R<STARTFRAMErs>;
3///Register `STARTFRAME` writer
4pub type W = crate::W<STARTFRAMErs>;
5///Field `STARTFRAME` reader - Start Frame
6pub type StartframeR = crate::FieldReader<u16>;
7///Field `STARTFRAME` writer - Start Frame
8pub type StartframeW<'a, REG> = crate::FieldWriter<'a, REG, 9, u16>;
9impl R {
10    ///Bits 0:8 - Start Frame
11    #[inline(always)]
12    pub fn startframe(&self) -> StartframeR {
13        StartframeR::new((self.bits & 0x01ff) as u16)
14    }
15}
16impl core::fmt::Debug for R {
17    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
18        f.debug_struct("STARTFRAME")
19            .field("startframe", &self.startframe())
20            .finish()
21    }
22}
23impl W {
24    ///Bits 0:8 - Start Frame
25    #[inline(always)]
26    pub fn startframe(&mut self) -> StartframeW<STARTFRAMErs> {
27        StartframeW::new(self, 0)
28    }
29}
30///Start Frame Register
31///
32///You can [`read`](crate::Reg::read) this register and get [`startframe::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`startframe::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
33pub struct STARTFRAMErs;
34impl crate::RegisterSpec for STARTFRAMErs {
35    type Ux = u32;
36}
37///`read()` method returns [`startframe::R`](R) reader structure
38impl crate::Readable for STARTFRAMErs {}
39///`write(|w| ..)` method takes [`startframe::W`](W) writer structure
40impl crate::Writable for STARTFRAMErs {
41    type Safety = crate::Unsafe;
42    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
43    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
44}
45///`reset()` method sets STARTFRAME to value 0
46impl crate::Resettable for STARTFRAMErs {
47    const RESET_VALUE: u32 = 0;
48}