pub type R = crate::R<CRrs>;
pub type W = crate::W<CRrs>;
pub type CKPSC_R = crate::FieldReader;
pub type CKPSC_W<'a, REG> = crate::FieldWriter<'a, REG, 3, u8, crate::Safe>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CONT {
SingleShot = 0,
Continuous = 1,
}
impl From<CONT> for bool {
#[inline(always)]
fn from(variant: CONT) -> Self {
variant as u8 != 0
}
}
pub type CONT_R = crate::BitReader<CONT>;
impl CONT_R {
#[inline(always)]
pub const fn variant(&self) -> CONT {
match self.bits {
false => CONT::SingleShot,
true => CONT::Continuous,
}
}
#[inline(always)]
pub fn is_single_shot(&self) -> bool {
*self == CONT::SingleShot
}
#[inline(always)]
pub fn is_continuous(&self) -> bool {
*self == CONT::Continuous
}
}
pub type CONT_W<'a, REG> = crate::BitWriter<'a, REG, CONT>;
impl<'a, REG> CONT_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn single_shot(self) -> &'a mut crate::W<REG> {
self.variant(CONT::SingleShot)
}
#[inline(always)]
pub fn continuous(self) -> &'a mut crate::W<REG> {
self.variant(CONT::Continuous)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RETRIG {
Disabled = 0,
Enabled = 1,
}
impl From<RETRIG> for bool {
#[inline(always)]
fn from(variant: RETRIG) -> Self {
variant as u8 != 0
}
}
pub type RETRIG_R = crate::BitReader<RETRIG>;
impl RETRIG_R {
#[inline(always)]
pub const fn variant(&self) -> RETRIG {
match self.bits {
false => RETRIG::Disabled,
true => RETRIG::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RETRIG::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RETRIG::Enabled
}
}
pub type RETRIG_W<'a, REG> = crate::BitWriter<'a, REG, RETRIG>;
impl<'a, REG> RETRIG_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(RETRIG::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(RETRIG::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum HALF {
Disabled = 0,
Enabled = 1,
}
impl From<HALF> for bool {
#[inline(always)]
fn from(variant: HALF) -> Self {
variant as u8 != 0
}
}
pub type HALF_R = crate::BitReader<HALF>;
impl HALF_R {
#[inline(always)]
pub const fn variant(&self) -> HALF {
match self.bits {
false => HALF::Disabled,
true => HALF::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == HALF::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == HALF::Enabled
}
}
pub type HALF_W<'a, REG> = crate::BitWriter<'a, REG, HALF>;
impl<'a, REG> HALF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(HALF::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(HALF::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum SYNCIN {
Disabled = 0,
Internal = 2,
External = 3,
}
impl From<SYNCIN> for u8 {
#[inline(always)]
fn from(variant: SYNCIN) -> Self {
variant as _
}
}
impl crate::FieldSpec for SYNCIN {
type Ux = u8;
}
impl crate::IsEnum for SYNCIN {}
pub type SYNCIN_R = crate::FieldReader<SYNCIN>;
impl SYNCIN_R {
#[inline(always)]
pub const fn variant(&self) -> Option<SYNCIN> {
match self.bits {
0 => Some(SYNCIN::Disabled),
2 => Some(SYNCIN::Internal),
3 => Some(SYNCIN::External),
_ => None,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SYNCIN::Disabled
}
#[inline(always)]
pub fn is_internal(&self) -> bool {
*self == SYNCIN::Internal
}
#[inline(always)]
pub fn is_external(&self) -> bool {
*self == SYNCIN::External
}
}
pub type SYNCIN_W<'a, REG> = crate::FieldWriter<'a, REG, 2, SYNCIN>;
impl<'a, REG> SYNCIN_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(SYNCIN::Disabled)
}
#[inline(always)]
pub fn internal(self) -> &'a mut crate::W<REG> {
self.variant(SYNCIN::Internal)
}
#[inline(always)]
pub fn external(self) -> &'a mut crate::W<REG> {
self.variant(SYNCIN::External)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum SYNCRST {
Disabled = 0,
Reset = 1,
}
impl From<SYNCRST> for bool {
#[inline(always)]
fn from(variant: SYNCRST) -> Self {
variant as u8 != 0
}
}
pub type SYNCRST_R = crate::BitReader<SYNCRST>;
impl SYNCRST_R {
#[inline(always)]
pub const fn variant(&self) -> SYNCRST {
match self.bits {
false => SYNCRST::Disabled,
true => SYNCRST::Reset,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SYNCRST::Disabled
}
#[inline(always)]
pub fn is_reset(&self) -> bool {
*self == SYNCRST::Reset
}
}
pub type SYNCRST_W<'a, REG> = crate::BitWriter<'a, REG, SYNCRST>;
impl<'a, REG> SYNCRST_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(SYNCRST::Disabled)
}
#[inline(always)]
pub fn reset(self) -> &'a mut crate::W<REG> {
self.variant(SYNCRST::Reset)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum SYNCSTRT {
Disabled = 0,
Start = 1,
}
impl From<SYNCSTRT> for bool {
#[inline(always)]
fn from(variant: SYNCSTRT) -> Self {
variant as u8 != 0
}
}
pub type SYNCSTRT_R = crate::BitReader<SYNCSTRT>;
impl SYNCSTRT_R {
#[inline(always)]
pub const fn variant(&self) -> SYNCSTRT {
match self.bits {
false => SYNCSTRT::Disabled,
true => SYNCSTRT::Start,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SYNCSTRT::Disabled
}
#[inline(always)]
pub fn is_start(&self) -> bool {
*self == SYNCSTRT::Start
}
}
pub type SYNCSTRT_W<'a, REG> = crate::BitWriter<'a, REG, SYNCSTRT>;
impl<'a, REG> SYNCSTRT_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(SYNCSTRT::Disabled)
}
#[inline(always)]
pub fn start(self) -> &'a mut crate::W<REG> {
self.variant(SYNCSTRT::Start)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum SYNCOUT {
Disabled = 0,
PositivePulse = 2,
NegativePulse = 3,
}
impl From<SYNCOUT> for u8 {
#[inline(always)]
fn from(variant: SYNCOUT) -> Self {
variant as _
}
}
impl crate::FieldSpec for SYNCOUT {
type Ux = u8;
}
impl crate::IsEnum for SYNCOUT {}
pub type SYNCOUT_R = crate::FieldReader<SYNCOUT>;
impl SYNCOUT_R {
#[inline(always)]
pub const fn variant(&self) -> Option<SYNCOUT> {
match self.bits {
0 => Some(SYNCOUT::Disabled),
2 => Some(SYNCOUT::PositivePulse),
3 => Some(SYNCOUT::NegativePulse),
_ => None,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SYNCOUT::Disabled
}
#[inline(always)]
pub fn is_positive_pulse(&self) -> bool {
*self == SYNCOUT::PositivePulse
}
#[inline(always)]
pub fn is_negative_pulse(&self) -> bool {
*self == SYNCOUT::NegativePulse
}
}
pub type SYNCOUT_W<'a, REG> = crate::FieldWriter<'a, REG, 2, SYNCOUT>;
impl<'a, REG> SYNCOUT_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(SYNCOUT::Disabled)
}
#[inline(always)]
pub fn positive_pulse(self) -> &'a mut crate::W<REG> {
self.variant(SYNCOUT::PositivePulse)
}
#[inline(always)]
pub fn negative_pulse(self) -> &'a mut crate::W<REG> {
self.variant(SYNCOUT::NegativePulse)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum SYNCSRC {
MasterStart = 0,
MasterCompare1 = 1,
TimerAstart = 2,
TimerAcompare1 = 3,
}
impl From<SYNCSRC> for u8 {
#[inline(always)]
fn from(variant: SYNCSRC) -> Self {
variant as _
}
}
impl crate::FieldSpec for SYNCSRC {
type Ux = u8;
}
impl crate::IsEnum for SYNCSRC {}
pub type SYNCSRC_R = crate::FieldReader<SYNCSRC>;
impl SYNCSRC_R {
#[inline(always)]
pub const fn variant(&self) -> SYNCSRC {
match self.bits {
0 => SYNCSRC::MasterStart,
1 => SYNCSRC::MasterCompare1,
2 => SYNCSRC::TimerAstart,
3 => SYNCSRC::TimerAcompare1,
_ => unreachable!(),
}
}
#[inline(always)]
pub fn is_master_start(&self) -> bool {
*self == SYNCSRC::MasterStart
}
#[inline(always)]
pub fn is_master_compare1(&self) -> bool {
*self == SYNCSRC::MasterCompare1
}
#[inline(always)]
pub fn is_timer_astart(&self) -> bool {
*self == SYNCSRC::TimerAstart
}
#[inline(always)]
pub fn is_timer_acompare1(&self) -> bool {
*self == SYNCSRC::TimerAcompare1
}
}
pub type SYNCSRC_W<'a, REG> = crate::FieldWriter<'a, REG, 2, SYNCSRC, crate::Safe>;
impl<'a, REG> SYNCSRC_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn master_start(self) -> &'a mut crate::W<REG> {
self.variant(SYNCSRC::MasterStart)
}
#[inline(always)]
pub fn master_compare1(self) -> &'a mut crate::W<REG> {
self.variant(SYNCSRC::MasterCompare1)
}
#[inline(always)]
pub fn timer_astart(self) -> &'a mut crate::W<REG> {
self.variant(SYNCSRC::TimerAstart)
}
#[inline(always)]
pub fn timer_acompare1(self) -> &'a mut crate::W<REG> {
self.variant(SYNCSRC::TimerAcompare1)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum MCEN {
Disabled = 0,
Enabled = 1,
}
impl From<MCEN> for bool {
#[inline(always)]
fn from(variant: MCEN) -> Self {
variant as u8 != 0
}
}
pub type MCEN_R = crate::BitReader<MCEN>;
impl MCEN_R {
#[inline(always)]
pub const fn variant(&self) -> MCEN {
match self.bits {
false => MCEN::Disabled,
true => MCEN::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == MCEN::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == MCEN::Enabled
}
}
pub type MCEN_W<'a, REG> = crate::BitWriter<'a, REG, MCEN>;
impl<'a, REG> MCEN_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(MCEN::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(MCEN::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TACEN {
Disabled = 0,
Enabled = 1,
}
impl From<TACEN> for bool {
#[inline(always)]
fn from(variant: TACEN) -> Self {
variant as u8 != 0
}
}
pub type TCEN_R = crate::BitReader<TACEN>;
impl TCEN_R {
#[inline(always)]
pub const fn variant(&self) -> TACEN {
match self.bits {
false => TACEN::Disabled,
true => TACEN::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TACEN::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TACEN::Enabled
}
}
pub type TCEN_W<'a, REG> = crate::BitWriter<'a, REG, TACEN>;
impl<'a, REG> TCEN_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(TACEN::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(TACEN::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum DACSYNC {
Disabled = 0,
Dacsync1 = 1,
Dacsync2 = 2,
Dacsync3 = 3,
}
impl From<DACSYNC> for u8 {
#[inline(always)]
fn from(variant: DACSYNC) -> Self {
variant as _
}
}
impl crate::FieldSpec for DACSYNC {
type Ux = u8;
}
impl crate::IsEnum for DACSYNC {}
pub type DACSYNC_R = crate::FieldReader<DACSYNC>;
impl DACSYNC_R {
#[inline(always)]
pub const fn variant(&self) -> DACSYNC {
match self.bits {
0 => DACSYNC::Disabled,
1 => DACSYNC::Dacsync1,
2 => DACSYNC::Dacsync2,
3 => DACSYNC::Dacsync3,
_ => unreachable!(),
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DACSYNC::Disabled
}
#[inline(always)]
pub fn is_dacsync1(&self) -> bool {
*self == DACSYNC::Dacsync1
}
#[inline(always)]
pub fn is_dacsync2(&self) -> bool {
*self == DACSYNC::Dacsync2
}
#[inline(always)]
pub fn is_dacsync3(&self) -> bool {
*self == DACSYNC::Dacsync3
}
}
pub type DACSYNC_W<'a, REG> = crate::FieldWriter<'a, REG, 2, DACSYNC, crate::Safe>;
impl<'a, REG> DACSYNC_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(DACSYNC::Disabled)
}
#[inline(always)]
pub fn dacsync1(self) -> &'a mut crate::W<REG> {
self.variant(DACSYNC::Dacsync1)
}
#[inline(always)]
pub fn dacsync2(self) -> &'a mut crate::W<REG> {
self.variant(DACSYNC::Dacsync2)
}
#[inline(always)]
pub fn dacsync3(self) -> &'a mut crate::W<REG> {
self.variant(DACSYNC::Dacsync3)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PREEN {
Disabled = 0,
Enabled = 1,
}
impl From<PREEN> for bool {
#[inline(always)]
fn from(variant: PREEN) -> Self {
variant as u8 != 0
}
}
pub type PREEN_R = crate::BitReader<PREEN>;
impl PREEN_R {
#[inline(always)]
pub const fn variant(&self) -> PREEN {
match self.bits {
false => PREEN::Disabled,
true => PREEN::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == PREEN::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == PREEN::Enabled
}
}
pub type PREEN_W<'a, REG> = crate::BitWriter<'a, REG, PREEN>;
impl<'a, REG> PREEN_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(PREEN::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(PREEN::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum MREPU {
Disabled = 0,
Enabled = 1,
}
impl From<MREPU> for bool {
#[inline(always)]
fn from(variant: MREPU) -> Self {
variant as u8 != 0
}
}
pub type MREPU_R = crate::BitReader<MREPU>;
impl MREPU_R {
#[inline(always)]
pub const fn variant(&self) -> MREPU {
match self.bits {
false => MREPU::Disabled,
true => MREPU::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == MREPU::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == MREPU::Enabled
}
}
pub type MREPU_W<'a, REG> = crate::BitWriter<'a, REG, MREPU>;
impl<'a, REG> MREPU_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(MREPU::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(MREPU::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum BRSTDMA {
Independent = 0,
Completion = 1,
Rollover = 2,
}
impl From<BRSTDMA> for u8 {
#[inline(always)]
fn from(variant: BRSTDMA) -> Self {
variant as _
}
}
impl crate::FieldSpec for BRSTDMA {
type Ux = u8;
}
impl crate::IsEnum for BRSTDMA {}
pub type BRSTDMA_R = crate::FieldReader<BRSTDMA>;
impl BRSTDMA_R {
#[inline(always)]
pub const fn variant(&self) -> Option<BRSTDMA> {
match self.bits {
0 => Some(BRSTDMA::Independent),
1 => Some(BRSTDMA::Completion),
2 => Some(BRSTDMA::Rollover),
_ => None,
}
}
#[inline(always)]
pub fn is_independent(&self) -> bool {
*self == BRSTDMA::Independent
}
#[inline(always)]
pub fn is_completion(&self) -> bool {
*self == BRSTDMA::Completion
}
#[inline(always)]
pub fn is_rollover(&self) -> bool {
*self == BRSTDMA::Rollover
}
}
pub type BRSTDMA_W<'a, REG> = crate::FieldWriter<'a, REG, 2, BRSTDMA>;
impl<'a, REG> BRSTDMA_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn independent(self) -> &'a mut crate::W<REG> {
self.variant(BRSTDMA::Independent)
}
#[inline(always)]
pub fn completion(self) -> &'a mut crate::W<REG> {
self.variant(BRSTDMA::Completion)
}
#[inline(always)]
pub fn rollover(self) -> &'a mut crate::W<REG> {
self.variant(BRSTDMA::Rollover)
}
}
impl R {
#[inline(always)]
pub fn ckpsc(&self) -> CKPSC_R {
CKPSC_R::new((self.bits & 7) as u8)
}
#[inline(always)]
pub fn cont(&self) -> CONT_R {
CONT_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn retrig(&self) -> RETRIG_R {
RETRIG_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn half(&self) -> HALF_R {
HALF_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn syncin(&self) -> SYNCIN_R {
SYNCIN_R::new(((self.bits >> 8) & 3) as u8)
}
#[inline(always)]
pub fn syncrst(&self) -> SYNCRST_R {
SYNCRST_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn syncstrt(&self) -> SYNCSTRT_R {
SYNCSTRT_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn syncout(&self) -> SYNCOUT_R {
SYNCOUT_R::new(((self.bits >> 12) & 3) as u8)
}
#[inline(always)]
pub fn syncsrc(&self) -> SYNCSRC_R {
SYNCSRC_R::new(((self.bits >> 14) & 3) as u8)
}
#[inline(always)]
pub fn mcen(&self) -> MCEN_R {
MCEN_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn tcen(&self, n: u8) -> TCEN_R {
#[allow(clippy::no_effect)] [(); 5][n as usize];
TCEN_R::new(((self.bits >> (n + 17)) & 1) != 0)
}
#[inline(always)]
pub fn tcen_iter(&self) -> impl Iterator<Item = TCEN_R> + '_ {
(0..5).map(move |n| TCEN_R::new(((self.bits >> (n + 17)) & 1) != 0))
}
#[inline(always)]
pub fn tacen(&self) -> TCEN_R {
TCEN_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn tbcen(&self) -> TCEN_R {
TCEN_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn tccen(&self) -> TCEN_R {
TCEN_R::new(((self.bits >> 19) & 1) != 0)
}
#[inline(always)]
pub fn tdcen(&self) -> TCEN_R {
TCEN_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn tecen(&self) -> TCEN_R {
TCEN_R::new(((self.bits >> 21) & 1) != 0)
}
#[inline(always)]
pub fn dacsync(&self) -> DACSYNC_R {
DACSYNC_R::new(((self.bits >> 25) & 3) as u8)
}
#[inline(always)]
pub fn preen(&self) -> PREEN_R {
PREEN_R::new(((self.bits >> 27) & 1) != 0)
}
#[inline(always)]
pub fn mrepu(&self) -> MREPU_R {
MREPU_R::new(((self.bits >> 29) & 1) != 0)
}
#[inline(always)]
pub fn brstdma(&self) -> BRSTDMA_R {
BRSTDMA_R::new(((self.bits >> 30) & 3) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR")
.field("brstdma", &self.brstdma())
.field("mrepu", &self.mrepu())
.field("preen", &self.preen())
.field("dacsync", &self.dacsync())
.field("tacen", &self.tacen())
.field("tbcen", &self.tbcen())
.field("tccen", &self.tccen())
.field("tdcen", &self.tdcen())
.field("tecen", &self.tecen())
.field("mcen", &self.mcen())
.field("syncsrc", &self.syncsrc())
.field("syncout", &self.syncout())
.field("syncstrt", &self.syncstrt())
.field("syncrst", &self.syncrst())
.field("syncin", &self.syncin())
.field("half", &self.half())
.field("retrig", &self.retrig())
.field("cont", &self.cont())
.field("ckpsc", &self.ckpsc())
.finish()
}
}
impl W {
#[inline(always)]
pub fn ckpsc(&mut self) -> CKPSC_W<CRrs> {
CKPSC_W::new(self, 0)
}
#[inline(always)]
pub fn cont(&mut self) -> CONT_W<CRrs> {
CONT_W::new(self, 3)
}
#[inline(always)]
pub fn retrig(&mut self) -> RETRIG_W<CRrs> {
RETRIG_W::new(self, 4)
}
#[inline(always)]
pub fn half(&mut self) -> HALF_W<CRrs> {
HALF_W::new(self, 5)
}
#[inline(always)]
pub fn syncin(&mut self) -> SYNCIN_W<CRrs> {
SYNCIN_W::new(self, 8)
}
#[inline(always)]
pub fn syncrst(&mut self) -> SYNCRST_W<CRrs> {
SYNCRST_W::new(self, 10)
}
#[inline(always)]
pub fn syncstrt(&mut self) -> SYNCSTRT_W<CRrs> {
SYNCSTRT_W::new(self, 11)
}
#[inline(always)]
pub fn syncout(&mut self) -> SYNCOUT_W<CRrs> {
SYNCOUT_W::new(self, 12)
}
#[inline(always)]
pub fn syncsrc(&mut self) -> SYNCSRC_W<CRrs> {
SYNCSRC_W::new(self, 14)
}
#[inline(always)]
pub fn mcen(&mut self) -> MCEN_W<CRrs> {
MCEN_W::new(self, 16)
}
#[inline(always)]
pub fn tcen(&mut self, n: u8) -> TCEN_W<CRrs> {
#[allow(clippy::no_effect)] [(); 5][n as usize];
TCEN_W::new(self, n + 17)
}
#[inline(always)]
pub fn tacen(&mut self) -> TCEN_W<CRrs> {
TCEN_W::new(self, 17)
}
#[inline(always)]
pub fn tbcen(&mut self) -> TCEN_W<CRrs> {
TCEN_W::new(self, 18)
}
#[inline(always)]
pub fn tccen(&mut self) -> TCEN_W<CRrs> {
TCEN_W::new(self, 19)
}
#[inline(always)]
pub fn tdcen(&mut self) -> TCEN_W<CRrs> {
TCEN_W::new(self, 20)
}
#[inline(always)]
pub fn tecen(&mut self) -> TCEN_W<CRrs> {
TCEN_W::new(self, 21)
}
#[inline(always)]
pub fn dacsync(&mut self) -> DACSYNC_W<CRrs> {
DACSYNC_W::new(self, 25)
}
#[inline(always)]
pub fn preen(&mut self) -> PREEN_W<CRrs> {
PREEN_W::new(self, 27)
}
#[inline(always)]
pub fn mrepu(&mut self) -> MREPU_W<CRrs> {
MREPU_W::new(self, 29)
}
#[inline(always)]
pub fn brstdma(&mut self) -> BRSTDMA_W<CRrs> {
BRSTDMA_W::new(self, 30)
}
}
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 {}