pub type R = crate::R<IOPRSTRrs>;
pub type W = crate::W<IOPRSTRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum IOPARST {
Reset = 1,
}
impl From<IOPARST> for bool {
#[inline(always)]
fn from(variant: IOPARST) -> Self {
variant as u8 != 0
}
}
pub type IOPARST_R = crate::BitReader<IOPARST>;
impl IOPARST_R {
#[inline(always)]
pub const fn variant(&self) -> Option<IOPARST> {
match self.bits {
true => Some(IOPARST::Reset),
_ => None,
}
}
#[inline(always)]
pub fn is_reset(&self) -> bool {
*self == IOPARST::Reset
}
}
pub type IOPARST_W<'a, REG> = crate::BitWriter<'a, REG, IOPARST>;
impl<'a, REG> IOPARST_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn reset(self) -> &'a mut crate::W<REG> {
self.variant(IOPARST::Reset)
}
}
pub use IOPARST_R as IOPBRST_R;
pub use IOPARST_R as IOPCRST_R;
pub use IOPARST_R as IOPDRST_R;
pub use IOPARST_R as IOPERST_R;
pub use IOPARST_R as IOPHRST_R;
pub use IOPARST_W as IOPBRST_W;
pub use IOPARST_W as IOPCRST_W;
pub use IOPARST_W as IOPDRST_W;
pub use IOPARST_W as IOPERST_W;
pub use IOPARST_W as IOPHRST_W;
impl R {
#[inline(always)]
pub fn ioparst(&self) -> IOPARST_R {
IOPARST_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn iopbrst(&self) -> IOPBRST_R {
IOPBRST_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn iopcrst(&self) -> IOPCRST_R {
IOPCRST_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn iopdrst(&self) -> IOPDRST_R {
IOPDRST_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn ioperst(&self) -> IOPERST_R {
IOPERST_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn iophrst(&self) -> IOPHRST_R {
IOPHRST_R::new(((self.bits >> 7) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("IOPRSTR")
.field("ioparst", &self.ioparst())
.field("iophrst", &self.iophrst())
.field("iopdrst", &self.iopdrst())
.field("iopcrst", &self.iopcrst())
.field("iopbrst", &self.iopbrst())
.field("ioperst", &self.ioperst())
.finish()
}
}
impl W {
#[inline(always)]
pub fn ioparst(&mut self) -> IOPARST_W<IOPRSTRrs> {
IOPARST_W::new(self, 0)
}
#[inline(always)]
pub fn iopbrst(&mut self) -> IOPBRST_W<IOPRSTRrs> {
IOPBRST_W::new(self, 1)
}
#[inline(always)]
pub fn iopcrst(&mut self) -> IOPCRST_W<IOPRSTRrs> {
IOPCRST_W::new(self, 2)
}
#[inline(always)]
pub fn iopdrst(&mut self) -> IOPDRST_W<IOPRSTRrs> {
IOPDRST_W::new(self, 3)
}
#[inline(always)]
pub fn ioperst(&mut self) -> IOPERST_W<IOPRSTRrs> {
IOPERST_W::new(self, 4)
}
#[inline(always)]
pub fn iophrst(&mut self) -> IOPHRST_W<IOPRSTRrs> {
IOPHRST_W::new(self, 7)
}
}
pub struct IOPRSTRrs;
impl crate::RegisterSpec for IOPRSTRrs {
type Ux = u32;
}
impl crate::Readable for IOPRSTRrs {}
impl crate::Writable for IOPRSTRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for IOPRSTRrs {}