pub type R = crate::R<CRrs>;
pub type W = crate::W<CRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FPAW {
PreArmReset = 0,
PreArmSet = 1,
}
impl From<FPAW> for bool {
#[inline(always)]
fn from(variant: FPAW) -> Self {
variant as u8 != 0
}
}
pub type FPA_R = crate::BitReader<FPAW>;
impl FPA_R {
#[inline(always)]
pub const fn variant(&self) -> FPAW {
match self.bits {
false => FPAW::PreArmReset,
true => FPAW::PreArmSet,
}
}
#[inline(always)]
pub fn is_pre_arm_reset(&self) -> bool {
*self == FPAW::PreArmReset
}
#[inline(always)]
pub fn is_pre_arm_set(&self) -> bool {
*self == FPAW::PreArmSet
}
}
pub type FPA_W<'a, REG> = crate::BitWriter<'a, REG, FPAW>;
impl<'a, REG> FPA_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn pre_arm_reset(self) -> &'a mut crate::W<REG> {
self.variant(FPAW::PreArmReset)
}
#[inline(always)]
pub fn pre_arm_set(self) -> &'a mut crate::W<REG> {
self.variant(FPAW::PreArmSet)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum VDSR {
NotShared = 0,
Shared = 1,
}
impl From<VDSR> for bool {
#[inline(always)]
fn from(variant: VDSR) -> Self {
variant as u8 != 0
}
}
pub type VDS_R = crate::BitReader<VDSR>;
impl VDS_R {
#[inline(always)]
pub const fn variant(&self) -> VDSR {
match self.bits {
false => VDSR::NotShared,
true => VDSR::Shared,
}
}
#[inline(always)]
pub fn is_not_shared(&self) -> bool {
*self == VDSR::NotShared
}
#[inline(always)]
pub fn is_shared(&self) -> bool {
*self == VDSR::Shared
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum VDSW {
Reset = 0,
}
impl From<VDSW> for bool {
#[inline(always)]
fn from(variant: VDSW) -> Self {
variant as u8 != 0
}
}
pub type VDS_W<'a, REG> = crate::BitWriter<'a, REG, VDSW>;
impl<'a, REG> VDS_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn reset(self) -> &'a mut crate::W<REG> {
self.variant(VDSW::Reset)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum VDER {
NotExecutable = 0,
Executable = 1,
}
impl From<VDER> for bool {
#[inline(always)]
fn from(variant: VDER) -> Self {
variant as u8 != 0
}
}
pub type VDE_R = crate::BitReader<VDER>;
impl VDE_R {
#[inline(always)]
pub const fn variant(&self) -> VDER {
match self.bits {
false => VDER::NotExecutable,
true => VDER::Executable,
}
}
#[inline(always)]
pub fn is_not_executable(&self) -> bool {
*self == VDER::NotExecutable
}
#[inline(always)]
pub fn is_executable(&self) -> bool {
*self == VDER::Executable
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum VDEW {
Reset = 0,
}
impl From<VDEW> for bool {
#[inline(always)]
fn from(variant: VDEW) -> Self {
variant as u8 != 0
}
}
pub type VDE_W<'a, REG> = crate::BitWriter<'a, REG, VDEW>;
impl<'a, REG> VDE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn reset(self) -> &'a mut crate::W<REG> {
self.variant(VDEW::Reset)
}
}
impl R {
#[inline(always)]
pub fn fpa(&self) -> FPA_R {
FPA_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn vds(&self) -> VDS_R {
VDS_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn vde(&self) -> VDE_R {
VDE_R::new(((self.bits >> 2) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR")
.field("vde", &self.vde())
.field("vds", &self.vds())
.field("fpa", &self.fpa())
.finish()
}
}
impl W {
#[inline(always)]
pub fn fpa(&mut self) -> FPA_W<CRrs> {
FPA_W::new(self, 0)
}
#[inline(always)]
pub fn vds(&mut self) -> VDS_W<CRrs> {
VDS_W::new(self, 1)
}
#[inline(always)]
pub fn vde(&mut self) -> VDE_W<CRrs> {
VDE_W::new(self, 2)
}
}
pub struct CRrs;
impl crate::RegisterSpec for CRrs {
type Ux = u32;
}
impl crate::Readable for CRrs {}
impl crate::Writable for CRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CRrs {}