s32k118: rewrite everything for s32k118
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
@ -1,49 +1,29 @@
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::PSOR {
|
||||
#[doc = r" Writes to the register"]
|
||||
#[inline]
|
||||
pub fn write<F>(&self, f: F)
|
||||
where
|
||||
F: FnOnce(&mut W) -> &mut W,
|
||||
{
|
||||
let mut w = W::reset_value();
|
||||
f(&mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _PTSOW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _PTSOW<'a> {
|
||||
#[doc = r" Writes raw bits to the field"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
const MASK: u32 = 4294967295;
|
||||
const OFFSET: u8 = 0;
|
||||
self.w.bits &= !((MASK as u32) << OFFSET);
|
||||
self.w.bits |= ((value & MASK) as u32) << OFFSET;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = r" Reset value of the register"]
|
||||
#[inline]
|
||||
pub fn reset_value() -> W {
|
||||
W { bits: 0 }
|
||||
}
|
||||
#[doc = r" Writes raw bits to the register"]
|
||||
#[inline]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.bits = bits;
|
||||
self
|
||||
}
|
||||
#[doc = "Bits 0:31 - Port Set Output"]
|
||||
#[inline]
|
||||
pub fn ptso(&mut self) -> _PTSOW {
|
||||
_PTSOW { w: self }
|
||||
}
|
||||
}
|
||||
#[doc = "Writer for register PSOR"]
|
||||
pub type W = crate::W<u32, super::PSOR>;
|
||||
#[doc = "Register PSOR `reset()`'s with value 0"]
|
||||
impl crate::ResetValue for super::PSOR {
|
||||
type Type = u32;
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Type {
|
||||
0
|
||||
}
|
||||
}
|
||||
#[doc = "Write proxy for field `PTSO`"]
|
||||
pub struct PTSO_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> PTSO_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Port Set Output"]
|
||||
#[inline(always)]
|
||||
pub fn ptso(&mut self) -> PTSO_W {
|
||||
PTSO_W { w: self }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user