moondancer_pac/generated/info/
version.rs1#[doc = "Register `version` reader"]
2pub type R = crate::R<VERSION_SPEC>;
3#[doc = "Register `version` writer"]
4pub type W = crate::W<VERSION_SPEC>;
5#[doc = "Field `major` reader - major field"]
6pub type MAJOR_R = crate::FieldReader;
7#[doc = "Field `minor` reader - minor field"]
8pub type MINOR_R = crate::FieldReader;
9impl R {
10 #[doc = "Bits 0:7 - major field"]
11 #[inline(always)]
12 pub fn major(&self) -> MAJOR_R {
13 MAJOR_R::new((self.bits & 0xff) as u8)
14 }
15 #[doc = "Bits 8:15 - minor field"]
16 #[inline(always)]
17 pub fn minor(&self) -> MINOR_R {
18 MINOR_R::new(((self.bits >> 8) & 0xff) as u8)
19 }
20}
21impl W {}
22#[doc = "Version register major : Contains the Cynthion hardware major revision number. minor : Contains the Cynthion hardware minor revision number.\n\nYou can [`read`](crate::Reg::read) this register and get [`version::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`version::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
23pub struct VERSION_SPEC;
24impl crate::RegisterSpec for VERSION_SPEC {
25 type Ux = u16;
26}
27#[doc = "`read()` method returns [`version::R`](R) reader structure"]
28impl crate::Readable for VERSION_SPEC {}
29#[doc = "`write(|w| ..)` method takes [`version::W`](W) writer structure"]
30impl crate::Writable for VERSION_SPEC {
31 type Safety = crate::Unsafe;
32 const ZERO_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
33 const ONE_TO_MODIFY_FIELDS_BITMAP: u16 = 0;
34}
35#[doc = "`reset()` method sets version to value 0"]
36impl crate::Resettable for VERSION_SPEC {
37 const RESET_VALUE: u16 = 0;
38}