#[doc = "Writer for register OMR"]
pub type W = crate::W<u32, super::OMR>;
#[doc = "Register OMR `reset()`'s with value 0"]
impl crate::ResetValue for super::OMR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Write proxy for field `PS0`"]
pub struct PS0_W<'a> {
w: &'a mut W,
}
impl<'a> PS0_W<'a> {
#[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 = "Write proxy for field `PS1`"]
pub struct PS1_W<'a> {
w: &'a mut W,
}
impl<'a> PS1_W<'a> {
#[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 = "Write proxy for field `PS2`"]
pub struct PS2_W<'a> {
w: &'a mut W,
}
impl<'a> PS2_W<'a> {
#[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 = "Write proxy for field `PS3`"]
pub struct PS3_W<'a> {
w: &'a mut W,
}
impl<'a> PS3_W<'a> {
#[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 = "Write proxy for field `PS4`"]
pub struct PS4_W<'a> {
w: &'a mut W,
}
impl<'a> PS4_W<'a> {
#[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 = "Write proxy for field `PS5`"]
pub struct PS5_W<'a> {
w: &'a mut W,
}
impl<'a> PS5_W<'a> {
#[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 = "Write proxy for field `PS6`"]
pub struct PS6_W<'a> {
w: &'a mut W,
}
impl<'a> PS6_W<'a> {
#[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 = "Write proxy for field `PS7`"]
pub struct PS7_W<'a> {
w: &'a mut W,
}
impl<'a> PS7_W<'a> {
#[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 = "Write proxy for field `PS8`"]
pub struct PS8_W<'a> {
w: &'a mut W,
}
impl<'a> PS8_W<'a> {
#[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 = "Write proxy for field `PS9`"]
pub struct PS9_W<'a> {
w: &'a mut W,
}
impl<'a> PS9_W<'a> {
#[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 = "Write proxy for field `PS10`"]
pub struct PS10_W<'a> {
w: &'a mut W,
}
impl<'a> PS10_W<'a> {
#[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 = "Write proxy for field `PS11`"]
pub struct PS11_W<'a> {
w: &'a mut W,
}
impl<'a> PS11_W<'a> {
#[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 = "Write proxy for field `PR0`"]
pub struct PR0_W<'a> {
w: &'a mut W,
}
impl<'a> PR0_W<'a> {
#[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 << 16)) | (((value as u32) & 0x01) << 16);
self.w
}
}
#[doc = "Write proxy for field `PR1`"]
pub struct PR1_W<'a> {
w: &'a mut W,
}
impl<'a> PR1_W<'a> {
#[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 << 17)) | (((value as u32) & 0x01) << 17);
self.w
}
}
#[doc = "Write proxy for field `PR2`"]
pub struct PR2_W<'a> {
w: &'a mut W,
}
impl<'a> PR2_W<'a> {
#[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 << 18)) | (((value as u32) & 0x01) << 18);
self.w
}
}
#[doc = "Write proxy for field `PR3`"]
pub struct PR3_W<'a> {
w: &'a mut W,
}
impl<'a> PR3_W<'a> {
#[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 << 19)) | (((value as u32) & 0x01) << 19);
self.w
}
}
#[doc = "Write proxy for field `PR4`"]
pub struct PR4_W<'a> {
w: &'a mut W,
}
impl<'a> PR4_W<'a> {
#[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 << 20)) | (((value as u32) & 0x01) << 20);
self.w
}
}
#[doc = "Write proxy for field `PR5`"]
pub struct PR5_W<'a> {
w: &'a mut W,
}
impl<'a> PR5_W<'a> {
#[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 << 21)) | (((value as u32) & 0x01) << 21);
self.w
}
}
#[doc = "Write proxy for field `PR6`"]
pub struct PR6_W<'a> {
w: &'a mut W,
}
impl<'a> PR6_W<'a> {
#[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 << 22)) | (((value as u32) & 0x01) << 22);
self.w
}
}
#[doc = "Write proxy for field `PR7`"]
pub struct PR7_W<'a> {
w: &'a mut W,
}
impl<'a> PR7_W<'a> {
#[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 << 23)) | (((value as u32) & 0x01) << 23);
self.w
}
}
#[doc = "Write proxy for field `PR8`"]
pub struct PR8_W<'a> {
w: &'a mut W,
}
impl<'a> PR8_W<'a> {
#[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 << 24)) | (((value as u32) & 0x01) << 24);
self.w
}
}
#[doc = "Write proxy for field `PR9`"]
pub struct PR9_W<'a> {
w: &'a mut W,
}
impl<'a> PR9_W<'a> {
#[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 << 25)) | (((value as u32) & 0x01) << 25);
self.w
}
}
#[doc = "Write proxy for field `PR10`"]
pub struct PR10_W<'a> {
w: &'a mut W,
}
impl<'a> PR10_W<'a> {
#[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 << 26)) | (((value as u32) & 0x01) << 26);
self.w
}
}
#[doc = "Write proxy for field `PR11`"]
pub struct PR11_W<'a> {
w: &'a mut W,
}
impl<'a> PR11_W<'a> {
#[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 << 27)) | (((value as u32) & 0x01) << 27);
self.w
}
}
impl W {
#[doc = "Bit 0 - Port 2 Set Bit 0"]
#[inline(always)]
pub fn ps0(&mut self) -> PS0_W {
PS0_W { w: self }
}
#[doc = "Bit 1 - Port 2 Set Bit 1"]
#[inline(always)]
pub fn ps1(&mut self) -> PS1_W {
PS1_W { w: self }
}
#[doc = "Bit 2 - Port 2 Set Bit 2"]
#[inline(always)]
pub fn ps2(&mut self) -> PS2_W {
PS2_W { w: self }
}
#[doc = "Bit 3 - Port 2 Set Bit 3"]
#[inline(always)]
pub fn ps3(&mut self) -> PS3_W {
PS3_W { w: self }
}
#[doc = "Bit 4 - Port 2 Set Bit 4"]
#[inline(always)]
pub fn ps4(&mut self) -> PS4_W {
PS4_W { w: self }
}
#[doc = "Bit 5 - Port 2 Set Bit 5"]
#[inline(always)]
pub fn ps5(&mut self) -> PS5_W {
PS5_W { w: self }
}
#[doc = "Bit 6 - Port 2 Set Bit 6"]
#[inline(always)]
pub fn ps6(&mut self) -> PS6_W {
PS6_W { w: self }
}
#[doc = "Bit 7 - Port 2 Set Bit 7"]
#[inline(always)]
pub fn ps7(&mut self) -> PS7_W {
PS7_W { w: self }
}
#[doc = "Bit 8 - Port 2 Set Bit 8"]
#[inline(always)]
pub fn ps8(&mut self) -> PS8_W {
PS8_W { w: self }
}
#[doc = "Bit 9 - Port 2 Set Bit 9"]
#[inline(always)]
pub fn ps9(&mut self) -> PS9_W {
PS9_W { w: self }
}
#[doc = "Bit 10 - Port 2 Set Bit 10"]
#[inline(always)]
pub fn ps10(&mut self) -> PS10_W {
PS10_W { w: self }
}
#[doc = "Bit 11 - Port 2 Set Bit 11"]
#[inline(always)]
pub fn ps11(&mut self) -> PS11_W {
PS11_W { w: self }
}
#[doc = "Bit 16 - Port 2 Reset Bit 0"]
#[inline(always)]
pub fn pr0(&mut self) -> PR0_W {
PR0_W { w: self }
}
#[doc = "Bit 17 - Port 2 Reset Bit 1"]
#[inline(always)]
pub fn pr1(&mut self) -> PR1_W {
PR1_W { w: self }
}
#[doc = "Bit 18 - Port 2 Reset Bit 2"]
#[inline(always)]
pub fn pr2(&mut self) -> PR2_W {
PR2_W { w: self }
}
#[doc = "Bit 19 - Port 2 Reset Bit 3"]
#[inline(always)]
pub fn pr3(&mut self) -> PR3_W {
PR3_W { w: self }
}
#[doc = "Bit 20 - Port 2 Reset Bit 4"]
#[inline(always)]
pub fn pr4(&mut self) -> PR4_W {
PR4_W { w: self }
}
#[doc = "Bit 21 - Port 2 Reset Bit 5"]
#[inline(always)]
pub fn pr5(&mut self) -> PR5_W {
PR5_W { w: self }
}
#[doc = "Bit 22 - Port 2 Reset Bit 6"]
#[inline(always)]
pub fn pr6(&mut self) -> PR6_W {
PR6_W { w: self }
}
#[doc = "Bit 23 - Port 2 Reset Bit 7"]
#[inline(always)]
pub fn pr7(&mut self) -> PR7_W {
PR7_W { w: self }
}
#[doc = "Bit 24 - Port 2 Reset Bit 8"]
#[inline(always)]
pub fn pr8(&mut self) -> PR8_W {
PR8_W { w: self }
}
#[doc = "Bit 25 - Port 2 Reset Bit 9"]
#[inline(always)]
pub fn pr9(&mut self) -> PR9_W {
PR9_W { w: self }
}
#[doc = "Bit 26 - Port 2 Reset Bit 10"]
#[inline(always)]
pub fn pr10(&mut self) -> PR10_W {
PR10_W { w: self }
}
#[doc = "Bit 27 - Port 2 Reset Bit 11"]
#[inline(always)]
pub fn pr11(&mut self) -> PR11_W {
PR11_W { w: self }
}
}