max78000_pac/dvs/
direct.rs1#[doc = "Register `DIRECT` reader"]
2pub type R = crate::R<DirectSpec>;
3#[doc = "Register `DIRECT` writer"]
4pub type W = crate::W<DirectSpec>;
5#[doc = "Field `VOLTAGE` reader - Sets the target power supply value"]
6pub type VoltageR = crate::FieldReader;
7#[doc = "Field `VOLTAGE` writer - Sets the target power supply value"]
8pub type VoltageW<'a, REG> = crate::FieldWriter<'a, REG, 7>;
9impl R {
10 #[doc = "Bits 0:6 - Sets the target power supply value"]
11 #[inline(always)]
12 pub fn voltage(&self) -> VoltageR {
13 VoltageR::new((self.bits & 0x7f) as u8)
14 }
15}
16impl W {
17 #[doc = "Bits 0:6 - Sets the target power supply value"]
18 #[inline(always)]
19 pub fn voltage(&mut self) -> VoltageW<DirectSpec> {
20 VoltageW::new(self, 0)
21 }
22}
23#[doc = "Direct control of target voltage\n\nYou can [`read`](crate::Reg::read) this register and get [`direct::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`direct::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
24pub struct DirectSpec;
25impl crate::RegisterSpec for DirectSpec {
26 type Ux = u32;
27}
28#[doc = "`read()` method returns [`direct::R`](R) reader structure"]
29impl crate::Readable for DirectSpec {}
30#[doc = "`write(|w| ..)` method takes [`direct::W`](W) writer structure"]
31impl crate::Writable for DirectSpec {
32 type Safety = crate::Unsafe;
33 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
34 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
35}
36#[doc = "`reset()` method sets DIRECT to value 0"]
37impl crate::Resettable for DirectSpec {
38 const RESET_VALUE: u32 = 0;
39}