stm32f3_staging/stm32f303/tsc/
isr.rs

1///Register `ISR` reader
2pub type R = crate::R<ISRrs>;
3///Register `ISR` writer
4pub type W = crate::W<ISRrs>;
5///Field `EOAF` reader - End of acquisition flag
6pub type EOAF_R = crate::BitReader;
7///Field `EOAF` writer - End of acquisition flag
8pub type EOAF_W<'a, REG> = crate::BitWriter<'a, REG>;
9///Field `MCEF` reader - Max count error flag
10pub type MCEF_R = crate::BitReader;
11///Field `MCEF` writer - Max count error flag
12pub type MCEF_W<'a, REG> = crate::BitWriter<'a, REG>;
13impl R {
14    ///Bit 0 - End of acquisition flag
15    #[inline(always)]
16    pub fn eoaf(&self) -> EOAF_R {
17        EOAF_R::new((self.bits & 1) != 0)
18    }
19    ///Bit 1 - Max count error flag
20    #[inline(always)]
21    pub fn mcef(&self) -> MCEF_R {
22        MCEF_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("ISR")
28            .field("mcef", &self.mcef())
29            .field("eoaf", &self.eoaf())
30            .finish()
31    }
32}
33impl W {
34    ///Bit 0 - End of acquisition flag
35    #[inline(always)]
36    pub fn eoaf(&mut self) -> EOAF_W<ISRrs> {
37        EOAF_W::new(self, 0)
38    }
39    ///Bit 1 - Max count error flag
40    #[inline(always)]
41    pub fn mcef(&mut self) -> MCEF_W<ISRrs> {
42        MCEF_W::new(self, 1)
43    }
44}
45/**interrupt status register
46
47You can [`read`](crate::Reg::read) this register and get [`isr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`isr::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/STM32F303.html#TSC:ISR)*/
50pub struct ISRrs;
51impl crate::RegisterSpec for ISRrs {
52    type Ux = u32;
53}
54///`read()` method returns [`isr::R`](R) reader structure
55impl crate::Readable for ISRrs {}
56///`write(|w| ..)` method takes [`isr::W`](W) writer structure
57impl crate::Writable for ISRrs {
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 ISR to value 0
63impl crate::Resettable for ISRrs {
64    const RESET_VALUE: u32 = 0;
65}