#[doc = "Register `OMODE` reader"]
pub struct R(crate::R<OMODE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<OMODE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<OMODE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<OMODE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `OMODE` writer"]
pub struct W(crate::W<OMODE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<OMODE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<OMODE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<OMODE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Pin 15 output mode"]
pub type OM15_A = OM0_A;
#[doc = "Field `OM15` reader - Pin 15 output mode"]
pub type OM15_R = OM0_R;
#[doc = "Field `OM15` writer - Pin 15 output mode"]
pub struct OM15_W<'a> {
w: &'a mut W,
}
impl<'a> OM15_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OM15_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Output push-pull (reset state)"]
#[inline(always)]
pub fn push_pull(self) -> &'a mut W {
self.variant(OM15_A::PUSHPULL)
}
#[doc = "Output open-drain"]
#[inline(always)]
pub fn open_drain(self) -> &'a mut W {
self.variant(OM15_A::OPENDRAIN)
}
#[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
}
}
#[doc = "Pin 14 output mode"]
pub type OM14_A = OM0_A;
#[doc = "Field `OM14` reader - Pin 14 output mode"]
pub type OM14_R = OM0_R;
#[doc = "Field `OM14` writer - Pin 14 output mode"]
pub struct OM14_W<'a> {
w: &'a mut W,
}
impl<'a> OM14_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OM14_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Output push-pull (reset state)"]
#[inline(always)]
pub fn push_pull(self) -> &'a mut W {
self.variant(OM14_A::PUSHPULL)
}
#[doc = "Output open-drain"]
#[inline(always)]
pub fn open_drain(self) -> &'a mut W {
self.variant(OM14_A::OPENDRAIN)
}
#[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 = "Pin 13 output mode"]
pub type OM13_A = OM0_A;
#[doc = "Field `OM13` reader - Pin 13 output mode"]
pub type OM13_R = OM0_R;
#[doc = "Field `OM13` writer - Pin 13 output mode"]
pub struct OM13_W<'a> {
w: &'a mut W,
}
impl<'a> OM13_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OM13_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Output push-pull (reset state)"]
#[inline(always)]
pub fn push_pull(self) -> &'a mut W {
self.variant(OM13_A::PUSHPULL)
}
#[doc = "Output open-drain"]
#[inline(always)]
pub fn open_drain(self) -> &'a mut W {
self.variant(OM13_A::OPENDRAIN)
}
#[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 = "Pin 12 output mode"]
pub type OM12_A = OM0_A;
#[doc = "Field `OM12` reader - Pin 12 output mode"]
pub type OM12_R = OM0_R;
#[doc = "Field `OM12` writer - Pin 12 output mode"]
pub struct OM12_W<'a> {
w: &'a mut W,
}
impl<'a> OM12_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OM12_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Output push-pull (reset state)"]
#[inline(always)]
pub fn push_pull(self) -> &'a mut W {
self.variant(OM12_A::PUSHPULL)
}
#[doc = "Output open-drain"]
#[inline(always)]
pub fn open_drain(self) -> &'a mut W {
self.variant(OM12_A::OPENDRAIN)
}
#[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 = "Pin 11 output mode"]
pub type OM11_A = OM0_A;
#[doc = "Field `OM11` reader - Pin 11 output mode"]
pub type OM11_R = OM0_R;
#[doc = "Field `OM11` writer - Pin 11 output mode"]
pub struct OM11_W<'a> {
w: &'a mut W,
}
impl<'a> OM11_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OM11_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Output push-pull (reset state)"]
#[inline(always)]
pub fn push_pull(self) -> &'a mut W {
self.variant(OM11_A::PUSHPULL)
}
#[doc = "Output open-drain"]
#[inline(always)]
pub fn open_drain(self) -> &'a mut W {
self.variant(OM11_A::OPENDRAIN)
}
#[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 = "Pin 10 output mode"]
pub type OM10_A = OM0_A;
#[doc = "Field `OM10` reader - Pin 10 output mode"]
pub type OM10_R = OM0_R;
#[doc = "Field `OM10` writer - Pin 10 output mode"]
pub struct OM10_W<'a> {
w: &'a mut W,
}
impl<'a> OM10_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OM10_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Output push-pull (reset state)"]
#[inline(always)]
pub fn push_pull(self) -> &'a mut W {
self.variant(OM10_A::PUSHPULL)
}
#[doc = "Output open-drain"]
#[inline(always)]
pub fn open_drain(self) -> &'a mut W {
self.variant(OM10_A::OPENDRAIN)
}
#[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 = "Pin 9 output mode"]
pub type OM9_A = OM0_A;
#[doc = "Field `OM9` reader - Pin 9 output mode"]
pub type OM9_R = OM0_R;
#[doc = "Field `OM9` writer - Pin 9 output mode"]
pub struct OM9_W<'a> {
w: &'a mut W,
}
impl<'a> OM9_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OM9_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Output push-pull (reset state)"]
#[inline(always)]
pub fn push_pull(self) -> &'a mut W {
self.variant(OM9_A::PUSHPULL)
}
#[doc = "Output open-drain"]
#[inline(always)]
pub fn open_drain(self) -> &'a mut W {
self.variant(OM9_A::OPENDRAIN)
}
#[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 = "Pin 8 output mode"]
pub type OM8_A = OM0_A;
#[doc = "Field `OM8` reader - Pin 8 output mode"]
pub type OM8_R = OM0_R;
#[doc = "Field `OM8` writer - Pin 8 output mode"]
pub struct OM8_W<'a> {
w: &'a mut W,
}
impl<'a> OM8_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OM8_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Output push-pull (reset state)"]
#[inline(always)]
pub fn push_pull(self) -> &'a mut W {
self.variant(OM8_A::PUSHPULL)
}
#[doc = "Output open-drain"]
#[inline(always)]
pub fn open_drain(self) -> &'a mut W {
self.variant(OM8_A::OPENDRAIN)
}
#[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 = "Pin 7 output mode"]
pub type OM7_A = OM0_A;
#[doc = "Field `OM7` reader - Pin 7 output mode"]
pub type OM7_R = OM0_R;
#[doc = "Field `OM7` writer - Pin 7 output mode"]
pub struct OM7_W<'a> {
w: &'a mut W,
}
impl<'a> OM7_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OM7_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Output push-pull (reset state)"]
#[inline(always)]
pub fn push_pull(self) -> &'a mut W {
self.variant(OM7_A::PUSHPULL)
}
#[doc = "Output open-drain"]
#[inline(always)]
pub fn open_drain(self) -> &'a mut W {
self.variant(OM7_A::OPENDRAIN)
}
#[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 = "Pin 6 output mode"]
pub type OM6_A = OM0_A;
#[doc = "Field `OM6` reader - Pin 6 output mode"]
pub type OM6_R = OM0_R;
#[doc = "Field `OM6` writer - Pin 6 output mode"]
pub struct OM6_W<'a> {
w: &'a mut W,
}
impl<'a> OM6_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OM6_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Output push-pull (reset state)"]
#[inline(always)]
pub fn push_pull(self) -> &'a mut W {
self.variant(OM6_A::PUSHPULL)
}
#[doc = "Output open-drain"]
#[inline(always)]
pub fn open_drain(self) -> &'a mut W {
self.variant(OM6_A::OPENDRAIN)
}
#[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 = "Pin 5 output mode"]
pub type OM5_A = OM0_A;
#[doc = "Field `OM5` reader - Pin 5 output mode"]
pub type OM5_R = OM0_R;
#[doc = "Field `OM5` writer - Pin 5 output mode"]
pub struct OM5_W<'a> {
w: &'a mut W,
}
impl<'a> OM5_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OM5_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Output push-pull (reset state)"]
#[inline(always)]
pub fn push_pull(self) -> &'a mut W {
self.variant(OM5_A::PUSHPULL)
}
#[doc = "Output open-drain"]
#[inline(always)]
pub fn open_drain(self) -> &'a mut W {
self.variant(OM5_A::OPENDRAIN)
}
#[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 = "Pin 4 output mode"]
pub type OM4_A = OM0_A;
#[doc = "Field `OM4` reader - Pin 4 output mode"]
pub type OM4_R = OM0_R;
#[doc = "Field `OM4` writer - Pin 4 output mode"]
pub struct OM4_W<'a> {
w: &'a mut W,
}
impl<'a> OM4_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OM4_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Output push-pull (reset state)"]
#[inline(always)]
pub fn push_pull(self) -> &'a mut W {
self.variant(OM4_A::PUSHPULL)
}
#[doc = "Output open-drain"]
#[inline(always)]
pub fn open_drain(self) -> &'a mut W {
self.variant(OM4_A::OPENDRAIN)
}
#[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 = "Pin 3 output mode"]
pub type OM3_A = OM0_A;
#[doc = "Field `OM3` reader - Pin 3 output mode"]
pub type OM3_R = OM0_R;
#[doc = "Field `OM3` writer - Pin 3 output mode"]
pub struct OM3_W<'a> {
w: &'a mut W,
}
impl<'a> OM3_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OM3_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Output push-pull (reset state)"]
#[inline(always)]
pub fn push_pull(self) -> &'a mut W {
self.variant(OM3_A::PUSHPULL)
}
#[doc = "Output open-drain"]
#[inline(always)]
pub fn open_drain(self) -> &'a mut W {
self.variant(OM3_A::OPENDRAIN)
}
#[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 = "Pin 2 output mode"]
pub type OM2_A = OM0_A;
#[doc = "Field `OM2` reader - Pin 2 output mode"]
pub type OM2_R = OM0_R;
#[doc = "Field `OM2` writer - Pin 2 output mode"]
pub struct OM2_W<'a> {
w: &'a mut W,
}
impl<'a> OM2_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OM2_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Output push-pull (reset state)"]
#[inline(always)]
pub fn push_pull(self) -> &'a mut W {
self.variant(OM2_A::PUSHPULL)
}
#[doc = "Output open-drain"]
#[inline(always)]
pub fn open_drain(self) -> &'a mut W {
self.variant(OM2_A::OPENDRAIN)
}
#[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 = "Pin 1 output mode"]
pub type OM1_A = OM0_A;
#[doc = "Field `OM1` reader - Pin 1 output mode"]
pub type OM1_R = OM0_R;
#[doc = "Field `OM1` writer - Pin 1 output mode"]
pub struct OM1_W<'a> {
w: &'a mut W,
}
impl<'a> OM1_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OM1_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Output push-pull (reset state)"]
#[inline(always)]
pub fn push_pull(self) -> &'a mut W {
self.variant(OM1_A::PUSHPULL)
}
#[doc = "Output open-drain"]
#[inline(always)]
pub fn open_drain(self) -> &'a mut W {
self.variant(OM1_A::OPENDRAIN)
}
#[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 = "Pin 0 output mode\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OM0_A {
#[doc = "0: Output push-pull (reset state)"]
PUSHPULL = 0,
#[doc = "1: Output open-drain"]
OPENDRAIN = 1,
}
impl From<OM0_A> for bool {
#[inline(always)]
fn from(variant: OM0_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `OM0` reader - Pin 0 output mode"]
pub struct OM0_R(crate::FieldReader<bool, OM0_A>);
impl OM0_R {
pub(crate) fn new(bits: bool) -> Self {
OM0_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> OM0_A {
match self.bits {
false => OM0_A::PUSHPULL,
true => OM0_A::OPENDRAIN,
}
}
#[doc = "Checks if the value of the field is `PUSHPULL`"]
#[inline(always)]
pub fn is_push_pull(&self) -> bool {
**self == OM0_A::PUSHPULL
}
#[doc = "Checks if the value of the field is `OPENDRAIN`"]
#[inline(always)]
pub fn is_open_drain(&self) -> bool {
**self == OM0_A::OPENDRAIN
}
}
impl core::ops::Deref for OM0_R {
type Target = crate::FieldReader<bool, OM0_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `OM0` writer - Pin 0 output mode"]
pub struct OM0_W<'a> {
w: &'a mut W,
}
impl<'a> OM0_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OM0_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Output push-pull (reset state)"]
#[inline(always)]
pub fn push_pull(self) -> &'a mut W {
self.variant(OM0_A::PUSHPULL)
}
#[doc = "Output open-drain"]
#[inline(always)]
pub fn open_drain(self) -> &'a mut W {
self.variant(OM0_A::OPENDRAIN)
}
#[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
}
}
impl R {
#[doc = "Bit 15 - Pin 15 output mode"]
#[inline(always)]
pub fn om15(&self) -> OM15_R {
OM15_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bit 14 - Pin 14 output mode"]
#[inline(always)]
pub fn om14(&self) -> OM14_R {
OM14_R::new(((self.bits >> 14) & 0x01) != 0)
}
#[doc = "Bit 13 - Pin 13 output mode"]
#[inline(always)]
pub fn om13(&self) -> OM13_R {
OM13_R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 12 - Pin 12 output mode"]
#[inline(always)]
pub fn om12(&self) -> OM12_R {
OM12_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 11 - Pin 11 output mode"]
#[inline(always)]
pub fn om11(&self) -> OM11_R {
OM11_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 10 - Pin 10 output mode"]
#[inline(always)]
pub fn om10(&self) -> OM10_R {
OM10_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 9 - Pin 9 output mode"]
#[inline(always)]
pub fn om9(&self) -> OM9_R {
OM9_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 8 - Pin 8 output mode"]
#[inline(always)]
pub fn om8(&self) -> OM8_R {
OM8_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 7 - Pin 7 output mode"]
#[inline(always)]
pub fn om7(&self) -> OM7_R {
OM7_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 6 - Pin 6 output mode"]
#[inline(always)]
pub fn om6(&self) -> OM6_R {
OM6_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 5 - Pin 5 output mode"]
#[inline(always)]
pub fn om5(&self) -> OM5_R {
OM5_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 4 - Pin 4 output mode"]
#[inline(always)]
pub fn om4(&self) -> OM4_R {
OM4_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3 - Pin 3 output mode"]
#[inline(always)]
pub fn om3(&self) -> OM3_R {
OM3_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 2 - Pin 2 output mode"]
#[inline(always)]
pub fn om2(&self) -> OM2_R {
OM2_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - Pin 1 output mode"]
#[inline(always)]
pub fn om1(&self) -> OM1_R {
OM1_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - Pin 0 output mode"]
#[inline(always)]
pub fn om0(&self) -> OM0_R {
OM0_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 15 - Pin 15 output mode"]
#[inline(always)]
pub fn om15(&mut self) -> OM15_W {
OM15_W { w: self }
}
#[doc = "Bit 14 - Pin 14 output mode"]
#[inline(always)]
pub fn om14(&mut self) -> OM14_W {
OM14_W { w: self }
}
#[doc = "Bit 13 - Pin 13 output mode"]
#[inline(always)]
pub fn om13(&mut self) -> OM13_W {
OM13_W { w: self }
}
#[doc = "Bit 12 - Pin 12 output mode"]
#[inline(always)]
pub fn om12(&mut self) -> OM12_W {
OM12_W { w: self }
}
#[doc = "Bit 11 - Pin 11 output mode"]
#[inline(always)]
pub fn om11(&mut self) -> OM11_W {
OM11_W { w: self }
}
#[doc = "Bit 10 - Pin 10 output mode"]
#[inline(always)]
pub fn om10(&mut self) -> OM10_W {
OM10_W { w: self }
}
#[doc = "Bit 9 - Pin 9 output mode"]
#[inline(always)]
pub fn om9(&mut self) -> OM9_W {
OM9_W { w: self }
}
#[doc = "Bit 8 - Pin 8 output mode"]
#[inline(always)]
pub fn om8(&mut self) -> OM8_W {
OM8_W { w: self }
}
#[doc = "Bit 7 - Pin 7 output mode"]
#[inline(always)]
pub fn om7(&mut self) -> OM7_W {
OM7_W { w: self }
}
#[doc = "Bit 6 - Pin 6 output mode"]
#[inline(always)]
pub fn om6(&mut self) -> OM6_W {
OM6_W { w: self }
}
#[doc = "Bit 5 - Pin 5 output mode"]
#[inline(always)]
pub fn om5(&mut self) -> OM5_W {
OM5_W { w: self }
}
#[doc = "Bit 4 - Pin 4 output mode"]
#[inline(always)]
pub fn om4(&mut self) -> OM4_W {
OM4_W { w: self }
}
#[doc = "Bit 3 - Pin 3 output mode"]
#[inline(always)]
pub fn om3(&mut self) -> OM3_W {
OM3_W { w: self }
}
#[doc = "Bit 2 - Pin 2 output mode"]
#[inline(always)]
pub fn om2(&mut self) -> OM2_W {
OM2_W { w: self }
}
#[doc = "Bit 1 - Pin 1 output mode"]
#[inline(always)]
pub fn om1(&mut self) -> OM1_W {
OM1_W { w: self }
}
#[doc = "Bit 0 - Pin 0 output mode"]
#[inline(always)]
pub fn om0(&mut self) -> OM0_W {
OM0_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "GPIO port output type register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [omode](index.html) module"]
pub struct OMODE_SPEC;
impl crate::RegisterSpec for OMODE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [omode::R](R) reader structure"]
impl crate::Readable for OMODE_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [omode::W](W) writer structure"]
impl crate::Writable for OMODE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets OMODE to value 0"]
impl crate::Resettable for OMODE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}