atsam3n00a/usart0/
if_.rs

1#[doc = "Register `IF` reader"]
2pub type R = crate::R<IfSpec>;
3#[doc = "Register `IF` writer"]
4pub type W = crate::W<IfSpec>;
5#[doc = "Field `IRDA_FILTER` reader - IrDA Filter"]
6pub type IrdaFilterR = crate::FieldReader;
7#[doc = "Field `IRDA_FILTER` writer - IrDA Filter"]
8pub type IrdaFilterW<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9impl R {
10    #[doc = "Bits 0:7 - IrDA Filter"]
11    #[inline(always)]
12    pub fn irda_filter(&self) -> IrdaFilterR {
13        IrdaFilterR::new((self.bits & 0xff) as u8)
14    }
15}
16impl W {
17    #[doc = "Bits 0:7 - IrDA Filter"]
18    #[inline(always)]
19    #[must_use]
20    pub fn irda_filter(&mut self) -> IrdaFilterW<IfSpec> {
21        IrdaFilterW::new(self, 0)
22    }
23}
24#[doc = "IrDA Filter Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`if_::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`if_::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
25pub struct IfSpec;
26impl crate::RegisterSpec for IfSpec {
27    type Ux = u32;
28}
29#[doc = "`read()` method returns [`if_::R`](R) reader structure"]
30impl crate::Readable for IfSpec {}
31#[doc = "`write(|w| ..)` method takes [`if_::W`](W) writer structure"]
32impl crate::Writable for IfSpec {
33    type Safety = crate::Unsafe;
34    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
35    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
36}
37#[doc = "`reset()` method sets IF to value 0"]
38impl crate::Resettable for IfSpec {
39    const RESET_VALUE: u32 = 0;
40}