#[doc = "Register `VERSION` reader"]
pub struct R(crate::R<VERSION_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<VERSION_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<VERSION_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<VERSION_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `SW` reader - Software version number"]
pub type SW_R = crate::FieldReader<u8, u8>;
#[doc = "Field `HW` reader - Hardware version number"]
pub type HW_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:7 - Software version number"]
#[inline(always)]
pub fn sw(&self) -> SW_R {
SW_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bits 8:15 - Hardware version number"]
#[inline(always)]
pub fn hw(&self) -> HW_R {
HW_R::new(((self.bits >> 8) & 0xff) as u8)
}
}
#[doc = "No Description\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [version](index.html) module"]
pub struct VERSION_SPEC;
impl crate::RegisterSpec for VERSION_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [version::R](R) reader structure"]
impl crate::Readable for VERSION_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets VERSION to value 0"]
impl crate::Resettable for VERSION_SPEC {
const RESET_VALUE: Self::Ux = 0;
}