pub type R = crate::R<APB3RSTRrs>;
pub type W = crate::W<APB3RSTRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum LTDCRST {
Reset = 1,
}
impl From<LTDCRST> for bool {
#[inline(always)]
fn from(variant: LTDCRST) -> Self {
variant as u8 != 0
}
}
pub type LTDCRST_R = crate::BitReader<LTDCRST>;
impl LTDCRST_R {
#[inline(always)]
pub const fn variant(&self) -> Option<LTDCRST> {
match self.bits {
true => Some(LTDCRST::Reset),
_ => None,
}
}
#[inline(always)]
pub fn is_reset(&self) -> bool {
*self == LTDCRST::Reset
}
}
pub type LTDCRST_W<'a, REG> = crate::BitWriter<'a, REG, LTDCRST>;
impl<'a, REG> LTDCRST_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn reset(self) -> &'a mut crate::W<REG> {
self.variant(LTDCRST::Reset)
}
}
impl R {
#[inline(always)]
pub fn ltdcrst(&self) -> LTDCRST_R {
LTDCRST_R::new(((self.bits >> 3) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("APB3RSTR").field("ltdcrst", &self.ltdcrst()).finish()
}
}
impl W {
#[inline(always)]
pub fn ltdcrst(&mut self) -> LTDCRST_W<APB3RSTRrs> {
LTDCRST_W::new(self, 3)
}
}
pub struct APB3RSTRrs;
impl crate::RegisterSpec for APB3RSTRrs {
type Ux = u32;
}
impl crate::Readable for APB3RSTRrs {}
impl crate::Writable for APB3RSTRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for APB3RSTRrs {}