#[doc = "Reader of register CHEN"]
pub type R = crate::R<u32, super::CHEN>;
#[doc = "Writer for register CHEN"]
pub type W = crate::W<u32, super::CHEN>;
#[doc = "Register CHEN `reset()`'s with value 0"]
impl crate::ResetValue for super::CHEN {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Enable or disable channel 0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH0_A {
#[doc = "0: Disable channel"]
DISABLED,
#[doc = "1: Enable channel"]
ENABLED,
}
impl From<CH0_A> for bool {
#[inline(always)]
fn from(variant: CH0_A) -> Self {
match variant {
CH0_A::DISABLED => false,
CH0_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `CH0`"]
pub type CH0_R = crate::R<bool, CH0_A>;
impl CH0_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CH0_A {
match self.bits {
false => CH0_A::DISABLED,
true => CH0_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CH0_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CH0_A::ENABLED
}
}
#[doc = "Write proxy for field `CH0`"]
pub struct CH0_W<'a> {
w: &'a mut W,
}
impl<'a> CH0_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CH0_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disable channel"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CH0_A::DISABLED)
}
#[doc = "Enable channel"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CH0_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
self.w
}
}
#[doc = "Enable or disable channel 1\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH1_A {
#[doc = "0: Disable channel"]
DISABLED,
#[doc = "1: Enable channel"]
ENABLED,
}
impl From<CH1_A> for bool {
#[inline(always)]
fn from(variant: CH1_A) -> Self {
match variant {
CH1_A::DISABLED => false,
CH1_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `CH1`"]
pub type CH1_R = crate::R<bool, CH1_A>;
impl CH1_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CH1_A {
match self.bits {
false => CH1_A::DISABLED,
true => CH1_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CH1_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CH1_A::ENABLED
}
}
#[doc = "Write proxy for field `CH1`"]
pub struct CH1_W<'a> {
w: &'a mut W,
}
impl<'a> CH1_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CH1_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disable channel"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CH1_A::DISABLED)
}
#[doc = "Enable channel"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CH1_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
self.w
}
}
#[doc = "Enable or disable channel 2\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH2_A {
#[doc = "0: Disable channel"]
DISABLED,
#[doc = "1: Enable channel"]
ENABLED,
}
impl From<CH2_A> for bool {
#[inline(always)]
fn from(variant: CH2_A) -> Self {
match variant {
CH2_A::DISABLED => false,
CH2_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `CH2`"]
pub type CH2_R = crate::R<bool, CH2_A>;
impl CH2_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CH2_A {
match self.bits {
false => CH2_A::DISABLED,
true => CH2_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CH2_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CH2_A::ENABLED
}
}
#[doc = "Write proxy for field `CH2`"]
pub struct CH2_W<'a> {
w: &'a mut W,
}
impl<'a> CH2_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CH2_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disable channel"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CH2_A::DISABLED)
}
#[doc = "Enable channel"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CH2_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
self.w
}
}
#[doc = "Enable or disable channel 3\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH3_A {
#[doc = "0: Disable channel"]
DISABLED,
#[doc = "1: Enable channel"]
ENABLED,
}
impl From<CH3_A> for bool {
#[inline(always)]
fn from(variant: CH3_A) -> Self {
match variant {
CH3_A::DISABLED => false,
CH3_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `CH3`"]
pub type CH3_R = crate::R<bool, CH3_A>;
impl CH3_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CH3_A {
match self.bits {
false => CH3_A::DISABLED,
true => CH3_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CH3_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CH3_A::ENABLED
}
}
#[doc = "Write proxy for field `CH3`"]
pub struct CH3_W<'a> {
w: &'a mut W,
}
impl<'a> CH3_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CH3_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disable channel"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CH3_A::DISABLED)
}
#[doc = "Enable channel"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CH3_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
self.w
}
}
#[doc = "Enable or disable channel 4\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH4_A {
#[doc = "0: Disable channel"]
DISABLED,
#[doc = "1: Enable channel"]
ENABLED,
}
impl From<CH4_A> for bool {
#[inline(always)]
fn from(variant: CH4_A) -> Self {
match variant {
CH4_A::DISABLED => false,
CH4_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `CH4`"]
pub type CH4_R = crate::R<bool, CH4_A>;
impl CH4_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CH4_A {
match self.bits {
false => CH4_A::DISABLED,
true => CH4_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CH4_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CH4_A::ENABLED
}
}
#[doc = "Write proxy for field `CH4`"]
pub struct CH4_W<'a> {
w: &'a mut W,
}
impl<'a> CH4_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CH4_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disable channel"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CH4_A::DISABLED)
}
#[doc = "Enable channel"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CH4_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
self.w
}
}
#[doc = "Enable or disable channel 5\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH5_A {
#[doc = "0: Disable channel"]
DISABLED,
#[doc = "1: Enable channel"]
ENABLED,
}
impl From<CH5_A> for bool {
#[inline(always)]
fn from(variant: CH5_A) -> Self {
match variant {
CH5_A::DISABLED => false,
CH5_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `CH5`"]
pub type CH5_R = crate::R<bool, CH5_A>;
impl CH5_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CH5_A {
match self.bits {
false => CH5_A::DISABLED,
true => CH5_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CH5_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CH5_A::ENABLED
}
}
#[doc = "Write proxy for field `CH5`"]
pub struct CH5_W<'a> {
w: &'a mut W,
}
impl<'a> CH5_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CH5_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disable channel"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CH5_A::DISABLED)
}
#[doc = "Enable channel"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CH5_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
self.w
}
}
#[doc = "Enable or disable channel 6\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH6_A {
#[doc = "0: Disable channel"]
DISABLED,
#[doc = "1: Enable channel"]
ENABLED,
}
impl From<CH6_A> for bool {
#[inline(always)]
fn from(variant: CH6_A) -> Self {
match variant {
CH6_A::DISABLED => false,
CH6_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `CH6`"]
pub type CH6_R = crate::R<bool, CH6_A>;
impl CH6_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CH6_A {
match self.bits {
false => CH6_A::DISABLED,
true => CH6_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CH6_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CH6_A::ENABLED
}
}
#[doc = "Write proxy for field `CH6`"]
pub struct CH6_W<'a> {
w: &'a mut W,
}
impl<'a> CH6_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CH6_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disable channel"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CH6_A::DISABLED)
}
#[doc = "Enable channel"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CH6_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
self.w
}
}
#[doc = "Enable or disable channel 7\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH7_A {
#[doc = "0: Disable channel"]
DISABLED,
#[doc = "1: Enable channel"]
ENABLED,
}
impl From<CH7_A> for bool {
#[inline(always)]
fn from(variant: CH7_A) -> Self {
match variant {
CH7_A::DISABLED => false,
CH7_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `CH7`"]
pub type CH7_R = crate::R<bool, CH7_A>;
impl CH7_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CH7_A {
match self.bits {
false => CH7_A::DISABLED,
true => CH7_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CH7_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CH7_A::ENABLED
}
}
#[doc = "Write proxy for field `CH7`"]
pub struct CH7_W<'a> {
w: &'a mut W,
}
impl<'a> CH7_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CH7_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disable channel"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CH7_A::DISABLED)
}
#[doc = "Enable channel"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CH7_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
self.w
}
}
#[doc = "Enable or disable channel 8\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH8_A {
#[doc = "0: Disable channel"]
DISABLED,
#[doc = "1: Enable channel"]
ENABLED,
}
impl From<CH8_A> for bool {
#[inline(always)]
fn from(variant: CH8_A) -> Self {
match variant {
CH8_A::DISABLED => false,
CH8_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `CH8`"]
pub type CH8_R = crate::R<bool, CH8_A>;
impl CH8_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CH8_A {
match self.bits {
false => CH8_A::DISABLED,
true => CH8_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CH8_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CH8_A::ENABLED
}
}
#[doc = "Write proxy for field `CH8`"]
pub struct CH8_W<'a> {
w: &'a mut W,
}
impl<'a> CH8_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CH8_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disable channel"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CH8_A::DISABLED)
}
#[doc = "Enable channel"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CH8_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
self.w
}
}
#[doc = "Enable or disable channel 9\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH9_A {
#[doc = "0: Disable channel"]
DISABLED,
#[doc = "1: Enable channel"]
ENABLED,
}
impl From<CH9_A> for bool {
#[inline(always)]
fn from(variant: CH9_A) -> Self {
match variant {
CH9_A::DISABLED => false,
CH9_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `CH9`"]
pub type CH9_R = crate::R<bool, CH9_A>;
impl CH9_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CH9_A {
match self.bits {
false => CH9_A::DISABLED,
true => CH9_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CH9_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CH9_A::ENABLED
}
}
#[doc = "Write proxy for field `CH9`"]
pub struct CH9_W<'a> {
w: &'a mut W,
}
impl<'a> CH9_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CH9_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disable channel"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CH9_A::DISABLED)
}
#[doc = "Enable channel"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CH9_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
self.w
}
}
#[doc = "Enable or disable channel 10\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH10_A {
#[doc = "0: Disable channel"]
DISABLED,
#[doc = "1: Enable channel"]
ENABLED,
}
impl From<CH10_A> for bool {
#[inline(always)]
fn from(variant: CH10_A) -> Self {
match variant {
CH10_A::DISABLED => false,
CH10_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `CH10`"]
pub type CH10_R = crate::R<bool, CH10_A>;
impl CH10_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CH10_A {
match self.bits {
false => CH10_A::DISABLED,
true => CH10_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CH10_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CH10_A::ENABLED
}
}
#[doc = "Write proxy for field `CH10`"]
pub struct CH10_W<'a> {
w: &'a mut W,
}
impl<'a> CH10_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CH10_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disable channel"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CH10_A::DISABLED)
}
#[doc = "Enable channel"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CH10_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
self.w
}
}
#[doc = "Enable or disable channel 11\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH11_A {
#[doc = "0: Disable channel"]
DISABLED,
#[doc = "1: Enable channel"]
ENABLED,
}
impl From<CH11_A> for bool {
#[inline(always)]
fn from(variant: CH11_A) -> Self {
match variant {
CH11_A::DISABLED => false,
CH11_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `CH11`"]
pub type CH11_R = crate::R<bool, CH11_A>;
impl CH11_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CH11_A {
match self.bits {
false => CH11_A::DISABLED,
true => CH11_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CH11_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CH11_A::ENABLED
}
}
#[doc = "Write proxy for field `CH11`"]
pub struct CH11_W<'a> {
w: &'a mut W,
}
impl<'a> CH11_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CH11_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disable channel"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CH11_A::DISABLED)
}
#[doc = "Enable channel"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CH11_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11);
self.w
}
}
#[doc = "Enable or disable channel 12\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH12_A {
#[doc = "0: Disable channel"]
DISABLED,
#[doc = "1: Enable channel"]
ENABLED,
}
impl From<CH12_A> for bool {
#[inline(always)]
fn from(variant: CH12_A) -> Self {
match variant {
CH12_A::DISABLED => false,
CH12_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `CH12`"]
pub type CH12_R = crate::R<bool, CH12_A>;
impl CH12_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CH12_A {
match self.bits {
false => CH12_A::DISABLED,
true => CH12_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CH12_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CH12_A::ENABLED
}
}
#[doc = "Write proxy for field `CH12`"]
pub struct CH12_W<'a> {
w: &'a mut W,
}
impl<'a> CH12_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CH12_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disable channel"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CH12_A::DISABLED)
}
#[doc = "Enable channel"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CH12_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12);
self.w
}
}
#[doc = "Enable or disable channel 13\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH13_A {
#[doc = "0: Disable channel"]
DISABLED,
#[doc = "1: Enable channel"]
ENABLED,
}
impl From<CH13_A> for bool {
#[inline(always)]
fn from(variant: CH13_A) -> Self {
match variant {
CH13_A::DISABLED => false,
CH13_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `CH13`"]
pub type CH13_R = crate::R<bool, CH13_A>;
impl CH13_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CH13_A {
match self.bits {
false => CH13_A::DISABLED,
true => CH13_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CH13_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CH13_A::ENABLED
}
}
#[doc = "Write proxy for field `CH13`"]
pub struct CH13_W<'a> {
w: &'a mut W,
}
impl<'a> CH13_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CH13_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disable channel"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CH13_A::DISABLED)
}
#[doc = "Enable channel"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CH13_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13);
self.w
}
}
#[doc = "Enable or disable channel 14\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH14_A {
#[doc = "0: Disable channel"]
DISABLED,
#[doc = "1: Enable channel"]
ENABLED,
}
impl From<CH14_A> for bool {
#[inline(always)]
fn from(variant: CH14_A) -> Self {
match variant {
CH14_A::DISABLED => false,
CH14_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `CH14`"]
pub type CH14_R = crate::R<bool, CH14_A>;
impl CH14_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CH14_A {
match self.bits {
false => CH14_A::DISABLED,
true => CH14_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CH14_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CH14_A::ENABLED
}
}
#[doc = "Write proxy for field `CH14`"]
pub struct CH14_W<'a> {
w: &'a mut W,
}
impl<'a> CH14_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CH14_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disable channel"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CH14_A::DISABLED)
}
#[doc = "Enable channel"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CH14_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14);
self.w
}
}
#[doc = "Enable or disable channel 15\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH15_A {
#[doc = "0: Disable channel"]
DISABLED,
#[doc = "1: Enable channel"]
ENABLED,
}
impl From<CH15_A> for bool {
#[inline(always)]
fn from(variant: CH15_A) -> Self {
match variant {
CH15_A::DISABLED => false,
CH15_A::ENABLED => true,
}
}
}
#[doc = "Reader of field `CH15`"]
pub type CH15_R = crate::R<bool, CH15_A>;
impl CH15_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CH15_A {
match self.bits {
false => CH15_A::DISABLED,
true => CH15_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CH15_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CH15_A::ENABLED
}
}
#[doc = "Write proxy for field `CH15`"]
pub struct CH15_W<'a> {
w: &'a mut W,
}
impl<'a> CH15_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CH15_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Disable channel"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CH15_A::DISABLED)
}
#[doc = "Enable channel"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CH15_A::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15);
self.w
}
}
impl R {
#[doc = "Bit 0 - Enable or disable channel 0"]
#[inline(always)]
pub fn ch0(&self) -> CH0_R {
CH0_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - Enable or disable channel 1"]
#[inline(always)]
pub fn ch1(&self) -> CH1_R {
CH1_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - Enable or disable channel 2"]
#[inline(always)]
pub fn ch2(&self) -> CH2_R {
CH2_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - Enable or disable channel 3"]
#[inline(always)]
pub fn ch3(&self) -> CH3_R {
CH3_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - Enable or disable channel 4"]
#[inline(always)]
pub fn ch4(&self) -> CH4_R {
CH4_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - Enable or disable channel 5"]
#[inline(always)]
pub fn ch5(&self) -> CH5_R {
CH5_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - Enable or disable channel 6"]
#[inline(always)]
pub fn ch6(&self) -> CH6_R {
CH6_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - Enable or disable channel 7"]
#[inline(always)]
pub fn ch7(&self) -> CH7_R {
CH7_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8 - Enable or disable channel 8"]
#[inline(always)]
pub fn ch8(&self) -> CH8_R {
CH8_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9 - Enable or disable channel 9"]
#[inline(always)]
pub fn ch9(&self) -> CH9_R {
CH9_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10 - Enable or disable channel 10"]
#[inline(always)]
pub fn ch10(&self) -> CH10_R {
CH10_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11 - Enable or disable channel 11"]
#[inline(always)]
pub fn ch11(&self) -> CH11_R {
CH11_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12 - Enable or disable channel 12"]
#[inline(always)]
pub fn ch12(&self) -> CH12_R {
CH12_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13 - Enable or disable channel 13"]
#[inline(always)]
pub fn ch13(&self) -> CH13_R {
CH13_R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 14 - Enable or disable channel 14"]
#[inline(always)]
pub fn ch14(&self) -> CH14_R {
CH14_R::new(((self.bits >> 14) & 0x01) != 0)
}
#[doc = "Bit 15 - Enable or disable channel 15"]
#[inline(always)]
pub fn ch15(&self) -> CH15_R {
CH15_R::new(((self.bits >> 15) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - Enable or disable channel 0"]
#[inline(always)]
pub fn ch0(&mut self) -> CH0_W {
CH0_W { w: self }
}
#[doc = "Bit 1 - Enable or disable channel 1"]
#[inline(always)]
pub fn ch1(&mut self) -> CH1_W {
CH1_W { w: self }
}
#[doc = "Bit 2 - Enable or disable channel 2"]
#[inline(always)]
pub fn ch2(&mut self) -> CH2_W {
CH2_W { w: self }
}
#[doc = "Bit 3 - Enable or disable channel 3"]
#[inline(always)]
pub fn ch3(&mut self) -> CH3_W {
CH3_W { w: self }
}
#[doc = "Bit 4 - Enable or disable channel 4"]
#[inline(always)]
pub fn ch4(&mut self) -> CH4_W {
CH4_W { w: self }
}
#[doc = "Bit 5 - Enable or disable channel 5"]
#[inline(always)]
pub fn ch5(&mut self) -> CH5_W {
CH5_W { w: self }
}
#[doc = "Bit 6 - Enable or disable channel 6"]
#[inline(always)]
pub fn ch6(&mut self) -> CH6_W {
CH6_W { w: self }
}
#[doc = "Bit 7 - Enable or disable channel 7"]
#[inline(always)]
pub fn ch7(&mut self) -> CH7_W {
CH7_W { w: self }
}
#[doc = "Bit 8 - Enable or disable channel 8"]
#[inline(always)]
pub fn ch8(&mut self) -> CH8_W {
CH8_W { w: self }
}
#[doc = "Bit 9 - Enable or disable channel 9"]
#[inline(always)]
pub fn ch9(&mut self) -> CH9_W {
CH9_W { w: self }
}
#[doc = "Bit 10 - Enable or disable channel 10"]
#[inline(always)]
pub fn ch10(&mut self) -> CH10_W {
CH10_W { w: self }
}
#[doc = "Bit 11 - Enable or disable channel 11"]
#[inline(always)]
pub fn ch11(&mut self) -> CH11_W {
CH11_W { w: self }
}
#[doc = "Bit 12 - Enable or disable channel 12"]
#[inline(always)]
pub fn ch12(&mut self) -> CH12_W {
CH12_W { w: self }
}
#[doc = "Bit 13 - Enable or disable channel 13"]
#[inline(always)]
pub fn ch13(&mut self) -> CH13_W {
CH13_W { w: self }
}
#[doc = "Bit 14 - Enable or disable channel 14"]
#[inline(always)]
pub fn ch14(&mut self) -> CH14_W {
CH14_W { w: self }
}
#[doc = "Bit 15 - Enable or disable channel 15"]
#[inline(always)]
pub fn ch15(&mut self) -> CH15_W {
CH15_W { w: self }
}
}