stm32f1_staging/stm32f101/adc1/ltr.rs
1///Register `LTR` reader
2pub type R = crate::R<LTRrs>;
3///Register `LTR` writer
4pub type W = crate::W<LTRrs>;
5///Field `LT` reader - Analog watchdog lower threshold
6pub type LT_R = crate::FieldReader<u16>;
7///Field `LT` writer - Analog watchdog lower threshold
8pub type LT_W<'a, REG> = crate::FieldWriter<'a, REG, 12, u16, crate::Safe>;
9impl R {
10 ///Bits 0:11 - Analog watchdog lower threshold
11 #[inline(always)]
12 pub fn lt(&self) -> LT_R {
13 LT_R::new((self.bits & 0x0fff) 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("LTR").field("lt", &self.lt()).finish()
19 }
20}
21impl W {
22 ///Bits 0:11 - Analog watchdog lower threshold
23 #[inline(always)]
24 pub fn lt(&mut self) -> LT_W<LTRrs> {
25 LT_W::new(self, 0)
26 }
27}
28/**watchdog lower threshold register
29
30You can [`read`](crate::Reg::read) this register and get [`ltr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ltr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
31
32See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#ADC1:LTR)*/
33pub struct LTRrs;
34impl crate::RegisterSpec for LTRrs {
35 type Ux = u32;
36}
37///`read()` method returns [`ltr::R`](R) reader structure
38impl crate::Readable for LTRrs {}
39///`write(|w| ..)` method takes [`ltr::W`](W) writer structure
40impl crate::Writable for LTRrs {
41 type Safety = crate::Unsafe;
42}
43///`reset()` method sets LTR to value 0
44impl crate::Resettable for LTRrs {}