stm32f1/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")
19 .field("current", &self.current())
20 .finish()
21 }
22}
23impl W {
24 ///Bits 0:23 - Current counter value
25 #[inline(always)]
26 pub fn current(&mut self) -> CURRENT_W<VALrs> {
27 CURRENT_W::new(self, 0)
28 }
29}
30/**SysTick current value register
31
32You 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).
33
34See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F107.html#STK:VAL)*/
35pub struct VALrs;
36impl crate::RegisterSpec for VALrs {
37 type Ux = u32;
38}
39///`read()` method returns [`val::R`](R) reader structure
40impl crate::Readable for VALrs {}
41///`write(|w| ..)` method takes [`val::W`](W) writer structure
42impl crate::Writable for VALrs {
43 type Safety = crate::Unsafe;
44}
45///`reset()` method sets VAL to value 0
46impl crate::Resettable for VALrs {}