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::PCOR {
|
||||
#[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 _PTCOW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _PTCOW<'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 Clear Output"]
|
||||
#[inline]
|
||||
pub fn ptco(&mut self) -> _PTCOW {
|
||||
_PTCOW { w: self }
|
||||
}
|
||||
}
|
||||
#[doc = "Writer for register PCOR"]
|
||||
pub type W = crate::W<u32, super::PCOR>;
|
||||
#[doc = "Register PCOR `reset()`'s with value 0"]
|
||||
impl crate::ResetValue for super::PCOR {
|
||||
type Type = u32;
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Type {
|
||||
0
|
||||
}
|
||||
}
|
||||
#[doc = "Write proxy for field `PTCO`"]
|
||||
pub struct PTCO_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> PTCO_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 Clear Output"]
|
||||
#[inline(always)]
|
||||
pub fn ptco(&mut self) -> PTCO_W {
|
||||
PTCO_W { w: self }
|
||||
}
|
||||
}
|
||||
|
143
src/pte/pddr.rs
143
src/pte/pddr.rs
@ -1,103 +1,40 @@
|
||||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::PDDR {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R { bits: self.register.get() }
|
||||
}
|
||||
#[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" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct PDDR {
|
||||
bits: u32,
|
||||
}
|
||||
impl PDDR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _PDDW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _PDDW<'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 R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:31 - Port Data Direction"]
|
||||
#[inline]
|
||||
pub fn pdd(&self) -> PDDR {
|
||||
let bits = {
|
||||
const MASK: u32 = 4294967295;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u32
|
||||
};
|
||||
PDDR { bits }
|
||||
}
|
||||
}
|
||||
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 Data Direction"]
|
||||
#[inline]
|
||||
pub fn pdd(&mut self) -> _PDDW {
|
||||
_PDDW { w: self }
|
||||
}
|
||||
}
|
||||
#[doc = "Reader of register PDDR"]
|
||||
pub type R = crate::R<u32, super::PDDR>;
|
||||
#[doc = "Writer for register PDDR"]
|
||||
pub type W = crate::W<u32, super::PDDR>;
|
||||
#[doc = "Register PDDR `reset()`'s with value 0"]
|
||||
impl crate::ResetValue for super::PDDR {
|
||||
type Type = u32;
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Type {
|
||||
0
|
||||
}
|
||||
}
|
||||
#[doc = "Reader of field `PDD`"]
|
||||
pub type PDD_R = crate::R<u32, u32>;
|
||||
#[doc = "Write proxy for field `PDD`"]
|
||||
pub struct PDD_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> PDD_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 R {
|
||||
#[doc = "Bits 0:31 - Port Data Direction"]
|
||||
#[inline(always)]
|
||||
pub fn pdd(&self) -> PDD_R {
|
||||
PDD_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Port Data Direction"]
|
||||
#[inline(always)]
|
||||
pub fn pdd(&mut self) -> PDD_W {
|
||||
PDD_W { w: self }
|
||||
}
|
||||
}
|
||||
|
@ -1,39 +1,11 @@
|
||||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::PDIR {
|
||||
#[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 PDIR {
|
||||
bits: u32,
|
||||
}
|
||||
impl PDIR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:31 - Port Data Input"]
|
||||
#[inline]
|
||||
pub fn pdi(&self) -> PDIR {
|
||||
let bits = {
|
||||
const MASK: u32 = 4294967295;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u32
|
||||
};
|
||||
PDIR { bits }
|
||||
}
|
||||
}
|
||||
#[doc = "Reader of register PDIR"]
|
||||
pub type R = crate::R<u32, super::PDIR>;
|
||||
#[doc = "Reader of field `PDI`"]
|
||||
pub type PDI_R = crate::R<u32, u32>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Port Data Input"]
|
||||
#[inline(always)]
|
||||
pub fn pdi(&self) -> PDI_R {
|
||||
PDI_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
|
143
src/pte/pdor.rs
143
src/pte/pdor.rs
@ -1,103 +1,40 @@
|
||||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::PDOR {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R { bits: self.register.get() }
|
||||
}
|
||||
#[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" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct PDOR {
|
||||
bits: u32,
|
||||
}
|
||||
impl PDOR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _PDOW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _PDOW<'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 R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:31 - Port Data Output"]
|
||||
#[inline]
|
||||
pub fn pdo(&self) -> PDOR {
|
||||
let bits = {
|
||||
const MASK: u32 = 4294967295;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u32
|
||||
};
|
||||
PDOR { bits }
|
||||
}
|
||||
}
|
||||
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 Data Output"]
|
||||
#[inline]
|
||||
pub fn pdo(&mut self) -> _PDOW {
|
||||
_PDOW { w: self }
|
||||
}
|
||||
}
|
||||
#[doc = "Reader of register PDOR"]
|
||||
pub type R = crate::R<u32, super::PDOR>;
|
||||
#[doc = "Writer for register PDOR"]
|
||||
pub type W = crate::W<u32, super::PDOR>;
|
||||
#[doc = "Register PDOR `reset()`'s with value 0"]
|
||||
impl crate::ResetValue for super::PDOR {
|
||||
type Type = u32;
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Type {
|
||||
0
|
||||
}
|
||||
}
|
||||
#[doc = "Reader of field `PDO`"]
|
||||
pub type PDO_R = crate::R<u32, u32>;
|
||||
#[doc = "Write proxy for field `PDO`"]
|
||||
pub struct PDO_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> PDO_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 R {
|
||||
#[doc = "Bits 0:31 - Port Data Output"]
|
||||
#[inline(always)]
|
||||
pub fn pdo(&self) -> PDO_R {
|
||||
PDO_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Port Data Output"]
|
||||
#[inline(always)]
|
||||
pub fn pdo(&mut self) -> PDO_W {
|
||||
PDO_W { w: self }
|
||||
}
|
||||
}
|
||||
|
143
src/pte/pidr.rs
143
src/pte/pidr.rs
@ -1,103 +1,40 @@
|
||||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::PIDR {
|
||||
#[doc = r" Modifies the contents of the register"]
|
||||
#[inline]
|
||||
pub fn modify<F>(&self, f: F)
|
||||
where
|
||||
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
|
||||
{
|
||||
let bits = self.register.get();
|
||||
let r = R { bits: bits };
|
||||
let mut w = W { bits: bits };
|
||||
f(&r, &mut w);
|
||||
self.register.set(w.bits);
|
||||
}
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R { bits: self.register.get() }
|
||||
}
|
||||
#[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" Writes the reset value to the register"]
|
||||
#[inline]
|
||||
pub fn reset(&self) {
|
||||
self.write(|w| w)
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct PIDR {
|
||||
bits: u32,
|
||||
}
|
||||
impl PIDR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
#[doc = r" Proxy"]
|
||||
pub struct _PIDW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _PIDW<'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 R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bits 0:31 - Port Input Disable"]
|
||||
#[inline]
|
||||
pub fn pid(&self) -> PIDR {
|
||||
let bits = {
|
||||
const MASK: u32 = 4294967295;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u32
|
||||
};
|
||||
PIDR { bits }
|
||||
}
|
||||
}
|
||||
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 Input Disable"]
|
||||
#[inline]
|
||||
pub fn pid(&mut self) -> _PIDW {
|
||||
_PIDW { w: self }
|
||||
}
|
||||
}
|
||||
#[doc = "Reader of register PIDR"]
|
||||
pub type R = crate::R<u32, super::PIDR>;
|
||||
#[doc = "Writer for register PIDR"]
|
||||
pub type W = crate::W<u32, super::PIDR>;
|
||||
#[doc = "Register PIDR `reset()`'s with value 0"]
|
||||
impl crate::ResetValue for super::PIDR {
|
||||
type Type = u32;
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Type {
|
||||
0
|
||||
}
|
||||
}
|
||||
#[doc = "Reader of field `PID`"]
|
||||
pub type PID_R = crate::R<u32, u32>;
|
||||
#[doc = "Write proxy for field `PID`"]
|
||||
pub struct PID_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> PID_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 R {
|
||||
#[doc = "Bits 0:31 - Port Input Disable"]
|
||||
#[inline(always)]
|
||||
pub fn pid(&self) -> PID_R {
|
||||
PID_R::new((self.bits & 0xffff_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Port Input Disable"]
|
||||
#[inline(always)]
|
||||
pub fn pid(&mut self) -> PID_W {
|
||||
PID_W { w: self }
|
||||
}
|
||||
}
|
||||
|
@ -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 }
|
||||
}
|
||||
}
|
||||
|
@ -1,49 +1,29 @@
|
||||
#[doc = r" Value to write to the register"]
|
||||
pub struct W {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::PTOR {
|
||||
#[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 _PTTOW<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> _PTTOW<'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 Toggle Output"]
|
||||
#[inline]
|
||||
pub fn ptto(&mut self) -> _PTTOW {
|
||||
_PTTOW { w: self }
|
||||
}
|
||||
}
|
||||
#[doc = "Writer for register PTOR"]
|
||||
pub type W = crate::W<u32, super::PTOR>;
|
||||
#[doc = "Register PTOR `reset()`'s with value 0"]
|
||||
impl crate::ResetValue for super::PTOR {
|
||||
type Type = u32;
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Type {
|
||||
0
|
||||
}
|
||||
}
|
||||
#[doc = "Write proxy for field `PTTO`"]
|
||||
pub struct PTTO_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> PTTO_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 Toggle Output"]
|
||||
#[inline(always)]
|
||||
pub fn ptto(&mut self) -> PTTO_W {
|
||||
PTTO_W { w: self }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user