pub type R = crate::R<IERrs>;
pub type W = crate::W<IERrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ADRDYIE {
Disabled = 0,
Enabled = 1,
}
impl From<ADRDYIE> for bool {
#[inline(always)]
fn from(variant: ADRDYIE) -> Self {
variant as u8 != 0
}
}
pub type ADRDYIE_R = crate::BitReader<ADRDYIE>;
impl ADRDYIE_R {
#[inline(always)]
pub const fn variant(&self) -> ADRDYIE {
match self.bits {
false => ADRDYIE::Disabled,
true => ADRDYIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADRDYIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADRDYIE::Enabled
}
}
pub type ADRDYIE_W<'a, REG> = crate::BitWriter<'a, REG, ADRDYIE>;
impl<'a, REG> ADRDYIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(ADRDYIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(ADRDYIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOSMPIE {
Disabled = 0,
Enabled = 1,
}
impl From<EOSMPIE> for bool {
#[inline(always)]
fn from(variant: EOSMPIE) -> Self {
variant as u8 != 0
}
}
pub type EOSMPIE_R = crate::BitReader<EOSMPIE>;
impl EOSMPIE_R {
#[inline(always)]
pub const fn variant(&self) -> EOSMPIE {
match self.bits {
false => EOSMPIE::Disabled,
true => EOSMPIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EOSMPIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EOSMPIE::Enabled
}
}
pub type EOSMPIE_W<'a, REG> = crate::BitWriter<'a, REG, EOSMPIE>;
impl<'a, REG> EOSMPIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(EOSMPIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(EOSMPIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOCIE {
Disabled = 0,
Enabled = 1,
}
impl From<EOCIE> for bool {
#[inline(always)]
fn from(variant: EOCIE) -> Self {
variant as u8 != 0
}
}
pub type EOCIE_R = crate::BitReader<EOCIE>;
impl EOCIE_R {
#[inline(always)]
pub const fn variant(&self) -> EOCIE {
match self.bits {
false => EOCIE::Disabled,
true => EOCIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EOCIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EOCIE::Enabled
}
}
pub type EOCIE_W<'a, REG> = crate::BitWriter<'a, REG, EOCIE>;
impl<'a, REG> EOCIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(EOCIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(EOCIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOSIE {
Disabled = 0,
Enabled = 1,
}
impl From<EOSIE> for bool {
#[inline(always)]
fn from(variant: EOSIE) -> Self {
variant as u8 != 0
}
}
pub type EOSIE_R = crate::BitReader<EOSIE>;
impl EOSIE_R {
#[inline(always)]
pub const fn variant(&self) -> EOSIE {
match self.bits {
false => EOSIE::Disabled,
true => EOSIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EOSIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EOSIE::Enabled
}
}
pub type EOSIE_W<'a, REG> = crate::BitWriter<'a, REG, EOSIE>;
impl<'a, REG> EOSIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(EOSIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(EOSIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum OVRIE {
Disabled = 0,
Enabled = 1,
}
impl From<OVRIE> for bool {
#[inline(always)]
fn from(variant: OVRIE) -> Self {
variant as u8 != 0
}
}
pub type OVRIE_R = crate::BitReader<OVRIE>;
impl OVRIE_R {
#[inline(always)]
pub const fn variant(&self) -> OVRIE {
match self.bits {
false => OVRIE::Disabled,
true => OVRIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == OVRIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == OVRIE::Enabled
}
}
pub type OVRIE_W<'a, REG> = crate::BitWriter<'a, REG, OVRIE>;
impl<'a, REG> OVRIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(OVRIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(OVRIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum AWD1IE {
Disabled = 0,
Enabled = 1,
}
impl From<AWD1IE> for bool {
#[inline(always)]
fn from(variant: AWD1IE) -> Self {
variant as u8 != 0
}
}
pub type AWDIE_R = crate::BitReader<AWD1IE>;
impl AWDIE_R {
#[inline(always)]
pub const fn variant(&self) -> AWD1IE {
match self.bits {
false => AWD1IE::Disabled,
true => AWD1IE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == AWD1IE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == AWD1IE::Enabled
}
}
pub type AWDIE_W<'a, REG> = crate::BitWriter<'a, REG, AWD1IE>;
impl<'a, REG> AWDIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(AWD1IE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(AWD1IE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOCALIE {
Disabled = 0,
Enabled = 1,
}
impl From<EOCALIE> for bool {
#[inline(always)]
fn from(variant: EOCALIE) -> Self {
variant as u8 != 0
}
}
pub type EOCALIE_R = crate::BitReader<EOCALIE>;
impl EOCALIE_R {
#[inline(always)]
pub const fn variant(&self) -> EOCALIE {
match self.bits {
false => EOCALIE::Disabled,
true => EOCALIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EOCALIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EOCALIE::Enabled
}
}
pub type EOCALIE_W<'a, REG> = crate::BitWriter<'a, REG, EOCALIE>;
impl<'a, REG> EOCALIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(EOCALIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(EOCALIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CCRDYIE {
Disabled = 0,
Enabled = 1,
}
impl From<CCRDYIE> for bool {
#[inline(always)]
fn from(variant: CCRDYIE) -> Self {
variant as u8 != 0
}
}
pub type CCRDYIE_R = crate::BitReader<CCRDYIE>;
impl CCRDYIE_R {
#[inline(always)]
pub const fn variant(&self) -> CCRDYIE {
match self.bits {
false => CCRDYIE::Disabled,
true => CCRDYIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CCRDYIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CCRDYIE::Enabled
}
}
pub type CCRDYIE_W<'a, REG> = crate::BitWriter<'a, REG, CCRDYIE>;
impl<'a, REG> CCRDYIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(CCRDYIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(CCRDYIE::Enabled)
}
}
impl R {
#[inline(always)]
pub fn adrdyie(&self) -> ADRDYIE_R {
ADRDYIE_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn eosmpie(&self) -> EOSMPIE_R {
EOSMPIE_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn eocie(&self) -> EOCIE_R {
EOCIE_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn eosie(&self) -> EOSIE_R {
EOSIE_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn ovrie(&self) -> OVRIE_R {
OVRIE_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn awdie(&self, n: u8) -> AWDIE_R {
#[allow(clippy::no_effect)]
[(); 3][n as usize];
AWDIE_R::new(((self.bits >> (n + 7)) & 1) != 0)
}
#[inline(always)]
pub fn awdie_iter(&self) -> impl Iterator<Item = AWDIE_R> + '_ {
(0..3).map(move |n| AWDIE_R::new(((self.bits >> (n + 7)) & 1) != 0))
}
#[inline(always)]
pub fn awd1ie(&self) -> AWDIE_R {
AWDIE_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn awd2ie(&self) -> AWDIE_R {
AWDIE_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn awd3ie(&self) -> AWDIE_R {
AWDIE_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn eocalie(&self) -> EOCALIE_R {
EOCALIE_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn ccrdyie(&self) -> CCRDYIE_R {
CCRDYIE_R::new(((self.bits >> 13) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("IER")
.field("adrdyie", &self.adrdyie())
.field("eosmpie", &self.eosmpie())
.field("eocie", &self.eocie())
.field("eosie", &self.eosie())
.field("ovrie", &self.ovrie())
.field("awd1ie", &self.awd1ie())
.field("awd2ie", &self.awd2ie())
.field("awd3ie", &self.awd3ie())
.field("eocalie", &self.eocalie())
.field("ccrdyie", &self.ccrdyie())
.finish()
}
}
impl W {
#[inline(always)]
pub fn adrdyie(&mut self) -> ADRDYIE_W<IERrs> {
ADRDYIE_W::new(self, 0)
}
#[inline(always)]
pub fn eosmpie(&mut self) -> EOSMPIE_W<IERrs> {
EOSMPIE_W::new(self, 1)
}
#[inline(always)]
pub fn eocie(&mut self) -> EOCIE_W<IERrs> {
EOCIE_W::new(self, 2)
}
#[inline(always)]
pub fn eosie(&mut self) -> EOSIE_W<IERrs> {
EOSIE_W::new(self, 3)
}
#[inline(always)]
pub fn ovrie(&mut self) -> OVRIE_W<IERrs> {
OVRIE_W::new(self, 4)
}
#[inline(always)]
pub fn awdie(&mut self, n: u8) -> AWDIE_W<IERrs> {
#[allow(clippy::no_effect)]
[(); 3][n as usize];
AWDIE_W::new(self, n + 7)
}
#[inline(always)]
pub fn awd1ie(&mut self) -> AWDIE_W<IERrs> {
AWDIE_W::new(self, 7)
}
#[inline(always)]
pub fn awd2ie(&mut self) -> AWDIE_W<IERrs> {
AWDIE_W::new(self, 8)
}
#[inline(always)]
pub fn awd3ie(&mut self) -> AWDIE_W<IERrs> {
AWDIE_W::new(self, 9)
}
#[inline(always)]
pub fn eocalie(&mut self) -> EOCALIE_W<IERrs> {
EOCALIE_W::new(self, 11)
}
#[inline(always)]
pub fn ccrdyie(&mut self) -> CCRDYIE_W<IERrs> {
CCRDYIE_W::new(self, 13)
}
}
pub struct IERrs;
impl crate::RegisterSpec for IERrs {
type Ux = u32;
}
impl crate::Readable for IERrs {}
impl crate::Writable for IERrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for IERrs {}