#[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::INTENSET {
#[doc = r" Modifies the contents of the register"]
#[inline]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
{
let bits = self.register.get();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.set(w.bits);
}
#[doc = r" Reads the contents of the register"]
#[inline]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
#[doc = r" Writes to the register"]
#[inline]
pub fn write<F>(&self, f: F)
where
F: FnOnce(&mut W) -> &mut W,
{
let mut w = W::reset_value();
f(&mut w);
self.register.set(w.bits);
}
#[doc = r" Writes the reset value to the register"]
#[inline]
pub fn reset(&self) {
self.write(|w| w)
}
}
#[doc = "Possible values of the field `COMPARE0`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE0R {
#[doc = "Read: Disabled"]
DISABLED,
#[doc = "Read: Enabled"]
ENABLED,
}
impl COMPARE0R {
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
COMPARE0R::DISABLED => false,
COMPARE0R::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> COMPARE0R {
match value {
false => COMPARE0R::DISABLED,
true => COMPARE0R::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == COMPARE0R::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == COMPARE0R::ENABLED
}
}
#[doc = "Possible values of the field `COMPARE1`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE1R {
#[doc = "Read: Disabled"]
DISABLED,
#[doc = "Read: Enabled"]
ENABLED,
}
impl COMPARE1R {
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
COMPARE1R::DISABLED => false,
COMPARE1R::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> COMPARE1R {
match value {
false => COMPARE1R::DISABLED,
true => COMPARE1R::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == COMPARE1R::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == COMPARE1R::ENABLED
}
}
#[doc = "Possible values of the field `COMPARE2`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE2R {
#[doc = "Read: Disabled"]
DISABLED,
#[doc = "Read: Enabled"]
ENABLED,
}
impl COMPARE2R {
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
COMPARE2R::DISABLED => false,
COMPARE2R::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> COMPARE2R {
match value {
false => COMPARE2R::DISABLED,
true => COMPARE2R::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == COMPARE2R::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == COMPARE2R::ENABLED
}
}
#[doc = "Possible values of the field `COMPARE3`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE3R {
#[doc = "Read: Disabled"]
DISABLED,
#[doc = "Read: Enabled"]
ENABLED,
}
impl COMPARE3R {
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
COMPARE3R::DISABLED => false,
COMPARE3R::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> COMPARE3R {
match value {
false => COMPARE3R::DISABLED,
true => COMPARE3R::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == COMPARE3R::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == COMPARE3R::ENABLED
}
}
#[doc = "Possible values of the field `COMPARE4`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE4R {
#[doc = "Read: Disabled"]
DISABLED,
#[doc = "Read: Enabled"]
ENABLED,
}
impl COMPARE4R {
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
COMPARE4R::DISABLED => false,
COMPARE4R::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> COMPARE4R {
match value {
false => COMPARE4R::DISABLED,
true => COMPARE4R::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == COMPARE4R::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == COMPARE4R::ENABLED
}
}
#[doc = "Possible values of the field `COMPARE5`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE5R {
#[doc = "Read: Disabled"]
DISABLED,
#[doc = "Read: Enabled"]
ENABLED,
}
impl COMPARE5R {
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
match *self {
COMPARE5R::DISABLED => false,
COMPARE5R::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> COMPARE5R {
match value {
false => COMPARE5R::DISABLED,
true => COMPARE5R::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline]
pub fn is_disabled(&self) -> bool {
*self == COMPARE5R::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline]
pub fn is_enabled(&self) -> bool {
*self == COMPARE5R::ENABLED
}
}
#[doc = "Values that can be written to the field `COMPARE0`"]
pub enum COMPARE0W {
#[doc = "Enable"]
SET,
}
impl COMPARE0W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
COMPARE0W::SET => true,
}
}
}
#[doc = r" Proxy"]
pub struct _COMPARE0W<'a> {
w: &'a mut W,
}
impl<'a> _COMPARE0W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: COMPARE0W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Enable"]
#[inline]
pub fn set(self) -> &'a mut W {
self.variant(COMPARE0W::SET)
}
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 16;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `COMPARE1`"]
pub enum COMPARE1W {
#[doc = "Enable"]
SET,
}
impl COMPARE1W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
COMPARE1W::SET => true,
}
}
}
#[doc = r" Proxy"]
pub struct _COMPARE1W<'a> {
w: &'a mut W,
}
impl<'a> _COMPARE1W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: COMPARE1W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Enable"]
#[inline]
pub fn set(self) -> &'a mut W {
self.variant(COMPARE1W::SET)
}
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 17;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `COMPARE2`"]
pub enum COMPARE2W {
#[doc = "Enable"]
SET,
}
impl COMPARE2W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
COMPARE2W::SET => true,
}
}
}
#[doc = r" Proxy"]
pub struct _COMPARE2W<'a> {
w: &'a mut W,
}
impl<'a> _COMPARE2W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: COMPARE2W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Enable"]
#[inline]
pub fn set(self) -> &'a mut W {
self.variant(COMPARE2W::SET)
}
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 18;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `COMPARE3`"]
pub enum COMPARE3W {
#[doc = "Enable"]
SET,
}
impl COMPARE3W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
COMPARE3W::SET => true,
}
}
}
#[doc = r" Proxy"]
pub struct _COMPARE3W<'a> {
w: &'a mut W,
}
impl<'a> _COMPARE3W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: COMPARE3W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Enable"]
#[inline]
pub fn set(self) -> &'a mut W {
self.variant(COMPARE3W::SET)
}
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 19;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `COMPARE4`"]
pub enum COMPARE4W {
#[doc = "Enable"]
SET,
}
impl COMPARE4W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
COMPARE4W::SET => true,
}
}
}
#[doc = r" Proxy"]
pub struct _COMPARE4W<'a> {
w: &'a mut W,
}
impl<'a> _COMPARE4W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: COMPARE4W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Enable"]
#[inline]
pub fn set(self) -> &'a mut W {
self.variant(COMPARE4W::SET)
}
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 20;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `COMPARE5`"]
pub enum COMPARE5W {
#[doc = "Enable"]
SET,
}
impl COMPARE5W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
COMPARE5W::SET => true,
}
}
}
#[doc = r" Proxy"]
pub struct _COMPARE5W<'a> {
w: &'a mut W,
}
impl<'a> _COMPARE5W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: COMPARE5W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Enable"]
#[inline]
pub fn set(self) -> &'a mut W {
self.variant(COMPARE5W::SET)
}
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 21;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
impl R {
#[doc = r" Value of the register as raw bits"]
#[inline]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bit 16 - Write '1' to Enable interrupt for COMPARE[0] event"]
#[inline]
pub fn compare0(&self) -> COMPARE0R {
COMPARE0R::_from({
const MASK: bool = true;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 17 - Write '1' to Enable interrupt for COMPARE[1] event"]
#[inline]
pub fn compare1(&self) -> COMPARE1R {
COMPARE1R::_from({
const MASK: bool = true;
const OFFSET: u8 = 17;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 18 - Write '1' to Enable interrupt for COMPARE[2] event"]
#[inline]
pub fn compare2(&self) -> COMPARE2R {
COMPARE2R::_from({
const MASK: bool = true;
const OFFSET: u8 = 18;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 19 - Write '1' to Enable interrupt for COMPARE[3] event"]
#[inline]
pub fn compare3(&self) -> COMPARE3R {
COMPARE3R::_from({
const MASK: bool = true;
const OFFSET: u8 = 19;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 20 - Write '1' to Enable interrupt for COMPARE[4] event"]
#[inline]
pub fn compare4(&self) -> COMPARE4R {
COMPARE4R::_from({
const MASK: bool = true;
const OFFSET: u8 = 20;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 21 - Write '1' to Enable interrupt for COMPARE[5] event"]
#[inline]
pub fn compare5(&self) -> COMPARE5R {
COMPARE5R::_from({
const MASK: bool = true;
const OFFSET: u8 = 21;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
}
impl W {
#[doc = r" Reset value of the register"]
#[inline]
pub fn reset_value() -> W {
W { bits: 0 }
}
#[doc = r" Writes raw bits to the register"]
#[inline]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
#[doc = "Bit 16 - Write '1' to Enable interrupt for COMPARE[0] event"]
#[inline]
pub fn compare0(&mut self) -> _COMPARE0W {
_COMPARE0W { w: self }
}
#[doc = "Bit 17 - Write '1' to Enable interrupt for COMPARE[1] event"]
#[inline]
pub fn compare1(&mut self) -> _COMPARE1W {
_COMPARE1W { w: self }
}
#[doc = "Bit 18 - Write '1' to Enable interrupt for COMPARE[2] event"]
#[inline]
pub fn compare2(&mut self) -> _COMPARE2W {
_COMPARE2W { w: self }
}
#[doc = "Bit 19 - Write '1' to Enable interrupt for COMPARE[3] event"]
#[inline]
pub fn compare3(&mut self) -> _COMPARE3W {
_COMPARE3W { w: self }
}
#[doc = "Bit 20 - Write '1' to Enable interrupt for COMPARE[4] event"]
#[inline]
pub fn compare4(&mut self) -> _COMPARE4W {
_COMPARE4W { w: self }
}
#[doc = "Bit 21 - Write '1' to Enable interrupt for COMPARE[5] event"]
#[inline]
pub fn compare5(&mut self) -> _COMPARE5W {
_COMPARE5W { w: self }
}
}