#[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::ATCR {
#[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 `EN`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENR {
#[doc = "The timer stops at the current value."]
_0,
#[doc = "The timer starts incrementing."]
_1,
}
impl ENR {
#[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 {
ENR::_0 => false,
ENR::_1 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> ENR {
match value {
false => ENR::_0,
true => ENR::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline]
pub fn is_0(&self) -> bool {
*self == ENR::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline]
pub fn is_1(&self) -> bool {
*self == ENR::_1
}
}
#[doc = "Possible values of the field `OFFEN`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OFFENR {
#[doc = "Disable."]
_0,
#[doc = "The timer can be reset to zero when the given offset time is reached (offset event). The field is cleared when the offset event is reached, so no further event occurs until the field is set again. The timer offset value must be set before setting this field."]
_1,
}
impl OFFENR {
#[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 {
OFFENR::_0 => false,
OFFENR::_1 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> OFFENR {
match value {
false => OFFENR::_0,
true => OFFENR::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline]
pub fn is_0(&self) -> bool {
*self == OFFENR::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline]
pub fn is_1(&self) -> bool {
*self == OFFENR::_1
}
}
#[doc = "Possible values of the field `OFFRST`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OFFRSTR {
#[doc = "The timer is not affected and no action occurs, besides clearing OFFEN, when the offset is reached."]
_0,
#[doc = "If OFFEN is set, the timer resets to zero when the offset setting is reached. The offset event does not cause a timer interrupt."]
_1,
}
impl OFFRSTR {
#[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 {
OFFRSTR::_0 => false,
OFFRSTR::_1 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> OFFRSTR {
match value {
false => OFFRSTR::_0,
true => OFFRSTR::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline]
pub fn is_0(&self) -> bool {
*self == OFFRSTR::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline]
pub fn is_1(&self) -> bool {
*self == OFFRSTR::_1
}
}
#[doc = "Possible values of the field `PEREN`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PERENR {
#[doc = "Disable."]
_0,
#[doc = "A period event interrupt can be generated (EIR\\[TS_TIMER\\]) and the event signal output is asserted when the timer wraps around according to the periodic setting ATPER. The timer period value must be set before setting this bit. Not all devices contain the event signal output. See the chip configuration details."]
_1,
}
impl PERENR {
#[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 {
PERENR::_0 => false,
PERENR::_1 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> PERENR {
match value {
false => PERENR::_0,
true => PERENR::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline]
pub fn is_0(&self) -> bool {
*self == PERENR::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline]
pub fn is_1(&self) -> bool {
*self == PERENR::_1
}
}
#[doc = "Possible values of the field `PINPER`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PINPERR {
#[doc = "Disable."]
_0,
#[doc = "Enable."]
_1,
}
impl PINPERR {
#[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 {
PINPERR::_0 => false,
PINPERR::_1 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> PINPERR {
match value {
false => PINPERR::_0,
true => PINPERR::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline]
pub fn is_0(&self) -> bool {
*self == PINPERR::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline]
pub fn is_1(&self) -> bool {
*self == PINPERR::_1
}
}
#[doc = r" Value of the field"]
pub struct RESTARTR {
bits: bool,
}
impl RESTARTR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[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 = "Possible values of the field `CAPTURE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CAPTURER {
#[doc = "No effect."]
_0,
#[doc = "The current time is captured and can be read from the ATVR register."]
_1,
}
impl CAPTURER {
#[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 {
CAPTURER::_0 => false,
CAPTURER::_1 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> CAPTURER {
match value {
false => CAPTURER::_0,
true => CAPTURER::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline]
pub fn is_0(&self) -> bool {
*self == CAPTURER::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline]
pub fn is_1(&self) -> bool {
*self == CAPTURER::_1
}
}
#[doc = "Possible values of the field `SLAVE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SLAVER {
#[doc = "The timer is active and all configuration fields in this register are relevant."]
_0,
#[doc = "The internal timer is disabled and the externally provided timer value is used. All other fields, except CAPTURE, in this register have no effect. CAPTURE can still be used to capture the current timer value."]
_1,
}
impl SLAVER {
#[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 {
SLAVER::_0 => false,
SLAVER::_1 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> SLAVER {
match value {
false => SLAVER::_0,
true => SLAVER::_1,
}
}
#[doc = "Checks if the value of the field is `_0`"]
#[inline]
pub fn is_0(&self) -> bool {
*self == SLAVER::_0
}
#[doc = "Checks if the value of the field is `_1`"]
#[inline]
pub fn is_1(&self) -> bool {
*self == SLAVER::_1
}
}
#[doc = "Values that can be written to the field `EN`"]
pub enum ENW {
#[doc = "The timer stops at the current value."]
_0,
#[doc = "The timer starts incrementing."]
_1,
}
impl ENW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
ENW::_0 => false,
ENW::_1 => true,
}
}
}
#[doc = r" Proxy"]
pub struct _ENW<'a> {
w: &'a mut W,
}
impl<'a> _ENW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: ENW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "The timer stops at the current value."]
#[inline]
pub fn _0(self) -> &'a mut W {
self.variant(ENW::_0)
}
#[doc = "The timer starts incrementing."]
#[inline]
pub fn _1(self) -> &'a mut W {
self.variant(ENW::_1)
}
#[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 = 0;
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 `OFFEN`"]
pub enum OFFENW {
#[doc = "Disable."]
_0,
#[doc = "The timer can be reset to zero when the given offset time is reached (offset event). The field is cleared when the offset event is reached, so no further event occurs until the field is set again. The timer offset value must be set before setting this field."]
_1,
}
impl OFFENW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
OFFENW::_0 => false,
OFFENW::_1 => true,
}
}
}
#[doc = r" Proxy"]
pub struct _OFFENW<'a> {
w: &'a mut W,
}
impl<'a> _OFFENW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: OFFENW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disable."]
#[inline]
pub fn _0(self) -> &'a mut W {
self.variant(OFFENW::_0)
}
#[doc = "The timer can be reset to zero when the given offset time is reached (offset event). The field is cleared when the offset event is reached, so no further event occurs until the field is set again. The timer offset value must be set before setting this field."]
#[inline]
pub fn _1(self) -> &'a mut W {
self.variant(OFFENW::_1)
}
#[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 = 2;
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 `OFFRST`"]
pub enum OFFRSTW {
#[doc = "The timer is not affected and no action occurs, besides clearing OFFEN, when the offset is reached."]
_0,
#[doc = "If OFFEN is set, the timer resets to zero when the offset setting is reached. The offset event does not cause a timer interrupt."]
_1,
}
impl OFFRSTW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
OFFRSTW::_0 => false,
OFFRSTW::_1 => true,
}
}
}
#[doc = r" Proxy"]
pub struct _OFFRSTW<'a> {
w: &'a mut W,
}
impl<'a> _OFFRSTW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: OFFRSTW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "The timer is not affected and no action occurs, besides clearing OFFEN, when the offset is reached."]
#[inline]
pub fn _0(self) -> &'a mut W {
self.variant(OFFRSTW::_0)
}
#[doc = "If OFFEN is set, the timer resets to zero when the offset setting is reached. The offset event does not cause a timer interrupt."]
#[inline]
pub fn _1(self) -> &'a mut W {
self.variant(OFFRSTW::_1)
}
#[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 = 3;
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 `PEREN`"]
pub enum PERENW {
#[doc = "Disable."]
_0,
#[doc = "A period event interrupt can be generated (EIR\\[TS_TIMER\\]) and the event signal output is asserted when the timer wraps around according to the periodic setting ATPER. The timer period value must be set before setting this bit. Not all devices contain the event signal output. See the chip configuration details."]
_1,
}
impl PERENW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
PERENW::_0 => false,
PERENW::_1 => true,
}
}
}
#[doc = r" Proxy"]
pub struct _PERENW<'a> {
w: &'a mut W,
}
impl<'a> _PERENW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: PERENW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disable."]
#[inline]
pub fn _0(self) -> &'a mut W {
self.variant(PERENW::_0)
}
#[doc = "A period event interrupt can be generated (EIR\\[TS_TIMER\\]) and the event signal output is asserted when the timer wraps around according to the periodic setting ATPER. The timer period value must be set before setting this bit. Not all devices contain the event signal output. See the chip configuration details."]
#[inline]
pub fn _1(self) -> &'a mut W {
self.variant(PERENW::_1)
}
#[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 = 4;
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 `PINPER`"]
pub enum PINPERW {
#[doc = "Disable."]
_0,
#[doc = "Enable."]
_1,
}
impl PINPERW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
PINPERW::_0 => false,
PINPERW::_1 => true,
}
}
}
#[doc = r" Proxy"]
pub struct _PINPERW<'a> {
w: &'a mut W,
}
impl<'a> _PINPERW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: PINPERW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Disable."]
#[inline]
pub fn _0(self) -> &'a mut W {
self.variant(PINPERW::_0)
}
#[doc = "Enable."]
#[inline]
pub fn _1(self) -> &'a mut W {
self.variant(PINPERW::_1)
}
#[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 = 7;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _RESTARTW<'a> {
w: &'a mut W,
}
impl<'a> _RESTARTW<'a> {
#[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 = 9;
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 `CAPTURE`"]
pub enum CAPTUREW {
#[doc = "No effect."]
_0,
#[doc = "The current time is captured and can be read from the ATVR register."]
_1,
}
impl CAPTUREW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
CAPTUREW::_0 => false,
CAPTUREW::_1 => true,
}
}
}
#[doc = r" Proxy"]
pub struct _CAPTUREW<'a> {
w: &'a mut W,
}
impl<'a> _CAPTUREW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: CAPTUREW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "No effect."]
#[inline]
pub fn _0(self) -> &'a mut W {
self.variant(CAPTUREW::_0)
}
#[doc = "The current time is captured and can be read from the ATVR register."]
#[inline]
pub fn _1(self) -> &'a mut W {
self.variant(CAPTUREW::_1)
}
#[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 = 11;
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 `SLAVE`"]
pub enum SLAVEW {
#[doc = "The timer is active and all configuration fields in this register are relevant."]
_0,
#[doc = "The internal timer is disabled and the externally provided timer value is used. All other fields, except CAPTURE, in this register have no effect. CAPTURE can still be used to capture the current timer value."]
_1,
}
impl SLAVEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> bool {
match *self {
SLAVEW::_0 => false,
SLAVEW::_1 => true,
}
}
}
#[doc = r" Proxy"]
pub struct _SLAVEW<'a> {
w: &'a mut W,
}
impl<'a> _SLAVEW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: SLAVEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "The timer is active and all configuration fields in this register are relevant."]
#[inline]
pub fn _0(self) -> &'a mut W {
self.variant(SLAVEW::_0)
}
#[doc = "The internal timer is disabled and the externally provided timer value is used. All other fields, except CAPTURE, in this register have no effect. CAPTURE can still be used to capture the current timer value."]
#[inline]
pub fn _1(self) -> &'a mut W {
self.variant(SLAVEW::_1)
}
#[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 = 13;
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 0 - Enable Timer"]
#[inline]
pub fn en(&self) -> ENR {
ENR::_from({
const MASK: bool = true;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 2 - Enable One-Shot Offset Event"]
#[inline]
pub fn offen(&self) -> OFFENR {
OFFENR::_from({
const MASK: bool = true;
const OFFSET: u8 = 2;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 3 - Reset Timer On Offset Event"]
#[inline]
pub fn offrst(&self) -> OFFRSTR {
OFFRSTR::_from({
const MASK: bool = true;
const OFFSET: u8 = 3;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 4 - Enable Periodical Event"]
#[inline]
pub fn peren(&self) -> PERENR {
PERENR::_from({
const MASK: bool = true;
const OFFSET: u8 = 4;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 7 - Enables event signal output assertion on period event"]
#[inline]
pub fn pinper(&self) -> PINPERR {
PINPERR::_from({
const MASK: bool = true;
const OFFSET: u8 = 7;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 9 - Reset Timer"]
#[inline]
pub fn restart(&self) -> RESTARTR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 9;
((self.bits >> OFFSET) & MASK as u32) != 0
};
RESTARTR { bits }
}
#[doc = "Bit 11 - Capture Timer Value"]
#[inline]
pub fn capture(&self) -> CAPTURER {
CAPTURER::_from({
const MASK: bool = true;
const OFFSET: u8 = 11;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 13 - Enable Timer Slave Mode"]
#[inline]
pub fn slave(&self) -> SLAVER {
SLAVER::_from({
const MASK: bool = true;
const OFFSET: u8 = 13;
((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 0 - Enable Timer"]
#[inline]
pub fn en(&mut self) -> _ENW {
_ENW { w: self }
}
#[doc = "Bit 2 - Enable One-Shot Offset Event"]
#[inline]
pub fn offen(&mut self) -> _OFFENW {
_OFFENW { w: self }
}
#[doc = "Bit 3 - Reset Timer On Offset Event"]
#[inline]
pub fn offrst(&mut self) -> _OFFRSTW {
_OFFRSTW { w: self }
}
#[doc = "Bit 4 - Enable Periodical Event"]
#[inline]
pub fn peren(&mut self) -> _PERENW {
_PERENW { w: self }
}
#[doc = "Bit 7 - Enables event signal output assertion on period event"]
#[inline]
pub fn pinper(&mut self) -> _PINPERW {
_PINPERW { w: self }
}
#[doc = "Bit 9 - Reset Timer"]
#[inline]
pub fn restart(&mut self) -> _RESTARTW {
_RESTARTW { w: self }
}
#[doc = "Bit 11 - Capture Timer Value"]
#[inline]
pub fn capture(&mut self) -> _CAPTUREW {
_CAPTUREW { w: self }
}
#[doc = "Bit 13 - Enable Timer Slave Mode"]
#[inline]
pub fn slave(&mut self) -> _SLAVEW {
_SLAVEW { w: self }
}
}