#[doc = r"Value read from the register"]
pub struct R {
bits: u32,
}
#[doc = r"Value to write to the register"]
pub struct W {
bits: u32,
}
impl super::BMTRG {
#[doc = r"Modifies the contents of the register"]
#[inline(always)]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
{
let bits = self.register.get();
self.register.set(f(&R { bits }, &mut W { bits }).bits);
}
#[doc = r"Reads the contents of the register"]
#[inline(always)]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
#[doc = r"Writes to the register"]
#[inline(always)]
pub fn write<F>(&self, f: F)
where
F: FnOnce(&mut W) -> &mut W,
{
self.register.set(
f(&mut W {
bits: Self::reset_value(),
})
.bits,
);
}
#[doc = r"Reset value of the register"]
#[inline(always)]
pub const fn reset_value() -> u32 {
0
}
#[doc = r"Writes the reset value to the register"]
#[inline(always)]
pub fn reset(&self) {
self.register.set(Self::reset_value())
}
}
#[doc = r"Value of the field"]
pub struct OCHPEVR {
bits: bool,
}
impl OCHPEVR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _OCHPEVW<'a> {
w: &'a mut W,
}
impl<'a> _OCHPEVW<'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 &= !(0x01 << 31);
self.w.bits |= ((value as u32) & 0x01) << 31;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TECMP2R {
bits: bool,
}
impl TECMP2R {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TECMP2W<'a> {
w: &'a mut W,
}
impl<'a> _TECMP2W<'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 &= !(0x01 << 26);
self.w.bits |= ((value as u32) & 0x01) << 26;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TECMP1R {
bits: bool,
}
impl TECMP1R {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TECMP1W<'a> {
w: &'a mut W,
}
impl<'a> _TECMP1W<'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 &= !(0x01 << 25);
self.w.bits |= ((value as u32) & 0x01) << 25;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TEREPR {
bits: bool,
}
impl TEREPR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TEREPW<'a> {
w: &'a mut W,
}
impl<'a> _TEREPW<'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 &= !(0x01 << 24);
self.w.bits |= ((value as u32) & 0x01) << 24;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TERSTR {
bits: bool,
}
impl TERSTR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TERSTW<'a> {
w: &'a mut W,
}
impl<'a> _TERSTW<'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 &= !(0x01 << 23);
self.w.bits |= ((value as u32) & 0x01) << 23;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TDCMP2R {
bits: bool,
}
impl TDCMP2R {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TDCMP2W<'a> {
w: &'a mut W,
}
impl<'a> _TDCMP2W<'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 &= !(0x01 << 22);
self.w.bits |= ((value as u32) & 0x01) << 22;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TDCMP1R {
bits: bool,
}
impl TDCMP1R {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TDCMP1W<'a> {
w: &'a mut W,
}
impl<'a> _TDCMP1W<'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 &= !(0x01 << 21);
self.w.bits |= ((value as u32) & 0x01) << 21;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TDREPR {
bits: bool,
}
impl TDREPR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TDREPW<'a> {
w: &'a mut W,
}
impl<'a> _TDREPW<'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 &= !(0x01 << 20);
self.w.bits |= ((value as u32) & 0x01) << 20;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TDRSTR {
bits: bool,
}
impl TDRSTR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TDRSTW<'a> {
w: &'a mut W,
}
impl<'a> _TDRSTW<'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 &= !(0x01 << 19);
self.w.bits |= ((value as u32) & 0x01) << 19;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TCCMP2R {
bits: bool,
}
impl TCCMP2R {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TCCMP2W<'a> {
w: &'a mut W,
}
impl<'a> _TCCMP2W<'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 &= !(0x01 << 18);
self.w.bits |= ((value as u32) & 0x01) << 18;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TCCMP1R {
bits: bool,
}
impl TCCMP1R {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TCCMP1W<'a> {
w: &'a mut W,
}
impl<'a> _TCCMP1W<'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 &= !(0x01 << 17);
self.w.bits |= ((value as u32) & 0x01) << 17;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TCREPR {
bits: bool,
}
impl TCREPR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TCREPW<'a> {
w: &'a mut W,
}
impl<'a> _TCREPW<'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 &= !(0x01 << 16);
self.w.bits |= ((value as u32) & 0x01) << 16;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TCRSTR {
bits: bool,
}
impl TCRSTR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TCRSTW<'a> {
w: &'a mut W,
}
impl<'a> _TCRSTW<'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 &= !(0x01 << 15);
self.w.bits |= ((value as u32) & 0x01) << 15;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TBCMP2R {
bits: bool,
}
impl TBCMP2R {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TBCMP2W<'a> {
w: &'a mut W,
}
impl<'a> _TBCMP2W<'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 &= !(0x01 << 14);
self.w.bits |= ((value as u32) & 0x01) << 14;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TBCMP1R {
bits: bool,
}
impl TBCMP1R {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TBCMP1W<'a> {
w: &'a mut W,
}
impl<'a> _TBCMP1W<'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 &= !(0x01 << 13);
self.w.bits |= ((value as u32) & 0x01) << 13;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TBREPR {
bits: bool,
}
impl TBREPR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TBREPW<'a> {
w: &'a mut W,
}
impl<'a> _TBREPW<'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 &= !(0x01 << 12);
self.w.bits |= ((value as u32) & 0x01) << 12;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TBRSTR {
bits: bool,
}
impl TBRSTR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TBRSTW<'a> {
w: &'a mut W,
}
impl<'a> _TBRSTW<'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 &= !(0x01 << 11);
self.w.bits |= ((value as u32) & 0x01) << 11;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TACMP2R {
bits: bool,
}
impl TACMP2R {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TACMP2W<'a> {
w: &'a mut W,
}
impl<'a> _TACMP2W<'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 &= !(0x01 << 10);
self.w.bits |= ((value as u32) & 0x01) << 10;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TACMP1R {
bits: bool,
}
impl TACMP1R {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TACMP1W<'a> {
w: &'a mut W,
}
impl<'a> _TACMP1W<'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 &= !(0x01 << 9);
self.w.bits |= ((value as u32) & 0x01) << 9;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TAREPR {
bits: bool,
}
impl TAREPR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TAREPW<'a> {
w: &'a mut W,
}
impl<'a> _TAREPW<'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 &= !(0x01 << 8);
self.w.bits |= ((value as u32) & 0x01) << 8;
self.w
}
}
#[doc = r"Value of the field"]
pub struct TARSTR {
bits: bool,
}
impl TARSTR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _TARSTW<'a> {
w: &'a mut W,
}
impl<'a> _TARSTW<'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 &= !(0x01 << 7);
self.w.bits |= ((value as u32) & 0x01) << 7;
self.w
}
}
#[doc = r"Value of the field"]
pub struct MSTCMP4R {
bits: bool,
}
impl MSTCMP4R {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _MSTCMP4W<'a> {
w: &'a mut W,
}
impl<'a> _MSTCMP4W<'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 &= !(0x01 << 6);
self.w.bits |= ((value as u32) & 0x01) << 6;
self.w
}
}
#[doc = r"Value of the field"]
pub struct MSTCMP3R {
bits: bool,
}
impl MSTCMP3R {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _MSTCMP3W<'a> {
w: &'a mut W,
}
impl<'a> _MSTCMP3W<'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 &= !(0x01 << 5);
self.w.bits |= ((value as u32) & 0x01) << 5;
self.w
}
}
#[doc = r"Value of the field"]
pub struct MSTCMP2R {
bits: bool,
}
impl MSTCMP2R {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _MSTCMP2W<'a> {
w: &'a mut W,
}
impl<'a> _MSTCMP2W<'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 &= !(0x01 << 4);
self.w.bits |= ((value as u32) & 0x01) << 4;
self.w
}
}
#[doc = r"Value of the field"]
pub struct MSTCMP1R {
bits: bool,
}
impl MSTCMP1R {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _MSTCMP1W<'a> {
w: &'a mut W,
}
impl<'a> _MSTCMP1W<'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 &= !(0x01 << 3);
self.w.bits |= ((value as u32) & 0x01) << 3;
self.w
}
}
#[doc = r"Value of the field"]
pub struct MSTREPR {
bits: bool,
}
impl MSTREPR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _MSTREPW<'a> {
w: &'a mut W,
}
impl<'a> _MSTREPW<'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 &= !(0x01 << 2);
self.w.bits |= ((value as u32) & 0x01) << 2;
self.w
}
}
#[doc = r"Value of the field"]
pub struct MSTRSTR {
bits: bool,
}
impl MSTRSTR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _MSTRSTW<'a> {
w: &'a mut W,
}
impl<'a> _MSTRSTW<'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 &= !(0x01 << 1);
self.w.bits |= ((value as u32) & 0x01) << 1;
self.w
}
}
#[doc = r"Value of the field"]
pub struct SWR {
bits: bool,
}
impl SWR {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r"Proxy"]
pub struct _SWW<'a> {
w: &'a mut W,
}
impl<'a> _SWW<'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 &= !(0x01 << 0);
self.w.bits |= ((value as u32) & 0x01) << 0;
self.w
}
}
impl R {
#[doc = r"Value of the register as raw bits"]
#[inline(always)]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bit 31 - OCHPEV"]
#[inline(always)]
pub fn ochpev(&self) -> OCHPEVR {
let bits = ((self.bits >> 31) & 0x01) != 0;
OCHPEVR { bits }
}
#[doc = "Bit 26 - TECMP2"]
#[inline(always)]
pub fn tecmp2(&self) -> TECMP2R {
let bits = ((self.bits >> 26) & 0x01) != 0;
TECMP2R { bits }
}
#[doc = "Bit 25 - TECMP1"]
#[inline(always)]
pub fn tecmp1(&self) -> TECMP1R {
let bits = ((self.bits >> 25) & 0x01) != 0;
TECMP1R { bits }
}
#[doc = "Bit 24 - TEREP"]
#[inline(always)]
pub fn terep(&self) -> TEREPR {
let bits = ((self.bits >> 24) & 0x01) != 0;
TEREPR { bits }
}
#[doc = "Bit 23 - TERST"]
#[inline(always)]
pub fn terst(&self) -> TERSTR {
let bits = ((self.bits >> 23) & 0x01) != 0;
TERSTR { bits }
}
#[doc = "Bit 22 - TDCMP2"]
#[inline(always)]
pub fn tdcmp2(&self) -> TDCMP2R {
let bits = ((self.bits >> 22) & 0x01) != 0;
TDCMP2R { bits }
}
#[doc = "Bit 21 - TDCMP1"]
#[inline(always)]
pub fn tdcmp1(&self) -> TDCMP1R {
let bits = ((self.bits >> 21) & 0x01) != 0;
TDCMP1R { bits }
}
#[doc = "Bit 20 - TDREP"]
#[inline(always)]
pub fn tdrep(&self) -> TDREPR {
let bits = ((self.bits >> 20) & 0x01) != 0;
TDREPR { bits }
}
#[doc = "Bit 19 - TDRST"]
#[inline(always)]
pub fn tdrst(&self) -> TDRSTR {
let bits = ((self.bits >> 19) & 0x01) != 0;
TDRSTR { bits }
}
#[doc = "Bit 18 - TCCMP2"]
#[inline(always)]
pub fn tccmp2(&self) -> TCCMP2R {
let bits = ((self.bits >> 18) & 0x01) != 0;
TCCMP2R { bits }
}
#[doc = "Bit 17 - TCCMP1"]
#[inline(always)]
pub fn tccmp1(&self) -> TCCMP1R {
let bits = ((self.bits >> 17) & 0x01) != 0;
TCCMP1R { bits }
}
#[doc = "Bit 16 - TCREP"]
#[inline(always)]
pub fn tcrep(&self) -> TCREPR {
let bits = ((self.bits >> 16) & 0x01) != 0;
TCREPR { bits }
}
#[doc = "Bit 15 - TCRST"]
#[inline(always)]
pub fn tcrst(&self) -> TCRSTR {
let bits = ((self.bits >> 15) & 0x01) != 0;
TCRSTR { bits }
}
#[doc = "Bit 14 - TBCMP2"]
#[inline(always)]
pub fn tbcmp2(&self) -> TBCMP2R {
let bits = ((self.bits >> 14) & 0x01) != 0;
TBCMP2R { bits }
}
#[doc = "Bit 13 - TBCMP1"]
#[inline(always)]
pub fn tbcmp1(&self) -> TBCMP1R {
let bits = ((self.bits >> 13) & 0x01) != 0;
TBCMP1R { bits }
}
#[doc = "Bit 12 - TBREP"]
#[inline(always)]
pub fn tbrep(&self) -> TBREPR {
let bits = ((self.bits >> 12) & 0x01) != 0;
TBREPR { bits }
}
#[doc = "Bit 11 - TBRST"]
#[inline(always)]
pub fn tbrst(&self) -> TBRSTR {
let bits = ((self.bits >> 11) & 0x01) != 0;
TBRSTR { bits }
}
#[doc = "Bit 10 - TACMP2"]
#[inline(always)]
pub fn tacmp2(&self) -> TACMP2R {
let bits = ((self.bits >> 10) & 0x01) != 0;
TACMP2R { bits }
}
#[doc = "Bit 9 - TACMP1"]
#[inline(always)]
pub fn tacmp1(&self) -> TACMP1R {
let bits = ((self.bits >> 9) & 0x01) != 0;
TACMP1R { bits }
}
#[doc = "Bit 8 - TAREP"]
#[inline(always)]
pub fn tarep(&self) -> TAREPR {
let bits = ((self.bits >> 8) & 0x01) != 0;
TAREPR { bits }
}
#[doc = "Bit 7 - TARST"]
#[inline(always)]
pub fn tarst(&self) -> TARSTR {
let bits = ((self.bits >> 7) & 0x01) != 0;
TARSTR { bits }
}
#[doc = "Bit 6 - MSTCMP4"]
#[inline(always)]
pub fn mstcmp4(&self) -> MSTCMP4R {
let bits = ((self.bits >> 6) & 0x01) != 0;
MSTCMP4R { bits }
}
#[doc = "Bit 5 - MSTCMP3"]
#[inline(always)]
pub fn mstcmp3(&self) -> MSTCMP3R {
let bits = ((self.bits >> 5) & 0x01) != 0;
MSTCMP3R { bits }
}
#[doc = "Bit 4 - MSTCMP2"]
#[inline(always)]
pub fn mstcmp2(&self) -> MSTCMP2R {
let bits = ((self.bits >> 4) & 0x01) != 0;
MSTCMP2R { bits }
}
#[doc = "Bit 3 - MSTCMP1"]
#[inline(always)]
pub fn mstcmp1(&self) -> MSTCMP1R {
let bits = ((self.bits >> 3) & 0x01) != 0;
MSTCMP1R { bits }
}
#[doc = "Bit 2 - MSTREP"]
#[inline(always)]
pub fn mstrep(&self) -> MSTREPR {
let bits = ((self.bits >> 2) & 0x01) != 0;
MSTREPR { bits }
}
#[doc = "Bit 1 - MSTRST"]
#[inline(always)]
pub fn mstrst(&self) -> MSTRSTR {
let bits = ((self.bits >> 1) & 0x01) != 0;
MSTRSTR { bits }
}
#[doc = "Bit 0 - SW"]
#[inline(always)]
pub fn sw(&self) -> SWR {
let bits = ((self.bits >> 0) & 0x01) != 0;
SWR { bits }
}
}
impl W {
#[doc = r"Writes raw bits to the register"]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
#[doc = "Bit 31 - OCHPEV"]
#[inline(always)]
pub fn ochpev(&mut self) -> _OCHPEVW {
_OCHPEVW { w: self }
}
#[doc = "Bit 26 - TECMP2"]
#[inline(always)]
pub fn tecmp2(&mut self) -> _TECMP2W {
_TECMP2W { w: self }
}
#[doc = "Bit 25 - TECMP1"]
#[inline(always)]
pub fn tecmp1(&mut self) -> _TECMP1W {
_TECMP1W { w: self }
}
#[doc = "Bit 24 - TEREP"]
#[inline(always)]
pub fn terep(&mut self) -> _TEREPW {
_TEREPW { w: self }
}
#[doc = "Bit 23 - TERST"]
#[inline(always)]
pub fn terst(&mut self) -> _TERSTW {
_TERSTW { w: self }
}
#[doc = "Bit 22 - TDCMP2"]
#[inline(always)]
pub fn tdcmp2(&mut self) -> _TDCMP2W {
_TDCMP2W { w: self }
}
#[doc = "Bit 21 - TDCMP1"]
#[inline(always)]
pub fn tdcmp1(&mut self) -> _TDCMP1W {
_TDCMP1W { w: self }
}
#[doc = "Bit 20 - TDREP"]
#[inline(always)]
pub fn tdrep(&mut self) -> _TDREPW {
_TDREPW { w: self }
}
#[doc = "Bit 19 - TDRST"]
#[inline(always)]
pub fn tdrst(&mut self) -> _TDRSTW {
_TDRSTW { w: self }
}
#[doc = "Bit 18 - TCCMP2"]
#[inline(always)]
pub fn tccmp2(&mut self) -> _TCCMP2W {
_TCCMP2W { w: self }
}
#[doc = "Bit 17 - TCCMP1"]
#[inline(always)]
pub fn tccmp1(&mut self) -> _TCCMP1W {
_TCCMP1W { w: self }
}
#[doc = "Bit 16 - TCREP"]
#[inline(always)]
pub fn tcrep(&mut self) -> _TCREPW {
_TCREPW { w: self }
}
#[doc = "Bit 15 - TCRST"]
#[inline(always)]
pub fn tcrst(&mut self) -> _TCRSTW {
_TCRSTW { w: self }
}
#[doc = "Bit 14 - TBCMP2"]
#[inline(always)]
pub fn tbcmp2(&mut self) -> _TBCMP2W {
_TBCMP2W { w: self }
}
#[doc = "Bit 13 - TBCMP1"]
#[inline(always)]
pub fn tbcmp1(&mut self) -> _TBCMP1W {
_TBCMP1W { w: self }
}
#[doc = "Bit 12 - TBREP"]
#[inline(always)]
pub fn tbrep(&mut self) -> _TBREPW {
_TBREPW { w: self }
}
#[doc = "Bit 11 - TBRST"]
#[inline(always)]
pub fn tbrst(&mut self) -> _TBRSTW {
_TBRSTW { w: self }
}
#[doc = "Bit 10 - TACMP2"]
#[inline(always)]
pub fn tacmp2(&mut self) -> _TACMP2W {
_TACMP2W { w: self }
}
#[doc = "Bit 9 - TACMP1"]
#[inline(always)]
pub fn tacmp1(&mut self) -> _TACMP1W {
_TACMP1W { w: self }
}
#[doc = "Bit 8 - TAREP"]
#[inline(always)]
pub fn tarep(&mut self) -> _TAREPW {
_TAREPW { w: self }
}
#[doc = "Bit 7 - TARST"]
#[inline(always)]
pub fn tarst(&mut self) -> _TARSTW {
_TARSTW { w: self }
}
#[doc = "Bit 6 - MSTCMP4"]
#[inline(always)]
pub fn mstcmp4(&mut self) -> _MSTCMP4W {
_MSTCMP4W { w: self }
}
#[doc = "Bit 5 - MSTCMP3"]
#[inline(always)]
pub fn mstcmp3(&mut self) -> _MSTCMP3W {
_MSTCMP3W { w: self }
}
#[doc = "Bit 4 - MSTCMP2"]
#[inline(always)]
pub fn mstcmp2(&mut self) -> _MSTCMP2W {
_MSTCMP2W { w: self }
}
#[doc = "Bit 3 - MSTCMP1"]
#[inline(always)]
pub fn mstcmp1(&mut self) -> _MSTCMP1W {
_MSTCMP1W { w: self }
}
#[doc = "Bit 2 - MSTREP"]
#[inline(always)]
pub fn mstrep(&mut self) -> _MSTREPW {
_MSTREPW { w: self }
}
#[doc = "Bit 1 - MSTRST"]
#[inline(always)]
pub fn mstrst(&mut self) -> _MSTRSTW {
_MSTRSTW { w: self }
}
#[doc = "Bit 0 - SW"]
#[inline(always)]
pub fn sw(&mut self) -> _SWW {
_SWW { w: self }
}
}