stm32f1_staging/stm32f107/stk/
val.rs

1///Register `VAL` reader
2pub type R = crate::R<VALrs>;
3///Register `VAL` writer
4pub type W = crate::W<VALrs>;
5///Field `CURRENT` reader - Current counter value
6pub type CURRENT_R = crate::FieldReader<u32>;
7///Field `CURRENT` writer - Current counter value
8pub type CURRENT_W<'a, REG> = crate::FieldWriter<'a, REG, 24, u32>;
9impl R {
10    ///Bits 0:23 - Current counter value
11    #[inline(always)]
12    pub fn current(&self) -> CURRENT_R {
13        CURRENT_R::new(self.bits & 0x00ff_ffff)
14    }
15}
16impl core::fmt::Debug for R {
17    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
18        f.debug_struct("VAL").field("current", &self.current()).finish()
19    }
20}
21impl W {
22    ///Bits 0:23 - Current counter value
23    #[inline(always)]
24    pub fn current(&mut self) -> CURRENT_W<VALrs> {
25        CURRENT_W::new(self, 0)
26    }
27}
28/**SysTick current value register
29
30You can [`read`](crate::Reg::read) this register and get [`val::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`val::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/STM32F107.html#STK:VAL)*/
33pub struct VALrs;
34impl crate::RegisterSpec for VALrs {
35    type Ux = u32;
36}
37///`read()` method returns [`val::R`](R) reader structure
38impl crate::Readable for VALrs {}
39///`write(|w| ..)` method takes [`val::W`](W) writer structure
40impl crate::Writable for VALrs {
41    type Safety = crate::Unsafe;
42}
43///`reset()` method sets VAL to value 0
44impl crate::Resettable for VALrs {}