d1-pac 0.0.32

Peripheral access API for Allwinner D1 SoC generated from unofficial SVD file
Documentation
#[doc = "Register `retite_pc1` reader"]
pub type R = crate::R<RETITE_PC1_SPEC>;
#[doc = "Field `rt_pc_h` reader - Retire PC\\[39:32\\]"]
pub type RT_PC_H_R = crate::FieldReader;
#[doc = "Field `rt_sig` reader - Retire Signal"]
pub type RT_SIG_R = crate::BitReader<RT_SIG_A>;
#[doc = "Retire Signal\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RT_SIG_A {
    #[doc = "0: `0`"]
    NOT_HAVE = 0,
    #[doc = "1: `1`"]
    HAVE = 1,
}
impl From<RT_SIG_A> for bool {
    #[inline(always)]
    fn from(variant: RT_SIG_A) -> Self {
        variant as u8 != 0
    }
}
impl RT_SIG_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> RT_SIG_A {
        match self.bits {
            false => RT_SIG_A::NOT_HAVE,
            true => RT_SIG_A::HAVE,
        }
    }
    #[doc = "`0`"]
    #[inline(always)]
    pub fn is_not_have(&self) -> bool {
        *self == RT_SIG_A::NOT_HAVE
    }
    #[doc = "`1`"]
    #[inline(always)]
    pub fn is_have(&self) -> bool {
        *self == RT_SIG_A::HAVE
    }
}
impl R {
    #[doc = "Bits 0:7 - Retire PC\\[39:32\\]"]
    #[inline(always)]
    pub fn rt_pc_h(&self) -> RT_PC_H_R {
        RT_PC_H_R::new((self.bits & 0xff) as u8)
    }
    #[doc = "Bit 31 - Retire Signal"]
    #[inline(always)]
    pub fn rt_sig(&self) -> RT_SIG_R {
        RT_SIG_R::new(((self.bits >> 31) & 1) != 0)
    }
}
#[doc = "Retire PC1 Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`retite_pc1::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct RETITE_PC1_SPEC;
impl crate::RegisterSpec for RETITE_PC1_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [`retite_pc1::R`](R) reader structure"]
impl crate::Readable for RETITE_PC1_SPEC {}
#[doc = "`reset()` method sets retite_pc1 to value 0"]
impl crate::Resettable for RETITE_PC1_SPEC {
    const RESET_VALUE: Self::Ux = 0;
}