pub type R = crate::R<STATUSrs>;
pub type RxensR = crate::BitReader;
pub type TxensR = crate::BitReader;
pub type MasterR = crate::BitReader;
pub type RxblockR = crate::BitReader;
pub type TxtriR = crate::BitReader;
pub type TxcR = crate::BitReader;
pub type TxblR = crate::BitReader;
pub type RxdatavR = crate::BitReader;
pub type RxfullR = crate::BitReader;
pub type TxbdrightR = crate::BitReader;
pub type TxbsrightR = crate::BitReader;
pub type RxdatavrightR = crate::BitReader;
pub type RxfullrightR = crate::BitReader;
pub type TxidleR = crate::BitReader;
pub type TimerrestartedR = crate::BitReader;
pub type TxbufcntR = crate::FieldReader;
impl R {
#[inline(always)]
pub fn rxens(&self) -> RxensR {
RxensR::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn txens(&self) -> TxensR {
TxensR::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn master(&self) -> MasterR {
MasterR::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn rxblock(&self) -> RxblockR {
RxblockR::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn txtri(&self) -> TxtriR {
TxtriR::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn txc(&self) -> TxcR {
TxcR::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn txbl(&self) -> TxblR {
TxblR::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn rxdatav(&self) -> RxdatavR {
RxdatavR::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn rxfull(&self) -> RxfullR {
RxfullR::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn txbdright(&self) -> TxbdrightR {
TxbdrightR::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn txbsright(&self) -> TxbsrightR {
TxbsrightR::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn rxdatavright(&self) -> RxdatavrightR {
RxdatavrightR::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn rxfullright(&self) -> RxfullrightR {
RxfullrightR::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn txidle(&self) -> TxidleR {
TxidleR::new(((self.bits >> 13) & 1) != 0)
}
#[inline(always)]
pub fn timerrestarted(&self) -> TimerrestartedR {
TimerrestartedR::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn txbufcnt(&self) -> TxbufcntR {
TxbufcntR::new(((self.bits >> 16) & 3) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("STATUS")
.field("rxens", &self.rxens())
.field("txens", &self.txens())
.field("master", &self.master())
.field("rxblock", &self.rxblock())
.field("txtri", &self.txtri())
.field("txc", &self.txc())
.field("txbl", &self.txbl())
.field("rxdatav", &self.rxdatav())
.field("rxfull", &self.rxfull())
.field("txbdright", &self.txbdright())
.field("txbsright", &self.txbsright())
.field("rxdatavright", &self.rxdatavright())
.field("rxfullright", &self.rxfullright())
.field("txidle", &self.txidle())
.field("timerrestarted", &self.timerrestarted())
.field("txbufcnt", &self.txbufcnt())
.finish()
}
}
pub struct STATUSrs;
impl crate::RegisterSpec for STATUSrs {
type Ux = u32;
}
impl crate::Readable for STATUSrs {}
impl crate::Resettable for STATUSrs {
const RESET_VALUE: u32 = 0x2040;
}