pub type R = crate::R<ISRrs>;
pub type W = crate::W<ISRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ADRDYR {
NotReady = 0,
Ready = 1,
}
impl From<ADRDYR> for bool {
#[inline(always)]
fn from(variant: ADRDYR) -> Self {
variant as u8 != 0
}
}
pub type ADRDY_R = crate::BitReader<ADRDYR>;
impl ADRDY_R {
#[inline(always)]
pub const fn variant(&self) -> ADRDYR {
match self.bits {
false => ADRDYR::NotReady,
true => ADRDYR::Ready,
}
}
#[inline(always)]
pub fn is_not_ready(&self) -> bool {
*self == ADRDYR::NotReady
}
#[inline(always)]
pub fn is_ready(&self) -> bool {
*self == ADRDYR::Ready
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ADRDYW {
Clear = 1,
}
impl From<ADRDYW> for bool {
#[inline(always)]
fn from(variant: ADRDYW) -> Self {
variant as u8 != 0
}
}
pub type ADRDY_W<'a, REG> = crate::BitWriter1C<'a, REG, ADRDYW>;
impl<'a, REG> ADRDY_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(ADRDYW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOSMPR {
NotAtEnd = 0,
AtEnd = 1,
}
impl From<EOSMPR> for bool {
#[inline(always)]
fn from(variant: EOSMPR) -> Self {
variant as u8 != 0
}
}
pub type EOSMP_R = crate::BitReader<EOSMPR>;
impl EOSMP_R {
#[inline(always)]
pub const fn variant(&self) -> EOSMPR {
match self.bits {
false => EOSMPR::NotAtEnd,
true => EOSMPR::AtEnd,
}
}
#[inline(always)]
pub fn is_not_at_end(&self) -> bool {
*self == EOSMPR::NotAtEnd
}
#[inline(always)]
pub fn is_at_end(&self) -> bool {
*self == EOSMPR::AtEnd
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOSMPW {
Clear = 1,
}
impl From<EOSMPW> for bool {
#[inline(always)]
fn from(variant: EOSMPW) -> Self {
variant as u8 != 0
}
}
pub type EOSMP_W<'a, REG> = crate::BitWriter1C<'a, REG, EOSMPW>;
impl<'a, REG> EOSMP_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(EOSMPW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOCR {
NotComplete = 0,
Complete = 1,
}
impl From<EOCR> for bool {
#[inline(always)]
fn from(variant: EOCR) -> Self {
variant as u8 != 0
}
}
pub type EOC_R = crate::BitReader<EOCR>;
impl EOC_R {
#[inline(always)]
pub const fn variant(&self) -> EOCR {
match self.bits {
false => EOCR::NotComplete,
true => EOCR::Complete,
}
}
#[inline(always)]
pub fn is_not_complete(&self) -> bool {
*self == EOCR::NotComplete
}
#[inline(always)]
pub fn is_complete(&self) -> bool {
*self == EOCR::Complete
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOCW {
Clear = 1,
}
impl From<EOCW> for bool {
#[inline(always)]
fn from(variant: EOCW) -> Self {
variant as u8 != 0
}
}
pub type EOC_W<'a, REG> = crate::BitWriter1C<'a, REG, EOCW>;
impl<'a, REG> EOC_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(EOCW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOSR {
NotComplete = 0,
Complete = 1,
}
impl From<EOSR> for bool {
#[inline(always)]
fn from(variant: EOSR) -> Self {
variant as u8 != 0
}
}
pub type EOS_R = crate::BitReader<EOSR>;
impl EOS_R {
#[inline(always)]
pub const fn variant(&self) -> EOSR {
match self.bits {
false => EOSR::NotComplete,
true => EOSR::Complete,
}
}
#[inline(always)]
pub fn is_not_complete(&self) -> bool {
*self == EOSR::NotComplete
}
#[inline(always)]
pub fn is_complete(&self) -> bool {
*self == EOSR::Complete
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOSW {
Clear = 1,
}
impl From<EOSW> for bool {
#[inline(always)]
fn from(variant: EOSW) -> Self {
variant as u8 != 0
}
}
pub type EOS_W<'a, REG> = crate::BitWriter1C<'a, REG, EOSW>;
impl<'a, REG> EOS_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(EOSW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum OVRR {
NoOverrun = 0,
Overrun = 1,
}
impl From<OVRR> for bool {
#[inline(always)]
fn from(variant: OVRR) -> Self {
variant as u8 != 0
}
}
pub type OVR_R = crate::BitReader<OVRR>;
impl OVR_R {
#[inline(always)]
pub const fn variant(&self) -> OVRR {
match self.bits {
false => OVRR::NoOverrun,
true => OVRR::Overrun,
}
}
#[inline(always)]
pub fn is_no_overrun(&self) -> bool {
*self == OVRR::NoOverrun
}
#[inline(always)]
pub fn is_overrun(&self) -> bool {
*self == OVRR::Overrun
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum OVRW {
Clear = 1,
}
impl From<OVRW> for bool {
#[inline(always)]
fn from(variant: OVRW) -> Self {
variant as u8 != 0
}
}
pub type OVR_W<'a, REG> = crate::BitWriter1C<'a, REG, OVRW>;
impl<'a, REG> OVR_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(OVRW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum AWDR {
NoEvent = 0,
Event = 1,
}
impl From<AWDR> for bool {
#[inline(always)]
fn from(variant: AWDR) -> Self {
variant as u8 != 0
}
}
pub type AWD_R = crate::BitReader<AWDR>;
impl AWD_R {
#[inline(always)]
pub const fn variant(&self) -> AWDR {
match self.bits {
false => AWDR::NoEvent,
true => AWDR::Event,
}
}
#[inline(always)]
pub fn is_no_event(&self) -> bool {
*self == AWDR::NoEvent
}
#[inline(always)]
pub fn is_event(&self) -> bool {
*self == AWDR::Event
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum AWDW {
Clear = 1,
}
impl From<AWDW> for bool {
#[inline(always)]
fn from(variant: AWDW) -> Self {
variant as u8 != 0
}
}
pub type AWD_W<'a, REG> = crate::BitWriter1C<'a, REG, AWDW>;
impl<'a, REG> AWD_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(AWDW::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOCALR {
NotComplete = 0,
Complete = 1,
}
impl From<EOCALR> for bool {
#[inline(always)]
fn from(variant: EOCALR) -> Self {
variant as u8 != 0
}
}
pub type EOCAL_R = crate::BitReader<EOCALR>;
impl EOCAL_R {
#[inline(always)]
pub const fn variant(&self) -> EOCALR {
match self.bits {
false => EOCALR::NotComplete,
true => EOCALR::Complete,
}
}
#[inline(always)]
pub fn is_not_complete(&self) -> bool {
*self == EOCALR::NotComplete
}
#[inline(always)]
pub fn is_complete(&self) -> bool {
*self == EOCALR::Complete
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOCALW {
Clear = 1,
}
impl From<EOCALW> for bool {
#[inline(always)]
fn from(variant: EOCALW) -> Self {
variant as u8 != 0
}
}
pub type EOCAL_W<'a, REG> = crate::BitWriter1C<'a, REG, EOCALW>;
impl<'a, REG> EOCAL_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(EOCALW::Clear)
}
}
impl R {
#[inline(always)]
pub fn adrdy(&self) -> ADRDY_R {
ADRDY_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn eosmp(&self) -> EOSMP_R {
EOSMP_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn eoc(&self) -> EOC_R {
EOC_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn eos(&self) -> EOS_R {
EOS_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn ovr(&self) -> OVR_R {
OVR_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn awd(&self) -> AWD_R {
AWD_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn eocal(&self) -> EOCAL_R {
EOCAL_R::new(((self.bits >> 11) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ISR")
.field("adrdy", &self.adrdy())
.field("eosmp", &self.eosmp())
.field("eoc", &self.eoc())
.field("eos", &self.eos())
.field("ovr", &self.ovr())
.field("awd", &self.awd())
.field("eocal", &self.eocal())
.finish()
}
}
impl W {
#[inline(always)]
pub fn adrdy(&mut self) -> ADRDY_W<ISRrs> {
ADRDY_W::new(self, 0)
}
#[inline(always)]
pub fn eosmp(&mut self) -> EOSMP_W<ISRrs> {
EOSMP_W::new(self, 1)
}
#[inline(always)]
pub fn eoc(&mut self) -> EOC_W<ISRrs> {
EOC_W::new(self, 2)
}
#[inline(always)]
pub fn eos(&mut self) -> EOS_W<ISRrs> {
EOS_W::new(self, 3)
}
#[inline(always)]
pub fn ovr(&mut self) -> OVR_W<ISRrs> {
OVR_W::new(self, 4)
}
#[inline(always)]
pub fn awd(&mut self) -> AWD_W<ISRrs> {
AWD_W::new(self, 7)
}
#[inline(always)]
pub fn eocal(&mut self) -> EOCAL_W<ISRrs> {
EOCAL_W::new(self, 11)
}
}
pub struct ISRrs;
impl crate::RegisterSpec for ISRrs {
type Ux = u32;
}
impl crate::Readable for ISRrs {}
impl crate::Writable for ISRrs {
type Safety = crate::Unsafe;
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0x089f;
}
impl crate::Resettable for ISRrs {}