pub type R = crate::R<IPC1R1rs>;
pub type W = crate::W<IPC1R1rs>;
pub type TRAFFIC_R = crate::FieldReader;
pub type TRAFFIC_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type OTR_R = crate::FieldReader;
pub type OTR_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
impl R {
#[inline(always)]
pub fn traffic(&self) -> TRAFFIC_R {
TRAFFIC_R::new((self.bits & 7) as u8)
}
#[inline(always)]
pub fn otr(&self) -> OTR_R {
OTR_R::new(((self.bits >> 8) & 3) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("IPC1R1")
.field("traffic", &self.traffic())
.field("otr", &self.otr())
.finish()
}
}
impl W {
#[inline(always)]
pub fn traffic(&mut self) -> TRAFFIC_W<IPC1R1rs> {
TRAFFIC_W::new(self, 0)
}
#[inline(always)]
pub fn otr(&mut self) -> OTR_W<IPC1R1rs> {
OTR_W::new(self, 8)
}
}
pub struct IPC1R1rs;
impl crate::RegisterSpec for IPC1R1rs {
type Ux = u32;
}
impl crate::Readable for IPC1R1rs {}
impl crate::Writable for IPC1R1rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for IPC1R1rs {
const RESET_VALUE: u32 = 0x03;
}