#[doc = "Reader of register LPTIM3_OR"]
pub type R = crate::R<u32, super::LPTIM3_OR>;
#[doc = "Writer for register LPTIM3_OR"]
pub type W = crate::W<u32, super::LPTIM3_OR>;
#[doc = "Register LPTIM3_OR `reset()`'s with value 0"]
impl crate::ResetValue for super::LPTIM3_OR {
    type Type = u32;
    #[inline(always)]
    fn reset_value() -> Self::Type {
        0
    }
}
#[doc = "Reader of field `OR_1`"]
pub type OR_1_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `OR_1`"]
pub struct OR_1_W<'a> {
    w: &'a mut W,
}
impl<'a> OR_1_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 = "Reader of field `OR_0`"]
pub type OR_0_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `OR_0`"]
pub struct OR_0_W<'a> {
    w: &'a mut W,
}
impl<'a> OR_0_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
    }
}
impl R {
    #[doc = "Bit 1 - Option register bit 1"]
    #[inline(always)]
    pub fn or_1(&self) -> OR_1_R {
        OR_1_R::new(((self.bits >> 1) & 0x01) != 0)
    }
    #[doc = "Bit 0 - Option register bit 0"]
    #[inline(always)]
    pub fn or_0(&self) -> OR_0_R {
        OR_0_R::new((self.bits & 0x01) != 0)
    }
}
impl W {
    #[doc = "Bit 1 - Option register bit 1"]
    #[inline(always)]
    pub fn or_1(&mut self) -> OR_1_W {
        OR_1_W { w: self }
    }
    #[doc = "Bit 0 - Option register bit 0"]
    #[inline(always)]
    pub fn or_0(&mut self) -> OR_0_W {
        OR_0_W { w: self }
    }
}
