pub type R = crate::R<MACVLANTRrs>;
pub type W = crate::W<MACVLANTRrs>;
pub type VLANTI_R = crate::FieldReader<u16>;
pub type VLANTI_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
pub type VLANTC_R = crate::BitReader;
pub type VLANTC_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn vlanti(&self) -> VLANTI_R {
VLANTI_R::new((self.bits & 0xffff) as u16)
}
#[inline(always)]
pub fn vlantc(&self) -> VLANTC_R {
VLANTC_R::new(((self.bits >> 16) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("MACVLANTR")
.field("vlanti", &self.vlanti())
.field("vlantc", &self.vlantc())
.finish()
}
}
impl W {
#[inline(always)]
pub fn vlanti(&mut self) -> VLANTI_W<MACVLANTRrs> {
VLANTI_W::new(self, 0)
}
#[inline(always)]
pub fn vlantc(&mut self) -> VLANTC_W<MACVLANTRrs> {
VLANTC_W::new(self, 16)
}
}
pub struct MACVLANTRrs;
impl crate::RegisterSpec for MACVLANTRrs {
type Ux = u32;
}
impl crate::Readable for MACVLANTRrs {}
impl crate::Writable for MACVLANTRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for MACVLANTRrs {}