stm32f3_staging/stm32f373/tsc/ier.rs
1///Register `IER` reader
2pub type R = crate::R<IERrs>;
3///Register `IER` writer
4pub type W = crate::W<IERrs>;
5///Field `EOAIE` reader - End of acquisition interrupt enable
6pub type EOAIE_R = crate::BitReader;
7///Field `EOAIE` writer - End of acquisition interrupt enable
8pub type EOAIE_W<'a, REG> = crate::BitWriter<'a, REG>;
9///Field `MCEIE` reader - Max count error interrupt enable
10pub type MCEIE_R = crate::BitReader;
11///Field `MCEIE` writer - Max count error interrupt enable
12pub type MCEIE_W<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14 ///Bit 0 - End of acquisition interrupt enable
15 #[inline(always)]
16 pub fn eoaie(&self) -> EOAIE_R {
17 EOAIE_R::new((self.bits & 1) != 0)
18 }
19 ///Bit 1 - Max count error interrupt enable
20 #[inline(always)]
21 pub fn mceie(&self) -> MCEIE_R {
22 MCEIE_R::new(((self.bits >> 1) & 1) != 0)
23 }
24}
25impl core::fmt::Debug for R {
26 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
27 f.debug_struct("IER")
28 .field("mceie", &self.mceie())
29 .field("eoaie", &self.eoaie())
30 .finish()
31 }
32}
33impl W {
34 ///Bit 0 - End of acquisition interrupt enable
35 #[inline(always)]
36 pub fn eoaie(&mut self) -> EOAIE_W<IERrs> {
37 EOAIE_W::new(self, 0)
38 }
39 ///Bit 1 - Max count error interrupt enable
40 #[inline(always)]
41 pub fn mceie(&mut self) -> MCEIE_W<IERrs> {
42 MCEIE_W::new(self, 1)
43 }
44}
45/**interrupt enable register
46
47You can [`read`](crate::Reg::read) this register and get [`ier::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ier::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
48
49See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F373.html#TSC:IER)*/
50pub struct IERrs;
51impl crate::RegisterSpec for IERrs {
52 type Ux = u32;
53}
54///`read()` method returns [`ier::R`](R) reader structure
55impl crate::Readable for IERrs {}
56///`write(|w| ..)` method takes [`ier::W`](W) writer structure
57impl crate::Writable for IERrs {
58 type Safety = crate::Unsafe;
59 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
60 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
61}
62///`reset()` method sets IER to value 0
63impl crate::Resettable for IERrs {
64 const RESET_VALUE: u32 = 0;
65}