pub type R = crate::R<CSRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ADRDY_MST {
NotReady = 0,
Ready = 1,
}
impl From<ADRDY_MST> for bool {
#[inline(always)]
fn from(variant: ADRDY_MST) -> Self {
variant as u8 != 0
}
}
pub type ADRDY_MST_R = crate::BitReader<ADRDY_MST>;
impl ADRDY_MST_R {
#[inline(always)]
pub const fn variant(&self) -> ADRDY_MST {
match self.bits {
false => ADRDY_MST::NotReady,
true => ADRDY_MST::Ready,
}
}
#[inline(always)]
pub fn is_not_ready(&self) -> bool {
*self == ADRDY_MST::NotReady
}
#[inline(always)]
pub fn is_ready(&self) -> bool {
*self == ADRDY_MST::Ready
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOSMP_MST {
NotEnded = 0,
Ended = 1,
}
impl From<EOSMP_MST> for bool {
#[inline(always)]
fn from(variant: EOSMP_MST) -> Self {
variant as u8 != 0
}
}
pub type EOSMP_MST_R = crate::BitReader<EOSMP_MST>;
impl EOSMP_MST_R {
#[inline(always)]
pub const fn variant(&self) -> EOSMP_MST {
match self.bits {
false => EOSMP_MST::NotEnded,
true => EOSMP_MST::Ended,
}
}
#[inline(always)]
pub fn is_not_ended(&self) -> bool {
*self == EOSMP_MST::NotEnded
}
#[inline(always)]
pub fn is_ended(&self) -> bool {
*self == EOSMP_MST::Ended
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOC_MST {
NotComplete = 0,
Complete = 1,
}
impl From<EOC_MST> for bool {
#[inline(always)]
fn from(variant: EOC_MST) -> Self {
variant as u8 != 0
}
}
pub type EOC_MST_R = crate::BitReader<EOC_MST>;
impl EOC_MST_R {
#[inline(always)]
pub const fn variant(&self) -> EOC_MST {
match self.bits {
false => EOC_MST::NotComplete,
true => EOC_MST::Complete,
}
}
#[inline(always)]
pub fn is_not_complete(&self) -> bool {
*self == EOC_MST::NotComplete
}
#[inline(always)]
pub fn is_complete(&self) -> bool {
*self == EOC_MST::Complete
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOS_MST {
NotComplete = 0,
Complete = 1,
}
impl From<EOS_MST> for bool {
#[inline(always)]
fn from(variant: EOS_MST) -> Self {
variant as u8 != 0
}
}
pub type EOS_MST_R = crate::BitReader<EOS_MST>;
impl EOS_MST_R {
#[inline(always)]
pub const fn variant(&self) -> EOS_MST {
match self.bits {
false => EOS_MST::NotComplete,
true => EOS_MST::Complete,
}
}
#[inline(always)]
pub fn is_not_complete(&self) -> bool {
*self == EOS_MST::NotComplete
}
#[inline(always)]
pub fn is_complete(&self) -> bool {
*self == EOS_MST::Complete
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum OVR_MST {
NoOverrun = 0,
Overrun = 1,
}
impl From<OVR_MST> for bool {
#[inline(always)]
fn from(variant: OVR_MST) -> Self {
variant as u8 != 0
}
}
pub type OVR_MST_R = crate::BitReader<OVR_MST>;
impl OVR_MST_R {
#[inline(always)]
pub const fn variant(&self) -> OVR_MST {
match self.bits {
false => OVR_MST::NoOverrun,
true => OVR_MST::Overrun,
}
}
#[inline(always)]
pub fn is_no_overrun(&self) -> bool {
*self == OVR_MST::NoOverrun
}
#[inline(always)]
pub fn is_overrun(&self) -> bool {
*self == OVR_MST::Overrun
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum JEOC_MST {
NotComplete = 0,
Complete = 1,
}
impl From<JEOC_MST> for bool {
#[inline(always)]
fn from(variant: JEOC_MST) -> Self {
variant as u8 != 0
}
}
pub type JEOC_MST_R = crate::BitReader<JEOC_MST>;
impl JEOC_MST_R {
#[inline(always)]
pub const fn variant(&self) -> JEOC_MST {
match self.bits {
false => JEOC_MST::NotComplete,
true => JEOC_MST::Complete,
}
}
#[inline(always)]
pub fn is_not_complete(&self) -> bool {
*self == JEOC_MST::NotComplete
}
#[inline(always)]
pub fn is_complete(&self) -> bool {
*self == JEOC_MST::Complete
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum JEOS_MST {
NotComplete = 0,
Complete = 1,
}
impl From<JEOS_MST> for bool {
#[inline(always)]
fn from(variant: JEOS_MST) -> Self {
variant as u8 != 0
}
}
pub type JEOS_MST_R = crate::BitReader<JEOS_MST>;
impl JEOS_MST_R {
#[inline(always)]
pub const fn variant(&self) -> JEOS_MST {
match self.bits {
false => JEOS_MST::NotComplete,
true => JEOS_MST::Complete,
}
}
#[inline(always)]
pub fn is_not_complete(&self) -> bool {
*self == JEOS_MST::NotComplete
}
#[inline(always)]
pub fn is_complete(&self) -> bool {
*self == JEOS_MST::Complete
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum AWD1_MST {
NoEvent = 0,
Event = 1,
}
impl From<AWD1_MST> for bool {
#[inline(always)]
fn from(variant: AWD1_MST) -> Self {
variant as u8 != 0
}
}
pub type AWD1_MST_R = crate::BitReader<AWD1_MST>;
impl AWD1_MST_R {
#[inline(always)]
pub const fn variant(&self) -> AWD1_MST {
match self.bits {
false => AWD1_MST::NoEvent,
true => AWD1_MST::Event,
}
}
#[inline(always)]
pub fn is_no_event(&self) -> bool {
*self == AWD1_MST::NoEvent
}
#[inline(always)]
pub fn is_event(&self) -> bool {
*self == AWD1_MST::Event
}
}
pub use AWD1_MST_R as AWD2_MST_R;
pub use AWD1_MST_R as AWD3_MST_R;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum JQOVF_MST {
NoOverflow = 0,
Overflow = 1,
}
impl From<JQOVF_MST> for bool {
#[inline(always)]
fn from(variant: JQOVF_MST) -> Self {
variant as u8 != 0
}
}
pub type JQOVF_MST_R = crate::BitReader<JQOVF_MST>;
impl JQOVF_MST_R {
#[inline(always)]
pub const fn variant(&self) -> JQOVF_MST {
match self.bits {
false => JQOVF_MST::NoOverflow,
true => JQOVF_MST::Overflow,
}
}
#[inline(always)]
pub fn is_no_overflow(&self) -> bool {
*self == JQOVF_MST::NoOverflow
}
#[inline(always)]
pub fn is_overflow(&self) -> bool {
*self == JQOVF_MST::Overflow
}
}
pub use ADRDY_MST_R as ADRDY_SLV_R;
pub use AWD1_MST_R as AWD1_SLV_R;
pub use AWD1_MST_R as AWD2_SLV_R;
pub use AWD1_MST_R as AWD3_SLV_R;
pub use EOC_MST_R as EOC_SLV_R;
pub use EOSMP_MST_R as EOSMP_SLV_R;
pub use EOS_MST_R as EOS_SLV_R;
pub use JEOC_MST_R as JEOC_SLV_R;
pub use JEOS_MST_R as JEOS_SLV_R;
pub use JQOVF_MST_R as JQOVF_SLV_R;
pub use OVR_MST_R as OVR_SLV_R;
impl R {
#[inline(always)]
pub fn adrdy_mst(&self) -> ADRDY_MST_R {
ADRDY_MST_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn eosmp_mst(&self) -> EOSMP_MST_R {
EOSMP_MST_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn eoc_mst(&self) -> EOC_MST_R {
EOC_MST_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn eos_mst(&self) -> EOS_MST_R {
EOS_MST_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn ovr_mst(&self) -> OVR_MST_R {
OVR_MST_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn jeoc_mst(&self) -> JEOC_MST_R {
JEOC_MST_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn jeos_mst(&self) -> JEOS_MST_R {
JEOS_MST_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn awd1_mst(&self) -> AWD1_MST_R {
AWD1_MST_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn awd2_mst(&self) -> AWD2_MST_R {
AWD2_MST_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn awd3_mst(&self) -> AWD3_MST_R {
AWD3_MST_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn jqovf_mst(&self) -> JQOVF_MST_R {
JQOVF_MST_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn adrdy_slv(&self) -> ADRDY_SLV_R {
ADRDY_SLV_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn eosmp_slv(&self) -> EOSMP_SLV_R {
EOSMP_SLV_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn eoc_slv(&self) -> EOC_SLV_R {
EOC_SLV_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn eos_slv(&self) -> EOS_SLV_R {
EOS_SLV_R::new(((self.bits >> 19) & 1) != 0)
}
#[inline(always)]
pub fn ovr_slv(&self) -> OVR_SLV_R {
OVR_SLV_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn jeoc_slv(&self) -> JEOC_SLV_R {
JEOC_SLV_R::new(((self.bits >> 21) & 1) != 0)
}
#[inline(always)]
pub fn jeos_slv(&self) -> JEOS_SLV_R {
JEOS_SLV_R::new(((self.bits >> 22) & 1) != 0)
}
#[inline(always)]
pub fn awd1_slv(&self) -> AWD1_SLV_R {
AWD1_SLV_R::new(((self.bits >> 23) & 1) != 0)
}
#[inline(always)]
pub fn awd2_slv(&self) -> AWD2_SLV_R {
AWD2_SLV_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn awd3_slv(&self) -> AWD3_SLV_R {
AWD3_SLV_R::new(((self.bits >> 25) & 1) != 0)
}
#[inline(always)]
pub fn jqovf_slv(&self) -> JQOVF_SLV_R {
JQOVF_SLV_R::new(((self.bits >> 26) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CSR")
.field("adrdy_mst", &self.adrdy_mst())
.field("eosmp_mst", &self.eosmp_mst())
.field("eoc_mst", &self.eoc_mst())
.field("eos_mst", &self.eos_mst())
.field("ovr_mst", &self.ovr_mst())
.field("jeoc_mst", &self.jeoc_mst())
.field("jeos_mst", &self.jeos_mst())
.field("awd1_mst", &self.awd1_mst())
.field("awd2_mst", &self.awd2_mst())
.field("awd3_mst", &self.awd3_mst())
.field("jqovf_mst", &self.jqovf_mst())
.field("adrdy_slv", &self.adrdy_slv())
.field("eosmp_slv", &self.eosmp_slv())
.field("eoc_slv", &self.eoc_slv())
.field("eos_slv", &self.eos_slv())
.field("ovr_slv", &self.ovr_slv())
.field("jeoc_slv", &self.jeoc_slv())
.field("jeos_slv", &self.jeos_slv())
.field("awd1_slv", &self.awd1_slv())
.field("awd2_slv", &self.awd2_slv())
.field("awd3_slv", &self.awd3_slv())
.field("jqovf_slv", &self.jqovf_slv())
.finish()
}
}
pub struct CSRrs;
impl crate::RegisterSpec for CSRrs {
type Ux = u32;
}
impl crate::Readable for CSRrs {}
impl crate::Resettable for CSRrs {}