pub type R = crate::R<PIO4rs>;
pub type W = crate::W<PIO4rs>;
pub type IOSET_R = crate::FieldReader;
pub type IOSET_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
pub type IOWAIT_R = crate::FieldReader;
pub type IOWAIT_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type IOHOLD_R = crate::FieldReader;
pub type IOHOLD_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type IOHIZ_R = crate::FieldReader;
pub type IOHIZ_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
impl R {
#[inline(always)]
pub fn ioset(&self) -> IOSET_R {
IOSET_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn iowait(&self) -> IOWAIT_R {
IOWAIT_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn iohold(&self) -> IOHOLD_R {
IOHOLD_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[inline(always)]
pub fn iohiz(&self) -> IOHIZ_R {
IOHIZ_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PIO4")
.field("iohiz", &self.iohiz())
.field("iohold", &self.iohold())
.field("iowait", &self.iowait())
.field("ioset", &self.ioset())
.finish()
}
}
impl W {
#[inline(always)]
pub fn ioset(&mut self) -> IOSET_W<PIO4rs> {
IOSET_W::new(self, 0)
}
#[inline(always)]
pub fn iowait(&mut self) -> IOWAIT_W<PIO4rs> {
IOWAIT_W::new(self, 8)
}
#[inline(always)]
pub fn iohold(&mut self) -> IOHOLD_W<PIO4rs> {
IOHOLD_W::new(self, 16)
}
#[inline(always)]
pub fn iohiz(&mut self) -> IOHIZ_W<PIO4rs> {
IOHIZ_W::new(self, 24)
}
}
pub struct PIO4rs;
impl crate::RegisterSpec for PIO4rs {
type Ux = u32;
}
impl crate::Readable for PIO4rs {}
impl crate::Writable for PIO4rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for PIO4rs {
const RESET_VALUE: u32 = 0xfcfc_fcfc;
}