s32k118: rewrite everything for s32k118
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
@ -1,81 +1,25 @@
|
||||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::VERID {
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R { bits: self.register.get() }
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct FEATURER {
|
||||
bits: u16,
|
||||
}
|
||||
impl FEATURER {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u16 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct MINORR {
|
||||
bits: u8,
|
||||
}
|
||||
impl MINORR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct MAJORR {
|
||||
bits: u8,
|
||||
}
|
||||
impl MAJORR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:15 - Feature Number"]
|
||||
#[inline]
|
||||
pub fn feature(&self) -> FEATURER {
|
||||
let bits = {
|
||||
const MASK: u16 = 65535;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u16
|
||||
};
|
||||
FEATURER { bits }
|
||||
}
|
||||
#[doc = "Bits 16:23 - Minor Version Number"]
|
||||
#[inline]
|
||||
pub fn minor(&self) -> MINORR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 16;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u8
|
||||
};
|
||||
MINORR { bits }
|
||||
}
|
||||
#[doc = "Bits 24:31 - Major Version Number"]
|
||||
#[inline]
|
||||
pub fn major(&self) -> MAJORR {
|
||||
let bits = {
|
||||
const MASK: u8 = 255;
|
||||
const OFFSET: u8 = 24;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u8
|
||||
};
|
||||
MAJORR { bits }
|
||||
}
|
||||
}
|
||||
#[doc = "Reader of register VERID"]
|
||||
pub type R = crate::R<u32, super::VERID>;
|
||||
#[doc = "Reader of field `FEATURE`"]
|
||||
pub type FEATURE_R = crate::R<u16, u16>;
|
||||
#[doc = "Reader of field `MINOR`"]
|
||||
pub type MINOR_R = crate::R<u8, u8>;
|
||||
#[doc = "Reader of field `MAJOR`"]
|
||||
pub type MAJOR_R = crate::R<u8, u8>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:15 - Feature Number"]
|
||||
#[inline(always)]
|
||||
pub fn feature(&self) -> FEATURE_R {
|
||||
FEATURE_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
#[doc = "Bits 16:23 - Minor Version Number"]
|
||||
#[inline(always)]
|
||||
pub fn minor(&self) -> MINOR_R {
|
||||
MINOR_R::new(((self.bits >> 16) & 0xff) as u8)
|
||||
}
|
||||
#[doc = "Bits 24:31 - Major Version Number"]
|
||||
#[inline(always)]
|
||||
pub fn major(&self) -> MAJOR_R {
|
||||
MAJOR_R::new(((self.bits >> 24) & 0xff) as u8)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user