pub type R = crate::R<CR1rs>;
pub type W = crate::W<CR1rs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum UE {
Disabled = 0,
Enabled = 1,
}
impl From<UE> for bool {
#[inline(always)]
fn from(variant: UE) -> Self {
variant as u8 != 0
}
}
pub type UE_R = crate::BitReader<UE>;
impl UE_R {
#[inline(always)]
pub const fn variant(&self) -> UE {
match self.bits {
false => UE::Disabled,
true => UE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == UE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == UE::Enabled
}
}
pub type UE_W<'a, REG> = crate::BitWriter<'a, REG, UE>;
impl<'a, REG> UE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(UE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(UE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum UESM {
Disabled = 0,
Enabled = 1,
}
impl From<UESM> for bool {
#[inline(always)]
fn from(variant: UESM) -> Self {
variant as u8 != 0
}
}
pub type UESM_R = crate::BitReader<UESM>;
impl UESM_R {
#[inline(always)]
pub const fn variant(&self) -> UESM {
match self.bits {
false => UESM::Disabled,
true => UESM::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == UESM::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == UESM::Enabled
}
}
pub type UESM_W<'a, REG> = crate::BitWriter<'a, REG, UESM>;
impl<'a, REG> UESM_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(UESM::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(UESM::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RE {
Disabled = 0,
Enabled = 1,
}
impl From<RE> for bool {
#[inline(always)]
fn from(variant: RE) -> Self {
variant as u8 != 0
}
}
pub type RE_R = crate::BitReader<RE>;
impl RE_R {
#[inline(always)]
pub const fn variant(&self) -> RE {
match self.bits {
false => RE::Disabled,
true => RE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RE::Enabled
}
}
pub type RE_W<'a, REG> = crate::BitWriter<'a, REG, RE>;
impl<'a, REG> RE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(RE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(RE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TE {
Disabled = 0,
Enabled = 1,
}
impl From<TE> for bool {
#[inline(always)]
fn from(variant: TE) -> Self {
variant as u8 != 0
}
}
pub type TE_R = crate::BitReader<TE>;
impl TE_R {
#[inline(always)]
pub const fn variant(&self) -> TE {
match self.bits {
false => TE::Disabled,
true => TE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TE::Enabled
}
}
pub type TE_W<'a, REG> = crate::BitWriter<'a, REG, TE>;
impl<'a, REG> TE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(TE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(TE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum IDLEIE {
Disabled = 0,
Enabled = 1,
}
impl From<IDLEIE> for bool {
#[inline(always)]
fn from(variant: IDLEIE) -> Self {
variant as u8 != 0
}
}
pub type IDLEIE_R = crate::BitReader<IDLEIE>;
impl IDLEIE_R {
#[inline(always)]
pub const fn variant(&self) -> IDLEIE {
match self.bits {
false => IDLEIE::Disabled,
true => IDLEIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == IDLEIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == IDLEIE::Enabled
}
}
pub type IDLEIE_W<'a, REG> = crate::BitWriter<'a, REG, IDLEIE>;
impl<'a, REG> IDLEIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(IDLEIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(IDLEIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RXNEIE {
Disabled = 0,
Enabled = 1,
}
impl From<RXNEIE> for bool {
#[inline(always)]
fn from(variant: RXNEIE) -> Self {
variant as u8 != 0
}
}
pub type RXNEIE_R = crate::BitReader<RXNEIE>;
impl RXNEIE_R {
#[inline(always)]
pub const fn variant(&self) -> RXNEIE {
match self.bits {
false => RXNEIE::Disabled,
true => RXNEIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RXNEIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RXNEIE::Enabled
}
}
pub type RXNEIE_W<'a, REG> = crate::BitWriter<'a, REG, RXNEIE>;
impl<'a, REG> RXNEIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(RXNEIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(RXNEIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TCIE {
Disabled = 0,
Enabled = 1,
}
impl From<TCIE> for bool {
#[inline(always)]
fn from(variant: TCIE) -> Self {
variant as u8 != 0
}
}
pub type TCIE_R = crate::BitReader<TCIE>;
impl TCIE_R {
#[inline(always)]
pub const fn variant(&self) -> TCIE {
match self.bits {
false => TCIE::Disabled,
true => TCIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TCIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TCIE::Enabled
}
}
pub type TCIE_W<'a, REG> = crate::BitWriter<'a, REG, TCIE>;
impl<'a, REG> TCIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(TCIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(TCIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TXEIE {
Disabled = 0,
Enabled = 1,
}
impl From<TXEIE> for bool {
#[inline(always)]
fn from(variant: TXEIE) -> Self {
variant as u8 != 0
}
}
pub type TXEIE_R = crate::BitReader<TXEIE>;
impl TXEIE_R {
#[inline(always)]
pub const fn variant(&self) -> TXEIE {
match self.bits {
false => TXEIE::Disabled,
true => TXEIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TXEIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TXEIE::Enabled
}
}
pub type TXEIE_W<'a, REG> = crate::BitWriter<'a, REG, TXEIE>;
impl<'a, REG> TXEIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(TXEIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(TXEIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PEIE {
Disabled = 0,
Enabled = 1,
}
impl From<PEIE> for bool {
#[inline(always)]
fn from(variant: PEIE) -> Self {
variant as u8 != 0
}
}
pub type PEIE_R = crate::BitReader<PEIE>;
impl PEIE_R {
#[inline(always)]
pub const fn variant(&self) -> PEIE {
match self.bits {
false => PEIE::Disabled,
true => PEIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == PEIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == PEIE::Enabled
}
}
pub type PEIE_W<'a, REG> = crate::BitWriter<'a, REG, PEIE>;
impl<'a, REG> PEIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(PEIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(PEIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PS {
Even = 0,
Odd = 1,
}
impl From<PS> for bool {
#[inline(always)]
fn from(variant: PS) -> Self {
variant as u8 != 0
}
}
pub type PS_R = crate::BitReader<PS>;
impl PS_R {
#[inline(always)]
pub const fn variant(&self) -> PS {
match self.bits {
false => PS::Even,
true => PS::Odd,
}
}
#[inline(always)]
pub fn is_even(&self) -> bool {
*self == PS::Even
}
#[inline(always)]
pub fn is_odd(&self) -> bool {
*self == PS::Odd
}
}
pub type PS_W<'a, REG> = crate::BitWriter<'a, REG, PS>;
impl<'a, REG> PS_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn even(self) -> &'a mut crate::W<REG> {
self.variant(PS::Even)
}
#[inline(always)]
pub fn odd(self) -> &'a mut crate::W<REG> {
self.variant(PS::Odd)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PCE {
Disabled = 0,
Enabled = 1,
}
impl From<PCE> for bool {
#[inline(always)]
fn from(variant: PCE) -> Self {
variant as u8 != 0
}
}
pub type PCE_R = crate::BitReader<PCE>;
impl PCE_R {
#[inline(always)]
pub const fn variant(&self) -> PCE {
match self.bits {
false => PCE::Disabled,
true => PCE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == PCE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == PCE::Enabled
}
}
pub type PCE_W<'a, REG> = crate::BitWriter<'a, REG, PCE>;
impl<'a, REG> PCE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(PCE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(PCE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum WAKE {
Idle = 0,
Address = 1,
}
impl From<WAKE> for bool {
#[inline(always)]
fn from(variant: WAKE) -> Self {
variant as u8 != 0
}
}
pub type WAKE_R = crate::BitReader<WAKE>;
impl WAKE_R {
#[inline(always)]
pub const fn variant(&self) -> WAKE {
match self.bits {
false => WAKE::Idle,
true => WAKE::Address,
}
}
#[inline(always)]
pub fn is_idle(&self) -> bool {
*self == WAKE::Idle
}
#[inline(always)]
pub fn is_address(&self) -> bool {
*self == WAKE::Address
}
}
pub type WAKE_W<'a, REG> = crate::BitWriter<'a, REG, WAKE>;
impl<'a, REG> WAKE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn idle(self) -> &'a mut crate::W<REG> {
self.variant(WAKE::Idle)
}
#[inline(always)]
pub fn address(self) -> &'a mut crate::W<REG> {
self.variant(WAKE::Address)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum M0 {
Bit8 = 0,
Bit9 = 1,
}
impl From<M0> for bool {
#[inline(always)]
fn from(variant: M0) -> Self {
variant as u8 != 0
}
}
pub type M0_R = crate::BitReader<M0>;
impl M0_R {
#[inline(always)]
pub const fn variant(&self) -> M0 {
match self.bits {
false => M0::Bit8,
true => M0::Bit9,
}
}
#[inline(always)]
pub fn is_bit8(&self) -> bool {
*self == M0::Bit8
}
#[inline(always)]
pub fn is_bit9(&self) -> bool {
*self == M0::Bit9
}
}
pub type M0_W<'a, REG> = crate::BitWriter<'a, REG, M0>;
impl<'a, REG> M0_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn bit8(self) -> &'a mut crate::W<REG> {
self.variant(M0::Bit8)
}
#[inline(always)]
pub fn bit9(self) -> &'a mut crate::W<REG> {
self.variant(M0::Bit9)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum MME {
Disabled = 0,
Enabled = 1,
}
impl From<MME> for bool {
#[inline(always)]
fn from(variant: MME) -> Self {
variant as u8 != 0
}
}
pub type MME_R = crate::BitReader<MME>;
impl MME_R {
#[inline(always)]
pub const fn variant(&self) -> MME {
match self.bits {
false => MME::Disabled,
true => MME::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == MME::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == MME::Enabled
}
}
pub type MME_W<'a, REG> = crate::BitWriter<'a, REG, MME>;
impl<'a, REG> MME_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(MME::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(MME::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CMIE {
Disabled = 0,
Enabled = 1,
}
impl From<CMIE> for bool {
#[inline(always)]
fn from(variant: CMIE) -> Self {
variant as u8 != 0
}
}
pub type CMIE_R = crate::BitReader<CMIE>;
impl CMIE_R {
#[inline(always)]
pub const fn variant(&self) -> CMIE {
match self.bits {
false => CMIE::Disabled,
true => CMIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CMIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CMIE::Enabled
}
}
pub type CMIE_W<'a, REG> = crate::BitWriter<'a, REG, CMIE>;
impl<'a, REG> CMIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(CMIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(CMIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum OVER8 {
Oversampling16 = 0,
Oversampling8 = 1,
}
impl From<OVER8> for bool {
#[inline(always)]
fn from(variant: OVER8) -> Self {
variant as u8 != 0
}
}
pub type OVER8_R = crate::BitReader<OVER8>;
impl OVER8_R {
#[inline(always)]
pub const fn variant(&self) -> OVER8 {
match self.bits {
false => OVER8::Oversampling16,
true => OVER8::Oversampling8,
}
}
#[inline(always)]
pub fn is_oversampling16(&self) -> bool {
*self == OVER8::Oversampling16
}
#[inline(always)]
pub fn is_oversampling8(&self) -> bool {
*self == OVER8::Oversampling8
}
}
pub type OVER8_W<'a, REG> = crate::BitWriter<'a, REG, OVER8>;
impl<'a, REG> OVER8_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn oversampling16(self) -> &'a mut crate::W<REG> {
self.variant(OVER8::Oversampling16)
}
#[inline(always)]
pub fn oversampling8(self) -> &'a mut crate::W<REG> {
self.variant(OVER8::Oversampling8)
}
}
pub type DEDT_R = crate::FieldReader;
pub type DEDT_W<'a, REG> = crate::FieldWriter<'a, REG, 5, u8, crate::Safe>;
pub type DEAT_R = crate::FieldReader;
pub type DEAT_W<'a, REG> = crate::FieldWriter<'a, REG, 5, u8, crate::Safe>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RTOIE {
Disabled = 0,
Enabled = 1,
}
impl From<RTOIE> for bool {
#[inline(always)]
fn from(variant: RTOIE) -> Self {
variant as u8 != 0
}
}
pub type RTOIE_R = crate::BitReader<RTOIE>;
impl RTOIE_R {
#[inline(always)]
pub const fn variant(&self) -> RTOIE {
match self.bits {
false => RTOIE::Disabled,
true => RTOIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RTOIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RTOIE::Enabled
}
}
pub type RTOIE_W<'a, REG> = crate::BitWriter<'a, REG, RTOIE>;
impl<'a, REG> RTOIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(RTOIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(RTOIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EOBIE {
Disabled = 0,
Enabled = 1,
}
impl From<EOBIE> for bool {
#[inline(always)]
fn from(variant: EOBIE) -> Self {
variant as u8 != 0
}
}
pub type EOBIE_R = crate::BitReader<EOBIE>;
impl EOBIE_R {
#[inline(always)]
pub const fn variant(&self) -> EOBIE {
match self.bits {
false => EOBIE::Disabled,
true => EOBIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EOBIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EOBIE::Enabled
}
}
pub type EOBIE_W<'a, REG> = crate::BitWriter<'a, REG, EOBIE>;
impl<'a, REG> EOBIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(EOBIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(EOBIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum M1 {
M0 = 0,
Bit7 = 1,
}
impl From<M1> for bool {
#[inline(always)]
fn from(variant: M1) -> Self {
variant as u8 != 0
}
}
pub type M1_R = crate::BitReader<M1>;
impl M1_R {
#[inline(always)]
pub const fn variant(&self) -> M1 {
match self.bits {
false => M1::M0,
true => M1::Bit7,
}
}
#[inline(always)]
pub fn is_m0(&self) -> bool {
*self == M1::M0
}
#[inline(always)]
pub fn is_bit7(&self) -> bool {
*self == M1::Bit7
}
}
pub type M1_W<'a, REG> = crate::BitWriter<'a, REG, M1>;
impl<'a, REG> M1_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn m0(self) -> &'a mut crate::W<REG> {
self.variant(M1::M0)
}
#[inline(always)]
pub fn bit7(self) -> &'a mut crate::W<REG> {
self.variant(M1::Bit7)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FIFOEN {
Disabled = 0,
Enabled = 1,
}
impl From<FIFOEN> for bool {
#[inline(always)]
fn from(variant: FIFOEN) -> Self {
variant as u8 != 0
}
}
pub type FIFOEN_R = crate::BitReader<FIFOEN>;
impl FIFOEN_R {
#[inline(always)]
pub const fn variant(&self) -> FIFOEN {
match self.bits {
false => FIFOEN::Disabled,
true => FIFOEN::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == FIFOEN::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == FIFOEN::Enabled
}
}
pub type FIFOEN_W<'a, REG> = crate::BitWriter<'a, REG, FIFOEN>;
impl<'a, REG> FIFOEN_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(FIFOEN::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(FIFOEN::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TXFEIE {
Disabled = 0,
Enabled = 1,
}
impl From<TXFEIE> for bool {
#[inline(always)]
fn from(variant: TXFEIE) -> Self {
variant as u8 != 0
}
}
pub type TXFEIE_R = crate::BitReader<TXFEIE>;
impl TXFEIE_R {
#[inline(always)]
pub const fn variant(&self) -> TXFEIE {
match self.bits {
false => TXFEIE::Disabled,
true => TXFEIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TXFEIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TXFEIE::Enabled
}
}
pub type TXFEIE_W<'a, REG> = crate::BitWriter<'a, REG, TXFEIE>;
impl<'a, REG> TXFEIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(TXFEIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(TXFEIE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RXFFIE {
Disabled = 0,
Enabled = 1,
}
impl From<RXFFIE> for bool {
#[inline(always)]
fn from(variant: RXFFIE) -> Self {
variant as u8 != 0
}
}
pub type RXFFIE_R = crate::BitReader<RXFFIE>;
impl RXFFIE_R {
#[inline(always)]
pub const fn variant(&self) -> RXFFIE {
match self.bits {
false => RXFFIE::Disabled,
true => RXFFIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RXFFIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RXFFIE::Enabled
}
}
pub type RXFFIE_W<'a, REG> = crate::BitWriter<'a, REG, RXFFIE>;
impl<'a, REG> RXFFIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(RXFFIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(RXFFIE::Enabled)
}
}
impl R {
#[inline(always)]
pub fn ue(&self) -> UE_R {
UE_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn uesm(&self) -> UESM_R {
UESM_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn re(&self) -> RE_R {
RE_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn te(&self) -> TE_R {
TE_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn idleie(&self) -> IDLEIE_R {
IDLEIE_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn rxneie(&self) -> RXNEIE_R {
RXNEIE_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn tcie(&self) -> TCIE_R {
TCIE_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn txeie(&self) -> TXEIE_R {
TXEIE_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn peie(&self) -> PEIE_R {
PEIE_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn ps(&self) -> PS_R {
PS_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn pce(&self) -> PCE_R {
PCE_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn wake(&self) -> WAKE_R {
WAKE_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn m0(&self) -> M0_R {
M0_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn mme(&self) -> MME_R {
MME_R::new(((self.bits >> 13) & 1) != 0)
}
#[inline(always)]
pub fn cmie(&self) -> CMIE_R {
CMIE_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn over8(&self) -> OVER8_R {
OVER8_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn dedt(&self) -> DEDT_R {
DEDT_R::new(((self.bits >> 16) & 0x1f) as u8)
}
#[inline(always)]
pub fn deat(&self) -> DEAT_R {
DEAT_R::new(((self.bits >> 21) & 0x1f) as u8)
}
#[inline(always)]
pub fn rtoie(&self) -> RTOIE_R {
RTOIE_R::new(((self.bits >> 26) & 1) != 0)
}
#[inline(always)]
pub fn eobie(&self) -> EOBIE_R {
EOBIE_R::new(((self.bits >> 27) & 1) != 0)
}
#[inline(always)]
pub fn m1(&self) -> M1_R {
M1_R::new(((self.bits >> 28) & 1) != 0)
}
#[inline(always)]
pub fn fifoen(&self) -> FIFOEN_R {
FIFOEN_R::new(((self.bits >> 29) & 1) != 0)
}
#[inline(always)]
pub fn txfeie(&self) -> TXFEIE_R {
TXFEIE_R::new(((self.bits >> 30) & 1) != 0)
}
#[inline(always)]
pub fn rxffie(&self) -> RXFFIE_R {
RXFFIE_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR1")
.field("rxffie", &self.rxffie())
.field("txfeie", &self.txfeie())
.field("fifoen", &self.fifoen())
.field("m1", &self.m1())
.field("eobie", &self.eobie())
.field("rtoie", &self.rtoie())
.field("deat", &self.deat())
.field("dedt", &self.dedt())
.field("over8", &self.over8())
.field("cmie", &self.cmie())
.field("mme", &self.mme())
.field("m0", &self.m0())
.field("wake", &self.wake())
.field("pce", &self.pce())
.field("ps", &self.ps())
.field("peie", &self.peie())
.field("txeie", &self.txeie())
.field("tcie", &self.tcie())
.field("rxneie", &self.rxneie())
.field("idleie", &self.idleie())
.field("te", &self.te())
.field("re", &self.re())
.field("uesm", &self.uesm())
.field("ue", &self.ue())
.finish()
}
}
impl W {
#[inline(always)]
pub fn ue(&mut self) -> UE_W<CR1rs> {
UE_W::new(self, 0)
}
#[inline(always)]
pub fn uesm(&mut self) -> UESM_W<CR1rs> {
UESM_W::new(self, 1)
}
#[inline(always)]
pub fn re(&mut self) -> RE_W<CR1rs> {
RE_W::new(self, 2)
}
#[inline(always)]
pub fn te(&mut self) -> TE_W<CR1rs> {
TE_W::new(self, 3)
}
#[inline(always)]
pub fn idleie(&mut self) -> IDLEIE_W<CR1rs> {
IDLEIE_W::new(self, 4)
}
#[inline(always)]
pub fn rxneie(&mut self) -> RXNEIE_W<CR1rs> {
RXNEIE_W::new(self, 5)
}
#[inline(always)]
pub fn tcie(&mut self) -> TCIE_W<CR1rs> {
TCIE_W::new(self, 6)
}
#[inline(always)]
pub fn txeie(&mut self) -> TXEIE_W<CR1rs> {
TXEIE_W::new(self, 7)
}
#[inline(always)]
pub fn peie(&mut self) -> PEIE_W<CR1rs> {
PEIE_W::new(self, 8)
}
#[inline(always)]
pub fn ps(&mut self) -> PS_W<CR1rs> {
PS_W::new(self, 9)
}
#[inline(always)]
pub fn pce(&mut self) -> PCE_W<CR1rs> {
PCE_W::new(self, 10)
}
#[inline(always)]
pub fn wake(&mut self) -> WAKE_W<CR1rs> {
WAKE_W::new(self, 11)
}
#[inline(always)]
pub fn m0(&mut self) -> M0_W<CR1rs> {
M0_W::new(self, 12)
}
#[inline(always)]
pub fn mme(&mut self) -> MME_W<CR1rs> {
MME_W::new(self, 13)
}
#[inline(always)]
pub fn cmie(&mut self) -> CMIE_W<CR1rs> {
CMIE_W::new(self, 14)
}
#[inline(always)]
pub fn over8(&mut self) -> OVER8_W<CR1rs> {
OVER8_W::new(self, 15)
}
#[inline(always)]
pub fn dedt(&mut self) -> DEDT_W<CR1rs> {
DEDT_W::new(self, 16)
}
#[inline(always)]
pub fn deat(&mut self) -> DEAT_W<CR1rs> {
DEAT_W::new(self, 21)
}
#[inline(always)]
pub fn rtoie(&mut self) -> RTOIE_W<CR1rs> {
RTOIE_W::new(self, 26)
}
#[inline(always)]
pub fn eobie(&mut self) -> EOBIE_W<CR1rs> {
EOBIE_W::new(self, 27)
}
#[inline(always)]
pub fn m1(&mut self) -> M1_W<CR1rs> {
M1_W::new(self, 28)
}
#[inline(always)]
pub fn fifoen(&mut self) -> FIFOEN_W<CR1rs> {
FIFOEN_W::new(self, 29)
}
#[inline(always)]
pub fn txfeie(&mut self) -> TXFEIE_W<CR1rs> {
TXFEIE_W::new(self, 30)
}
#[inline(always)]
pub fn rxffie(&mut self) -> RXFFIE_W<CR1rs> {
RXFFIE_W::new(self, 31)
}
}
pub struct CR1rs;
impl crate::RegisterSpec for CR1rs {
type Ux = u32;
}
impl crate::Readable for CR1rs {}
impl crate::Writable for CR1rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CR1rs {}