#[doc = "Reader of register UDMACH11SSEL"]
pub type R = crate::R<u32, super::UDMACH11SSEL>;
#[doc = "Writer for register UDMACH11SSEL"]
pub type W = crate::W<u32, super::UDMACH11SSEL>;
#[doc = "Register UDMACH11SSEL `reset()`'s with value 0x47"]
impl crate::ResetValue for super::UDMACH11SSEL {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0x47
}
}
#[doc = "6:0\\]
Read/write selection value Writing any other value than values defined by a ENUM may result in undefined behavior.\n\nValue on reset: 71"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum EV_A {
#[doc = "121: Always asserted"]
ALWAYS_ACTIVE = 121,
#[doc = "84: GPT3B DMA trigger event. Configured by GPT3:DMAEV"]
GPT3B_DMABREQ = 84,
#[doc = "83: GPT3A DMA trigger event. Configured by GPT3:DMAEV"]
GPT3A_DMABREQ = 83,
#[doc = "82: GPT2B DMA trigger event. Configured by GPT2:DMAEV"]
GPT2B_DMABREQ = 82,
#[doc = "81: GPT2A DMA trigger event. Configured by GPT2:DMAEV"]
GPT2A_DMABREQ = 81,
#[doc = "80: GPT1B DMA trigger event. Configured by GPT1:DMAEV"]
GPT1B_DMABREQ = 80,
#[doc = "79: GPT1A DMA trigger event. Configured by GPT1:DMAEV"]
GPT1A_DMABREQ = 79,
#[doc = "78: GPT0B DMA trigger event. Configured by GPT0:DMAEV"]
GPT0B_DMABREQ = 78,
#[doc = "77: GPT0A DMA trigger event. Configured by GPT0:DMAEV"]
GPT0A_DMABREQ = 77,
#[doc = "71: Not used tied to 0"]
TIE_LOW = 71,
#[doc = "0: Always inactive"]
NONE = 0,
}
impl From<EV_A> for u8 {
#[inline(always)]
fn from(variant: EV_A) -> Self {
variant as _
}
}
#[doc = "Reader of field `EV`"]
pub type EV_R = crate::R<u8, EV_A>;
impl EV_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<u8, EV_A> {
use crate::Variant::*;
match self.bits {
121 => Val(EV_A::ALWAYS_ACTIVE),
84 => Val(EV_A::GPT3B_DMABREQ),
83 => Val(EV_A::GPT3A_DMABREQ),
82 => Val(EV_A::GPT2B_DMABREQ),
81 => Val(EV_A::GPT2A_DMABREQ),
80 => Val(EV_A::GPT1B_DMABREQ),
79 => Val(EV_A::GPT1A_DMABREQ),
78 => Val(EV_A::GPT0B_DMABREQ),
77 => Val(EV_A::GPT0A_DMABREQ),
71 => Val(EV_A::TIE_LOW),
0 => Val(EV_A::NONE),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `ALWAYS_ACTIVE`"]
#[inline(always)]
pub fn is_always_active(&self) -> bool {
*self == EV_A::ALWAYS_ACTIVE
}
#[doc = "Checks if the value of the field is `GPT3B_DMABREQ`"]
#[inline(always)]
pub fn is_gpt3b_dmabreq(&self) -> bool {
*self == EV_A::GPT3B_DMABREQ
}
#[doc = "Checks if the value of the field is `GPT3A_DMABREQ`"]
#[inline(always)]
pub fn is_gpt3a_dmabreq(&self) -> bool {
*self == EV_A::GPT3A_DMABREQ
}
#[doc = "Checks if the value of the field is `GPT2B_DMABREQ`"]
#[inline(always)]
pub fn is_gpt2b_dmabreq(&self) -> bool {
*self == EV_A::GPT2B_DMABREQ
}
#[doc = "Checks if the value of the field is `GPT2A_DMABREQ`"]
#[inline(always)]
pub fn is_gpt2a_dmabreq(&self) -> bool {
*self == EV_A::GPT2A_DMABREQ
}
#[doc = "Checks if the value of the field is `GPT1B_DMABREQ`"]
#[inline(always)]
pub fn is_gpt1b_dmabreq(&self) -> bool {
*self == EV_A::GPT1B_DMABREQ
}
#[doc = "Checks if the value of the field is `GPT1A_DMABREQ`"]
#[inline(always)]
pub fn is_gpt1a_dmabreq(&self) -> bool {
*self == EV_A::GPT1A_DMABREQ
}
#[doc = "Checks if the value of the field is `GPT0B_DMABREQ`"]
#[inline(always)]
pub fn is_gpt0b_dmabreq(&self) -> bool {
*self == EV_A::GPT0B_DMABREQ
}
#[doc = "Checks if the value of the field is `GPT0A_DMABREQ`"]
#[inline(always)]
pub fn is_gpt0a_dmabreq(&self) -> bool {
*self == EV_A::GPT0A_DMABREQ
}
#[doc = "Checks if the value of the field is `TIE_LOW`"]
#[inline(always)]
pub fn is_tie_low(&self) -> bool {
*self == EV_A::TIE_LOW
}
#[doc = "Checks if the value of the field is `NONE`"]
#[inline(always)]
pub fn is_none(&self) -> bool {
*self == EV_A::NONE
}
}
#[doc = "Write proxy for field `EV`"]
pub struct EV_W<'a> {
w: &'a mut W,
}
impl<'a> EV_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: EV_A) -> &'a mut W {
unsafe { self.bits(variant.into()) }
}
#[doc = "Always asserted"]
#[inline(always)]
pub fn always_active(self) -> &'a mut W {
self.variant(EV_A::ALWAYS_ACTIVE)
}
#[doc = "GPT3B DMA trigger event. Configured by GPT3:DMAEV"]
#[inline(always)]
pub fn gpt3b_dmabreq(self) -> &'a mut W {
self.variant(EV_A::GPT3B_DMABREQ)
}
#[doc = "GPT3A DMA trigger event. Configured by GPT3:DMAEV"]
#[inline(always)]
pub fn gpt3a_dmabreq(self) -> &'a mut W {
self.variant(EV_A::GPT3A_DMABREQ)
}
#[doc = "GPT2B DMA trigger event. Configured by GPT2:DMAEV"]
#[inline(always)]
pub fn gpt2b_dmabreq(self) -> &'a mut W {
self.variant(EV_A::GPT2B_DMABREQ)
}
#[doc = "GPT2A DMA trigger event. Configured by GPT2:DMAEV"]
#[inline(always)]
pub fn gpt2a_dmabreq(self) -> &'a mut W {
self.variant(EV_A::GPT2A_DMABREQ)
}
#[doc = "GPT1B DMA trigger event. Configured by GPT1:DMAEV"]
#[inline(always)]
pub fn gpt1b_dmabreq(self) -> &'a mut W {
self.variant(EV_A::GPT1B_DMABREQ)
}
#[doc = "GPT1A DMA trigger event. Configured by GPT1:DMAEV"]
#[inline(always)]
pub fn gpt1a_dmabreq(self) -> &'a mut W {
self.variant(EV_A::GPT1A_DMABREQ)
}
#[doc = "GPT0B DMA trigger event. Configured by GPT0:DMAEV"]
#[inline(always)]
pub fn gpt0b_dmabreq(self) -> &'a mut W {
self.variant(EV_A::GPT0B_DMABREQ)
}
#[doc = "GPT0A DMA trigger event. Configured by GPT0:DMAEV"]
#[inline(always)]
pub fn gpt0a_dmabreq(self) -> &'a mut W {
self.variant(EV_A::GPT0A_DMABREQ)
}
#[doc = "Not used tied to 0"]
#[inline(always)]
pub fn tie_low(self) -> &'a mut W {
self.variant(EV_A::TIE_LOW)
}
#[doc = "Always inactive"]
#[inline(always)]
pub fn none(self) -> &'a mut W {
self.variant(EV_A::NONE)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x7f) | ((value as u32) & 0x7f);
self.w
}
}
impl R {
#[doc = "Bits 0:6 - 6:0\\]
Read/write selection value Writing any other value than values defined by a ENUM may result in undefined behavior."]
#[inline(always)]
pub fn ev(&self) -> EV_R {
EV_R::new((self.bits & 0x7f) as u8)
}
}
impl W {
#[doc = "Bits 0:6 - 6:0\\]
Read/write selection value Writing any other value than values defined by a ENUM may result in undefined behavior."]
#[inline(always)]
pub fn ev(&mut self) -> EV_W {
EV_W { w: self }
}
}