pub type R = crate::R<BTR4rs>;
pub type W = crate::W<BTR4rs>;
pub type ADDSET_R = crate::FieldReader;
pub type ADDSET_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type ADDHLD_R = crate::FieldReader;
pub type ADDHLD_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type DATAST_R = crate::FieldReader;
pub type DATAST_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type BUSTURN_R = crate::FieldReader;
pub type BUSTURN_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type CLKDIV_R = crate::FieldReader;
pub type CLKDIV_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type DATLAT_R = crate::FieldReader;
pub type DATLAT_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type ACCMOD_R = crate::FieldReader;
pub type ACCMOD_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
impl R {
        #[inline(always)]
    pub fn addset(&self) -> ADDSET_R {
        ADDSET_R::new((self.bits & 0x0f) as u8)
    }
        #[inline(always)]
    pub fn addhld(&self) -> ADDHLD_R {
        ADDHLD_R::new(((self.bits >> 4) & 0x0f) as u8)
    }
        #[inline(always)]
    pub fn datast(&self) -> DATAST_R {
        DATAST_R::new(((self.bits >> 8) & 0xff) as u8)
    }
        #[inline(always)]
    pub fn busturn(&self) -> BUSTURN_R {
        BUSTURN_R::new(((self.bits >> 16) & 0x0f) as u8)
    }
        #[inline(always)]
    pub fn clkdiv(&self) -> CLKDIV_R {
        CLKDIV_R::new(((self.bits >> 20) & 0x0f) as u8)
    }
        #[inline(always)]
    pub fn datlat(&self) -> DATLAT_R {
        DATLAT_R::new(((self.bits >> 24) & 0x0f) as u8)
    }
        #[inline(always)]
    pub fn accmod(&self) -> ACCMOD_R {
        ACCMOD_R::new(((self.bits >> 28) & 3) as u8)
    }
}
impl core::fmt::Debug for R {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("BTR4")
            .field("accmod", &self.accmod())
            .field("datlat", &self.datlat())
            .field("clkdiv", &self.clkdiv())
            .field("busturn", &self.busturn())
            .field("datast", &self.datast())
            .field("addhld", &self.addhld())
            .field("addset", &self.addset())
            .finish()
    }
}
impl W {
        #[inline(always)]
    pub fn addset(&mut self) -> ADDSET_W<BTR4rs> {
        ADDSET_W::new(self, 0)
    }
        #[inline(always)]
    pub fn addhld(&mut self) -> ADDHLD_W<BTR4rs> {
        ADDHLD_W::new(self, 4)
    }
        #[inline(always)]
    pub fn datast(&mut self) -> DATAST_W<BTR4rs> {
        DATAST_W::new(self, 8)
    }
        #[inline(always)]
    pub fn busturn(&mut self) -> BUSTURN_W<BTR4rs> {
        BUSTURN_W::new(self, 16)
    }
        #[inline(always)]
    pub fn clkdiv(&mut self) -> CLKDIV_W<BTR4rs> {
        CLKDIV_W::new(self, 20)
    }
        #[inline(always)]
    pub fn datlat(&mut self) -> DATLAT_W<BTR4rs> {
        DATLAT_W::new(self, 24)
    }
        #[inline(always)]
    pub fn accmod(&mut self) -> ACCMOD_W<BTR4rs> {
        ACCMOD_W::new(self, 28)
    }
}
pub struct BTR4rs;
impl crate::RegisterSpec for BTR4rs {
    type Ux = u32;
}
impl crate::Readable for BTR4rs {}
impl crate::Writable for BTR4rs {
    type Safety = crate::Unsafe;
}
impl crate::Resettable for BTR4rs {
    const RESET_VALUE: u32 = 0xffff_ffff;
}