pub type R = crate::R<ISRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PE {
NoError = 0,
Error = 1,
}
impl From<PE> for bool {
#[inline(always)]
fn from(variant: PE) -> Self {
variant as u8 != 0
}
}
pub type PE_R = crate::BitReader<PE>;
impl PE_R {
#[inline(always)]
pub const fn variant(&self) -> PE {
match self.bits {
false => PE::NoError,
true => PE::Error,
}
}
#[inline(always)]
pub fn is_no_error(&self) -> bool {
*self == PE::NoError
}
#[inline(always)]
pub fn is_error(&self) -> bool {
*self == PE::Error
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FE {
NoError = 0,
Error = 1,
}
impl From<FE> for bool {
#[inline(always)]
fn from(variant: FE) -> Self {
variant as u8 != 0
}
}
pub type FE_R = crate::BitReader<FE>;
impl FE_R {
#[inline(always)]
pub const fn variant(&self) -> FE {
match self.bits {
false => FE::NoError,
true => FE::Error,
}
}
#[inline(always)]
pub fn is_no_error(&self) -> bool {
*self == FE::NoError
}
#[inline(always)]
pub fn is_error(&self) -> bool {
*self == FE::Error
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum NF {
NoNoise = 0,
Noise = 1,
}
impl From<NF> for bool {
#[inline(always)]
fn from(variant: NF) -> Self {
variant as u8 != 0
}
}
pub type NF_R = crate::BitReader<NF>;
impl NF_R {
#[inline(always)]
pub const fn variant(&self) -> NF {
match self.bits {
false => NF::NoNoise,
true => NF::Noise,
}
}
#[inline(always)]
pub fn is_no_noise(&self) -> bool {
*self == NF::NoNoise
}
#[inline(always)]
pub fn is_noise(&self) -> bool {
*self == NF::Noise
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ORE {
NoOverrun = 0,
Overrun = 1,
}
impl From<ORE> for bool {
#[inline(always)]
fn from(variant: ORE) -> Self {
variant as u8 != 0
}
}
pub type ORE_R = crate::BitReader<ORE>;
impl ORE_R {
#[inline(always)]
pub const fn variant(&self) -> ORE {
match self.bits {
false => ORE::NoOverrun,
true => ORE::Overrun,
}
}
#[inline(always)]
pub fn is_no_overrun(&self) -> bool {
*self == ORE::NoOverrun
}
#[inline(always)]
pub fn is_overrun(&self) -> bool {
*self == ORE::Overrun
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum IDLE {
NoIdle = 0,
Idle = 1,
}
impl From<IDLE> for bool {
#[inline(always)]
fn from(variant: IDLE) -> Self {
variant as u8 != 0
}
}
pub type IDLE_R = crate::BitReader<IDLE>;
impl IDLE_R {
#[inline(always)]
pub const fn variant(&self) -> IDLE {
match self.bits {
false => IDLE::NoIdle,
true => IDLE::Idle,
}
}
#[inline(always)]
pub fn is_no_idle(&self) -> bool {
*self == IDLE::NoIdle
}
#[inline(always)]
pub fn is_idle(&self) -> bool {
*self == IDLE::Idle
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RXNE {
NoData = 0,
DataReady = 1,
}
impl From<RXNE> for bool {
#[inline(always)]
fn from(variant: RXNE) -> Self {
variant as u8 != 0
}
}
pub type RXNE_R = crate::BitReader<RXNE>;
impl RXNE_R {
#[inline(always)]
pub const fn variant(&self) -> RXNE {
match self.bits {
false => RXNE::NoData,
true => RXNE::DataReady,
}
}
#[inline(always)]
pub fn is_no_data(&self) -> bool {
*self == RXNE::NoData
}
#[inline(always)]
pub fn is_data_ready(&self) -> bool {
*self == RXNE::DataReady
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TC {
TxNotComplete = 0,
TxComplete = 1,
}
impl From<TC> for bool {
#[inline(always)]
fn from(variant: TC) -> Self {
variant as u8 != 0
}
}
pub type TC_R = crate::BitReader<TC>;
impl TC_R {
#[inline(always)]
pub const fn variant(&self) -> TC {
match self.bits {
false => TC::TxNotComplete,
true => TC::TxComplete,
}
}
#[inline(always)]
pub fn is_tx_not_complete(&self) -> bool {
*self == TC::TxNotComplete
}
#[inline(always)]
pub fn is_tx_complete(&self) -> bool {
*self == TC::TxComplete
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TXE {
Full = 0,
NotFull = 1,
}
impl From<TXE> for bool {
#[inline(always)]
fn from(variant: TXE) -> Self {
variant as u8 != 0
}
}
pub type TXE_R = crate::BitReader<TXE>;
impl TXE_R {
#[inline(always)]
pub const fn variant(&self) -> TXE {
match self.bits {
false => TXE::Full,
true => TXE::NotFull,
}
}
#[inline(always)]
pub fn is_full(&self) -> bool {
*self == TXE::Full
}
#[inline(always)]
pub fn is_not_full(&self) -> bool {
*self == TXE::NotFull
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum LBDF {
NotDetected = 0,
Detected = 1,
}
impl From<LBDF> for bool {
#[inline(always)]
fn from(variant: LBDF) -> Self {
variant as u8 != 0
}
}
pub type LBDF_R = crate::BitReader<LBDF>;
impl LBDF_R {
#[inline(always)]
pub const fn variant(&self) -> LBDF {
match self.bits {
false => LBDF::NotDetected,
true => LBDF::Detected,
}
}
#[inline(always)]
pub fn is_not_detected(&self) -> bool {
*self == LBDF::NotDetected
}
#[inline(always)]
pub fn is_detected(&self) -> bool {
*self == LBDF::Detected
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CTSIF {
NotChanged = 0,
Changed = 1,
}
impl From<CTSIF> for bool {
#[inline(always)]
fn from(variant: CTSIF) -> Self {
variant as u8 != 0
}
}
pub type CTSIF_R = crate::BitReader<CTSIF>;
impl CTSIF_R {
#[inline(always)]
pub const fn variant(&self) -> CTSIF {
match self.bits {
false => CTSIF::NotChanged,
true => CTSIF::Changed,
}
}
#[inline(always)]
pub fn is_not_changed(&self) -> bool {
*self == CTSIF::NotChanged
}
#[inline(always)]
pub fn is_changed(&self) -> bool {
*self == CTSIF::Changed
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CTS {
Set = 0,
Reset = 1,
}
impl From<CTS> for bool {
#[inline(always)]
fn from(variant: CTS) -> Self {
variant as u8 != 0
}
}
pub type CTS_R = crate::BitReader<CTS>;
impl CTS_R {
#[inline(always)]
pub const fn variant(&self) -> CTS {
match self.bits {
false => CTS::Set,
true => CTS::Reset,
}
}
#[inline(always)]
pub fn is_set(&self) -> bool {
*self == CTS::Set
}
#[inline(always)]
pub fn is_reset(&self) -> bool {
*self == CTS::Reset
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RTOF {
NotReached = 0,
Reached = 1,
}
impl From<RTOF> for bool {
#[inline(always)]
fn from(variant: RTOF) -> Self {
variant as u8 != 0
}
}
pub type RTOF_R = crate::BitReader<RTOF>;
impl RTOF_R {
#[inline(always)]
pub const fn variant(&self) -> RTOF {
match self.bits {
false => RTOF::NotReached,
true => RTOF::Reached,
}
}
#[inline(always)]
pub fn is_not_reached(&self) -> bool {
*self == RTOF::NotReached
}
#[inline(always)]
pub fn is_reached(&self) -> bool {
*self == RTOF::Reached
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOBF {
NotReached = 0,
Reached = 1,
}
impl From<EOBF> for bool {
#[inline(always)]
fn from(variant: EOBF) -> Self {
variant as u8 != 0
}
}
pub type EOBF_R = crate::BitReader<EOBF>;
impl EOBF_R {
#[inline(always)]
pub const fn variant(&self) -> EOBF {
match self.bits {
false => EOBF::NotReached,
true => EOBF::Reached,
}
}
#[inline(always)]
pub fn is_not_reached(&self) -> bool {
*self == EOBF::NotReached
}
#[inline(always)]
pub fn is_reached(&self) -> bool {
*self == EOBF::Reached
}
}
pub type ABRE_R = crate::BitReader;
pub type ABRF_R = crate::BitReader;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum BUSY {
Idle = 0,
Busy = 1,
}
impl From<BUSY> for bool {
#[inline(always)]
fn from(variant: BUSY) -> Self {
variant as u8 != 0
}
}
pub type BUSY_R = crate::BitReader<BUSY>;
impl BUSY_R {
#[inline(always)]
pub const fn variant(&self) -> BUSY {
match self.bits {
false => BUSY::Idle,
true => BUSY::Busy,
}
}
#[inline(always)]
pub fn is_idle(&self) -> bool {
*self == BUSY::Idle
}
#[inline(always)]
pub fn is_busy(&self) -> bool {
*self == BUSY::Busy
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CMF {
NoMatch = 0,
Match = 1,
}
impl From<CMF> for bool {
#[inline(always)]
fn from(variant: CMF) -> Self {
variant as u8 != 0
}
}
pub type CMF_R = crate::BitReader<CMF>;
impl CMF_R {
#[inline(always)]
pub const fn variant(&self) -> CMF {
match self.bits {
false => CMF::NoMatch,
true => CMF::Match,
}
}
#[inline(always)]
pub fn is_no_match(&self) -> bool {
*self == CMF::NoMatch
}
#[inline(always)]
pub fn is_match(&self) -> bool {
*self == CMF::Match
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum SBKF {
NoBreak = 0,
Break = 1,
}
impl From<SBKF> for bool {
#[inline(always)]
fn from(variant: SBKF) -> Self {
variant as u8 != 0
}
}
pub type SBKF_R = crate::BitReader<SBKF>;
impl SBKF_R {
#[inline(always)]
pub const fn variant(&self) -> SBKF {
match self.bits {
false => SBKF::NoBreak,
true => SBKF::Break,
}
}
#[inline(always)]
pub fn is_no_break(&self) -> bool {
*self == SBKF::NoBreak
}
#[inline(always)]
pub fn is_break(&self) -> bool {
*self == SBKF::Break
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RWU {
Active = 0,
Mute = 1,
}
impl From<RWU> for bool {
#[inline(always)]
fn from(variant: RWU) -> Self {
variant as u8 != 0
}
}
pub type RWU_R = crate::BitReader<RWU>;
impl RWU_R {
#[inline(always)]
pub const fn variant(&self) -> RWU {
match self.bits {
false => RWU::Active,
true => RWU::Mute,
}
}
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == RWU::Active
}
#[inline(always)]
pub fn is_mute(&self) -> bool {
*self == RWU::Mute
}
}
pub type WUF_R = crate::BitReader;
pub type TEACK_R = crate::BitReader;
pub type REACK_R = crate::BitReader;
impl R {
#[inline(always)]
pub fn pe(&self) -> PE_R {
PE_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn fe(&self) -> FE_R {
FE_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn nf(&self) -> NF_R {
NF_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn ore(&self) -> ORE_R {
ORE_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn idle(&self) -> IDLE_R {
IDLE_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn rxne(&self) -> RXNE_R {
RXNE_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn tc(&self) -> TC_R {
TC_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn txe(&self) -> TXE_R {
TXE_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn lbdf(&self) -> LBDF_R {
LBDF_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn ctsif(&self) -> CTSIF_R {
CTSIF_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn cts(&self) -> CTS_R {
CTS_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn rtof(&self) -> RTOF_R {
RTOF_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn eobf(&self) -> EOBF_R {
EOBF_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn abre(&self) -> ABRE_R {
ABRE_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn abrf(&self) -> ABRF_R {
ABRF_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn busy(&self) -> BUSY_R {
BUSY_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn cmf(&self) -> CMF_R {
CMF_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn sbkf(&self) -> SBKF_R {
SBKF_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn rwu(&self) -> RWU_R {
RWU_R::new(((self.bits >> 19) & 1) != 0)
}
#[inline(always)]
pub fn wuf(&self) -> WUF_R {
WUF_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn teack(&self) -> TEACK_R {
TEACK_R::new(((self.bits >> 21) & 1) != 0)
}
#[inline(always)]
pub fn reack(&self) -> REACK_R {
REACK_R::new(((self.bits >> 22) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ISR")
.field("reack", &self.reack())
.field("teack", &self.teack())
.field("wuf", &self.wuf())
.field("rwu", &self.rwu())
.field("sbkf", &self.sbkf())
.field("cmf", &self.cmf())
.field("busy", &self.busy())
.field("abrf", &self.abrf())
.field("abre", &self.abre())
.field("eobf", &self.eobf())
.field("rtof", &self.rtof())
.field("cts", &self.cts())
.field("ctsif", &self.ctsif())
.field("lbdf", &self.lbdf())
.field("txe", &self.txe())
.field("tc", &self.tc())
.field("rxne", &self.rxne())
.field("idle", &self.idle())
.field("ore", &self.ore())
.field("nf", &self.nf())
.field("fe", &self.fe())
.field("pe", &self.pe())
.finish()
}
}
pub struct ISRrs;
impl crate::RegisterSpec for ISRrs {
type Ux = u32;
}
impl crate::Readable for ISRrs {}
impl crate::Resettable for ISRrs {
const RESET_VALUE: u32 = 0xc0;
}