pub type R = crate::R<MACA1HRrs>;
pub type W = crate::W<MACA1HRrs>;
pub type MACA1H_R = crate::FieldReader<u16>;
pub type MACA1H_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
pub type MBC_R = crate::FieldReader;
pub type MBC_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
pub type SA_R = crate::BitReader;
pub type SA_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type AE_R = crate::BitReader;
pub type AE_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn maca1h(&self) -> MACA1H_R {
MACA1H_R::new((self.bits & 0xffff) as u16)
}
#[inline(always)]
pub fn mbc(&self) -> MBC_R {
MBC_R::new(((self.bits >> 24) & 0x3f) as u8)
}
#[inline(always)]
pub fn sa(&self) -> SA_R {
SA_R::new(((self.bits >> 30) & 1) != 0)
}
#[inline(always)]
pub fn ae(&self) -> AE_R {
AE_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("MACA1HR")
.field("maca1h", &self.maca1h())
.field("mbc", &self.mbc())
.field("sa", &self.sa())
.field("ae", &self.ae())
.finish()
}
}
impl W {
#[inline(always)]
pub fn maca1h(&mut self) -> MACA1H_W<MACA1HRrs> {
MACA1H_W::new(self, 0)
}
#[inline(always)]
pub fn mbc(&mut self) -> MBC_W<MACA1HRrs> {
MBC_W::new(self, 24)
}
#[inline(always)]
pub fn sa(&mut self) -> SA_W<MACA1HRrs> {
SA_W::new(self, 30)
}
#[inline(always)]
pub fn ae(&mut self) -> AE_W<MACA1HRrs> {
AE_W::new(self, 31)
}
}
pub struct MACA1HRrs;
impl crate::RegisterSpec for MACA1HRrs {
type Ux = u32;
}
impl crate::Readable for MACA1HRrs {}
impl crate::Writable for MACA1HRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for MACA1HRrs {
const RESET_VALUE: u32 = 0xffff;
}