#[doc = "Register `MRDROR` reader"]
pub type R = crate::R<MrdrorSpec>;
#[doc = "Field `DATA` reader - Receive Data"]
pub type DataR = crate::FieldReader;
#[doc = "RX Empty\n\nValue on reset: 1"]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Rxempty {
    #[doc = "0: Not empty"]
    NotEmpty = 0,
    #[doc = "1: Empty"]
    Empty = 1,
}
impl From<Rxempty> for bool {
    #[inline(always)]
    fn from(variant: Rxempty) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `RXEMPTY` reader - RX Empty"]
pub type RxemptyR = crate::BitReader<Rxempty>;
impl RxemptyR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Rxempty {
        match self.bits {
            false => Rxempty::NotEmpty,
            true => Rxempty::Empty,
        }
    }
    #[doc = "Not empty"]
    #[inline(always)]
    pub fn is_not_empty(&self) -> bool {
        *self == Rxempty::NotEmpty
    }
    #[doc = "Empty"]
    #[inline(always)]
    pub fn is_empty(&self) -> bool {
        *self == Rxempty::Empty
    }
}
impl R {
    #[doc = "Bits 0:7 - Receive Data"]
    #[inline(always)]
    pub fn data(&self) -> DataR {
        DataR::new((self.bits & 0xff) as u8)
    }
    #[doc = "Bit 14 - RX Empty"]
    #[inline(always)]
    pub fn rxempty(&self) -> RxemptyR {
        RxemptyR::new(((self.bits >> 14) & 1) != 0)
    }
}
#[cfg(feature = "debug")]
impl core::fmt::Debug for R {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("MRDROR")
            .field("data", &self.data())
            .field("rxempty", &self.rxempty())
            .finish()
    }
}
#[doc = "Controller Receive Data Read Only\n\nYou can [`read`](crate::Reg::read) this register and get [`mrdror::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct MrdrorSpec;
impl crate::RegisterSpec for MrdrorSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`mrdror::R`](R) reader structure"]
impl crate::Readable for MrdrorSpec {}
#[doc = "`reset()` method sets MRDROR to value 0x4000"]
impl crate::Resettable for MrdrorSpec {
    const RESET_VALUE: u32 = 0x4000;
}
