pub type R = crate::R<FCRrs>;
pub type W = crate::W<FCRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CTEF {
Clear = 1,
}
impl From<CTEF> for bool {
#[inline(always)]
fn from(variant: CTEF) -> Self {
variant as u8 != 0
}
}
pub type CTEF_R = crate::BitReader<CTEF>;
impl CTEF_R {
#[inline(always)]
pub const fn variant(&self) -> Option<CTEF> {
match self.bits {
true => Some(CTEF::Clear),
_ => None,
}
}
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == CTEF::Clear
}
}
pub type CTEF_W<'a, REG> = crate::BitWriter<'a, REG, CTEF>;
impl<'a, REG> CTEF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(CTEF::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CTCF {
Clear = 1,
}
impl From<CTCF> for bool {
#[inline(always)]
fn from(variant: CTCF) -> Self {
variant as u8 != 0
}
}
pub type CTCF_R = crate::BitReader<CTCF>;
impl CTCF_R {
#[inline(always)]
pub const fn variant(&self) -> Option<CTCF> {
match self.bits {
true => Some(CTCF::Clear),
_ => None,
}
}
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == CTCF::Clear
}
}
pub type CTCF_W<'a, REG> = crate::BitWriter<'a, REG, CTCF>;
impl<'a, REG> CTCF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(CTCF::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CSMF {
Clear = 1,
}
impl From<CSMF> for bool {
#[inline(always)]
fn from(variant: CSMF) -> Self {
variant as u8 != 0
}
}
pub type CSMF_R = crate::BitReader<CSMF>;
impl CSMF_R {
#[inline(always)]
pub const fn variant(&self) -> Option<CSMF> {
match self.bits {
true => Some(CSMF::Clear),
_ => None,
}
}
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == CSMF::Clear
}
}
pub type CSMF_W<'a, REG> = crate::BitWriter<'a, REG, CSMF>;
impl<'a, REG> CSMF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(CSMF::Clear)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CTOF {
Clear = 1,
}
impl From<CTOF> for bool {
#[inline(always)]
fn from(variant: CTOF) -> Self {
variant as u8 != 0
}
}
pub type CTOF_R = crate::BitReader<CTOF>;
impl CTOF_R {
#[inline(always)]
pub const fn variant(&self) -> Option<CTOF> {
match self.bits {
true => Some(CTOF::Clear),
_ => None,
}
}
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == CTOF::Clear
}
}
pub type CTOF_W<'a, REG> = crate::BitWriter<'a, REG, CTOF>;
impl<'a, REG> CTOF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(CTOF::Clear)
}
}
impl R {
#[inline(always)]
pub fn ctef(&self) -> CTEF_R {
CTEF_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn ctcf(&self) -> CTCF_R {
CTCF_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn csmf(&self) -> CSMF_R {
CSMF_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn ctof(&self) -> CTOF_R {
CTOF_R::new(((self.bits >> 4) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("FCR")
.field("ctef", &self.ctef())
.field("ctcf", &self.ctcf())
.field("csmf", &self.csmf())
.field("ctof", &self.ctof())
.finish()
}
}
impl W {
#[inline(always)]
pub fn ctef(&mut self) -> CTEF_W<FCRrs> {
CTEF_W::new(self, 0)
}
#[inline(always)]
pub fn ctcf(&mut self) -> CTCF_W<FCRrs> {
CTCF_W::new(self, 1)
}
#[inline(always)]
pub fn csmf(&mut self) -> CSMF_W<FCRrs> {
CSMF_W::new(self, 3)
}
#[inline(always)]
pub fn ctof(&mut self) -> CTOF_W<FCRrs> {
CTOF_W::new(self, 4)
}
}
pub struct FCRrs;
impl crate::RegisterSpec for FCRrs {
type Ux = u32;
}
impl crate::Readable for FCRrs {}
impl crate::Writable for FCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for FCRrs {}