stm32l476/tim6/
dier.rs

1#[doc = "Register `DIER` reader"]
2pub type R = crate::R<DierSpec>;
3#[doc = "Register `DIER` writer"]
4pub type W = crate::W<DierSpec>;
5#[doc = "Field `UIE` reader - Update interrupt enable"]
6pub type UieR = crate::BitReader;
7#[doc = "Field `UIE` writer - Update interrupt enable"]
8pub type UieW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `UDE` reader - Update DMA request enable"]
10pub type UdeR = crate::BitReader;
11#[doc = "Field `UDE` writer - Update DMA request enable"]
12pub type UdeW<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14    #[doc = "Bit 0 - Update interrupt enable"]
15    #[inline(always)]
16    pub fn uie(&self) -> UieR {
17        UieR::new((self.bits & 1) != 0)
18    }
19    #[doc = "Bit 8 - Update DMA request enable"]
20    #[inline(always)]
21    pub fn ude(&self) -> UdeR {
22        UdeR::new(((self.bits >> 8) & 1) != 0)
23    }
24}
25impl W {
26    #[doc = "Bit 0 - Update interrupt enable"]
27    #[inline(always)]
28    pub fn uie(&mut self) -> UieW<DierSpec> {
29        UieW::new(self, 0)
30    }
31    #[doc = "Bit 8 - Update DMA request enable"]
32    #[inline(always)]
33    pub fn ude(&mut self) -> UdeW<DierSpec> {
34        UdeW::new(self, 8)
35    }
36}
37#[doc = "DMA/Interrupt enable register\n\nYou can [`read`](crate::Reg::read) this register and get [`dier::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dier::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
38pub struct DierSpec;
39impl crate::RegisterSpec for DierSpec {
40    type Ux = u32;
41}
42#[doc = "`read()` method returns [`dier::R`](R) reader structure"]
43impl crate::Readable for DierSpec {}
44#[doc = "`write(|w| ..)` method takes [`dier::W`](W) writer structure"]
45impl crate::Writable for DierSpec {
46    type Safety = crate::Unsafe;
47}
48#[doc = "`reset()` method sets DIER to value 0"]
49impl crate::Resettable for DierSpec {}