pub type R = crate::R<OAR2rs>;
pub type W = crate::W<OAR2rs>;
pub type OA2_R = crate::FieldReader;
pub type OA2_W<'a, REG> = crate::FieldWriter<'a, REG, 7>;
pub type OA2MSK_R = crate::FieldReader;
pub type OA2MSK_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type OA2EN_R = crate::BitReader;
pub type OA2EN_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn oa2(&self) -> OA2_R {
OA2_R::new(((self.bits >> 1) & 0x7f) as u8)
}
#[inline(always)]
pub fn oa2msk(&self) -> OA2MSK_R {
OA2MSK_R::new(((self.bits >> 8) & 7) as u8)
}
#[inline(always)]
pub fn oa2en(&self) -> OA2EN_R {
OA2EN_R::new(((self.bits >> 15) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("OAR2")
.field("oa2", &self.oa2())
.field("oa2msk", &self.oa2msk())
.field("oa2en", &self.oa2en())
.finish()
}
}
impl W {
#[inline(always)]
pub fn oa2(&mut self) -> OA2_W<OAR2rs> {
OA2_W::new(self, 1)
}
#[inline(always)]
pub fn oa2msk(&mut self) -> OA2MSK_W<OAR2rs> {
OA2MSK_W::new(self, 8)
}
#[inline(always)]
pub fn oa2en(&mut self) -> OA2EN_W<OAR2rs> {
OA2EN_W::new(self, 15)
}
}
pub struct OAR2rs;
impl crate::RegisterSpec for OAR2rs {
type Ux = u32;
}
impl crate::Readable for OAR2rs {}
impl crate::Writable for OAR2rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for OAR2rs {}