pub type R = crate::R<UCPDRrs>;
pub type W = crate::W<UCPDRrs>;
pub type UCPD_DBDIS_R = crate::BitReader;
pub type UCPD_DBDIS_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type UCPD_STBY_R = crate::BitReader;
pub type UCPD_STBY_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn ucpd_dbdis(&self) -> UCPD_DBDIS_R {
UCPD_DBDIS_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn ucpd_stby(&self) -> UCPD_STBY_R {
UCPD_STBY_R::new(((self.bits >> 1) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("UCPDR")
.field("ucpd_dbdis", &self.ucpd_dbdis())
.field("ucpd_stby", &self.ucpd_stby())
.finish()
}
}
impl W {
#[inline(always)]
pub fn ucpd_dbdis(&mut self) -> UCPD_DBDIS_W<UCPDRrs> {
UCPD_DBDIS_W::new(self, 0)
}
#[inline(always)]
pub fn ucpd_stby(&mut self) -> UCPD_STBY_W<UCPDRrs> {
UCPD_STBY_W::new(self, 1)
}
}
pub struct UCPDRrs;
impl crate::RegisterSpec for UCPDRrs {
type Ux = u32;
}
impl crate::Readable for UCPDRrs {}
impl crate::Writable for UCPDRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for UCPDRrs {
const RESET_VALUE: u32 = 0x02;
}