#[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::SEC_CTRL_APB_BRIDGE0_MEM_CTRL1 {
#[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 `CTIMER0_RULE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTIMER0_RULER {
#[doc = "Non-secure and Non-priviledge user access allowed."]
ENUM_NS_NP,
#[doc = "Non-secure and Privilege access allowed."]
ENUM_NS_P,
#[doc = "Secure and Non-priviledge user access allowed."]
ENUM_S_NP,
#[doc = "Secure and Priviledge user access allowed."]
ENUM_S_P,
}
impl CTIMER0_RULER {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
CTIMER0_RULER::ENUM_NS_NP => 0,
CTIMER0_RULER::ENUM_NS_P => 1,
CTIMER0_RULER::ENUM_S_NP => 2,
CTIMER0_RULER::ENUM_S_P => 3,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> CTIMER0_RULER {
match value {
0 => CTIMER0_RULER::ENUM_NS_NP,
1 => CTIMER0_RULER::ENUM_NS_P,
2 => CTIMER0_RULER::ENUM_S_NP,
3 => CTIMER0_RULER::ENUM_S_P,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `ENUM_NS_NP`"]
#[inline]
pub fn is_enum_ns_np(&self) -> bool {
*self == CTIMER0_RULER::ENUM_NS_NP
}
#[doc = "Checks if the value of the field is `ENUM_NS_P`"]
#[inline]
pub fn is_enum_ns_p(&self) -> bool {
*self == CTIMER0_RULER::ENUM_NS_P
}
#[doc = "Checks if the value of the field is `ENUM_S_NP`"]
#[inline]
pub fn is_enum_s_np(&self) -> bool {
*self == CTIMER0_RULER::ENUM_S_NP
}
#[doc = "Checks if the value of the field is `ENUM_S_P`"]
#[inline]
pub fn is_enum_s_p(&self) -> bool {
*self == CTIMER0_RULER::ENUM_S_P
}
}
#[doc = "Possible values of the field `CTIMER1_RULE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTIMER1_RULER {
#[doc = "Non-secure and Non-priviledge user access allowed."]
ENUM_NS_NP,
#[doc = "Non-secure and Privilege access allowed."]
ENUM_NS_P,
#[doc = "Secure and Non-priviledge user access allowed."]
ENUM_S_NP,
#[doc = "Secure and Priviledge user access allowed."]
ENUM_S_P,
}
impl CTIMER1_RULER {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
CTIMER1_RULER::ENUM_NS_NP => 0,
CTIMER1_RULER::ENUM_NS_P => 1,
CTIMER1_RULER::ENUM_S_NP => 2,
CTIMER1_RULER::ENUM_S_P => 3,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> CTIMER1_RULER {
match value {
0 => CTIMER1_RULER::ENUM_NS_NP,
1 => CTIMER1_RULER::ENUM_NS_P,
2 => CTIMER1_RULER::ENUM_S_NP,
3 => CTIMER1_RULER::ENUM_S_P,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `ENUM_NS_NP`"]
#[inline]
pub fn is_enum_ns_np(&self) -> bool {
*self == CTIMER1_RULER::ENUM_NS_NP
}
#[doc = "Checks if the value of the field is `ENUM_NS_P`"]
#[inline]
pub fn is_enum_ns_p(&self) -> bool {
*self == CTIMER1_RULER::ENUM_NS_P
}
#[doc = "Checks if the value of the field is `ENUM_S_NP`"]
#[inline]
pub fn is_enum_s_np(&self) -> bool {
*self == CTIMER1_RULER::ENUM_S_NP
}
#[doc = "Checks if the value of the field is `ENUM_S_P`"]
#[inline]
pub fn is_enum_s_p(&self) -> bool {
*self == CTIMER1_RULER::ENUM_S_P
}
}
#[doc = "Possible values of the field `WWDT_RULE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum WWDT_RULER {
#[doc = "Non-secure and Non-priviledge user access allowed."]
ENUM_NS_NP,
#[doc = "Non-secure and Privilege access allowed."]
ENUM_NS_P,
#[doc = "Secure and Non-priviledge user access allowed."]
ENUM_S_NP,
#[doc = "Secure and Priviledge user access allowed."]
ENUM_S_P,
}
impl WWDT_RULER {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
WWDT_RULER::ENUM_NS_NP => 0,
WWDT_RULER::ENUM_NS_P => 1,
WWDT_RULER::ENUM_S_NP => 2,
WWDT_RULER::ENUM_S_P => 3,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> WWDT_RULER {
match value {
0 => WWDT_RULER::ENUM_NS_NP,
1 => WWDT_RULER::ENUM_NS_P,
2 => WWDT_RULER::ENUM_S_NP,
3 => WWDT_RULER::ENUM_S_P,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `ENUM_NS_NP`"]
#[inline]
pub fn is_enum_ns_np(&self) -> bool {
*self == WWDT_RULER::ENUM_NS_NP
}
#[doc = "Checks if the value of the field is `ENUM_NS_P`"]
#[inline]
pub fn is_enum_ns_p(&self) -> bool {
*self == WWDT_RULER::ENUM_NS_P
}
#[doc = "Checks if the value of the field is `ENUM_S_NP`"]
#[inline]
pub fn is_enum_s_np(&self) -> bool {
*self == WWDT_RULER::ENUM_S_NP
}
#[doc = "Checks if the value of the field is `ENUM_S_P`"]
#[inline]
pub fn is_enum_s_p(&self) -> bool {
*self == WWDT_RULER::ENUM_S_P
}
}
#[doc = "Possible values of the field `MRT_RULE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MRT_RULER {
#[doc = "Non-secure and Non-priviledge user access allowed."]
ENUM_NS_NP,
#[doc = "Non-secure and Privilege access allowed."]
ENUM_NS_P,
#[doc = "Secure and Non-priviledge user access allowed."]
ENUM_S_NP,
#[doc = "Secure and Priviledge user access allowed."]
ENUM_S_P,
}
impl MRT_RULER {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
MRT_RULER::ENUM_NS_NP => 0,
MRT_RULER::ENUM_NS_P => 1,
MRT_RULER::ENUM_S_NP => 2,
MRT_RULER::ENUM_S_P => 3,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> MRT_RULER {
match value {
0 => MRT_RULER::ENUM_NS_NP,
1 => MRT_RULER::ENUM_NS_P,
2 => MRT_RULER::ENUM_S_NP,
3 => MRT_RULER::ENUM_S_P,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `ENUM_NS_NP`"]
#[inline]
pub fn is_enum_ns_np(&self) -> bool {
*self == MRT_RULER::ENUM_NS_NP
}
#[doc = "Checks if the value of the field is `ENUM_NS_P`"]
#[inline]
pub fn is_enum_ns_p(&self) -> bool {
*self == MRT_RULER::ENUM_NS_P
}
#[doc = "Checks if the value of the field is `ENUM_S_NP`"]
#[inline]
pub fn is_enum_s_np(&self) -> bool {
*self == MRT_RULER::ENUM_S_NP
}
#[doc = "Checks if the value of the field is `ENUM_S_P`"]
#[inline]
pub fn is_enum_s_p(&self) -> bool {
*self == MRT_RULER::ENUM_S_P
}
}
#[doc = "Possible values of the field `UTICK_RULE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UTICK_RULER {
#[doc = "Non-secure and Non-priviledge user access allowed."]
ENUM_NS_NP,
#[doc = "Non-secure and Privilege access allowed."]
ENUM_NS_P,
#[doc = "Secure and Non-priviledge user access allowed."]
ENUM_S_NP,
#[doc = "Secure and Priviledge user access allowed."]
ENUM_S_P,
}
impl UTICK_RULER {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
UTICK_RULER::ENUM_NS_NP => 0,
UTICK_RULER::ENUM_NS_P => 1,
UTICK_RULER::ENUM_S_NP => 2,
UTICK_RULER::ENUM_S_P => 3,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> UTICK_RULER {
match value {
0 => UTICK_RULER::ENUM_NS_NP,
1 => UTICK_RULER::ENUM_NS_P,
2 => UTICK_RULER::ENUM_S_NP,
3 => UTICK_RULER::ENUM_S_P,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `ENUM_NS_NP`"]
#[inline]
pub fn is_enum_ns_np(&self) -> bool {
*self == UTICK_RULER::ENUM_NS_NP
}
#[doc = "Checks if the value of the field is `ENUM_NS_P`"]
#[inline]
pub fn is_enum_ns_p(&self) -> bool {
*self == UTICK_RULER::ENUM_NS_P
}
#[doc = "Checks if the value of the field is `ENUM_S_NP`"]
#[inline]
pub fn is_enum_s_np(&self) -> bool {
*self == UTICK_RULER::ENUM_S_NP
}
#[doc = "Checks if the value of the field is `ENUM_S_P`"]
#[inline]
pub fn is_enum_s_p(&self) -> bool {
*self == UTICK_RULER::ENUM_S_P
}
}
#[doc = "Values that can be written to the field `CTIMER0_RULE`"]
pub enum CTIMER0_RULEW {
#[doc = "Non-secure and Non-priviledge user access allowed."]
ENUM_NS_NP,
#[doc = "Non-secure and Privilege access allowed."]
ENUM_NS_P,
#[doc = "Secure and Non-priviledge user access allowed."]
ENUM_S_NP,
#[doc = "Secure and Priviledge user access allowed."]
ENUM_S_P,
}
impl CTIMER0_RULEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
CTIMER0_RULEW::ENUM_NS_NP => 0,
CTIMER0_RULEW::ENUM_NS_P => 1,
CTIMER0_RULEW::ENUM_S_NP => 2,
CTIMER0_RULEW::ENUM_S_P => 3,
}
}
}
#[doc = r" Proxy"]
pub struct _CTIMER0_RULEW<'a> {
w: &'a mut W,
}
impl<'a> _CTIMER0_RULEW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: CTIMER0_RULEW) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "Non-secure and Non-priviledge user access allowed."]
#[inline]
pub fn enum_ns_np(self) -> &'a mut W {
self.variant(CTIMER0_RULEW::ENUM_NS_NP)
}
#[doc = "Non-secure and Privilege access allowed."]
#[inline]
pub fn enum_ns_p(self) -> &'a mut W {
self.variant(CTIMER0_RULEW::ENUM_NS_P)
}
#[doc = "Secure and Non-priviledge user access allowed."]
#[inline]
pub fn enum_s_np(self) -> &'a mut W {
self.variant(CTIMER0_RULEW::ENUM_S_NP)
}
#[doc = "Secure and Priviledge user access allowed."]
#[inline]
pub fn enum_s_p(self) -> &'a mut W {
self.variant(CTIMER0_RULEW::ENUM_S_P)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
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 `CTIMER1_RULE`"]
pub enum CTIMER1_RULEW {
#[doc = "Non-secure and Non-priviledge user access allowed."]
ENUM_NS_NP,
#[doc = "Non-secure and Privilege access allowed."]
ENUM_NS_P,
#[doc = "Secure and Non-priviledge user access allowed."]
ENUM_S_NP,
#[doc = "Secure and Priviledge user access allowed."]
ENUM_S_P,
}
impl CTIMER1_RULEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
CTIMER1_RULEW::ENUM_NS_NP => 0,
CTIMER1_RULEW::ENUM_NS_P => 1,
CTIMER1_RULEW::ENUM_S_NP => 2,
CTIMER1_RULEW::ENUM_S_P => 3,
}
}
}
#[doc = r" Proxy"]
pub struct _CTIMER1_RULEW<'a> {
w: &'a mut W,
}
impl<'a> _CTIMER1_RULEW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: CTIMER1_RULEW) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "Non-secure and Non-priviledge user access allowed."]
#[inline]
pub fn enum_ns_np(self) -> &'a mut W {
self.variant(CTIMER1_RULEW::ENUM_NS_NP)
}
#[doc = "Non-secure and Privilege access allowed."]
#[inline]
pub fn enum_ns_p(self) -> &'a mut W {
self.variant(CTIMER1_RULEW::ENUM_NS_P)
}
#[doc = "Secure and Non-priviledge user access allowed."]
#[inline]
pub fn enum_s_np(self) -> &'a mut W {
self.variant(CTIMER1_RULEW::ENUM_S_NP)
}
#[doc = "Secure and Priviledge user access allowed."]
#[inline]
pub fn enum_s_p(self) -> &'a mut W {
self.variant(CTIMER1_RULEW::ENUM_S_P)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
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 `WWDT_RULE`"]
pub enum WWDT_RULEW {
#[doc = "Non-secure and Non-priviledge user access allowed."]
ENUM_NS_NP,
#[doc = "Non-secure and Privilege access allowed."]
ENUM_NS_P,
#[doc = "Secure and Non-priviledge user access allowed."]
ENUM_S_NP,
#[doc = "Secure and Priviledge user access allowed."]
ENUM_S_P,
}
impl WWDT_RULEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
WWDT_RULEW::ENUM_NS_NP => 0,
WWDT_RULEW::ENUM_NS_P => 1,
WWDT_RULEW::ENUM_S_NP => 2,
WWDT_RULEW::ENUM_S_P => 3,
}
}
}
#[doc = r" Proxy"]
pub struct _WWDT_RULEW<'a> {
w: &'a mut W,
}
impl<'a> _WWDT_RULEW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: WWDT_RULEW) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "Non-secure and Non-priviledge user access allowed."]
#[inline]
pub fn enum_ns_np(self) -> &'a mut W {
self.variant(WWDT_RULEW::ENUM_NS_NP)
}
#[doc = "Non-secure and Privilege access allowed."]
#[inline]
pub fn enum_ns_p(self) -> &'a mut W {
self.variant(WWDT_RULEW::ENUM_NS_P)
}
#[doc = "Secure and Non-priviledge user access allowed."]
#[inline]
pub fn enum_s_np(self) -> &'a mut W {
self.variant(WWDT_RULEW::ENUM_S_NP)
}
#[doc = "Secure and Priviledge user access allowed."]
#[inline]
pub fn enum_s_p(self) -> &'a mut W {
self.variant(WWDT_RULEW::ENUM_S_P)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
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 `MRT_RULE`"]
pub enum MRT_RULEW {
#[doc = "Non-secure and Non-priviledge user access allowed."]
ENUM_NS_NP,
#[doc = "Non-secure and Privilege access allowed."]
ENUM_NS_P,
#[doc = "Secure and Non-priviledge user access allowed."]
ENUM_S_NP,
#[doc = "Secure and Priviledge user access allowed."]
ENUM_S_P,
}
impl MRT_RULEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
MRT_RULEW::ENUM_NS_NP => 0,
MRT_RULEW::ENUM_NS_P => 1,
MRT_RULEW::ENUM_S_NP => 2,
MRT_RULEW::ENUM_S_P => 3,
}
}
}
#[doc = r" Proxy"]
pub struct _MRT_RULEW<'a> {
w: &'a mut W,
}
impl<'a> _MRT_RULEW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: MRT_RULEW) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "Non-secure and Non-priviledge user access allowed."]
#[inline]
pub fn enum_ns_np(self) -> &'a mut W {
self.variant(MRT_RULEW::ENUM_NS_NP)
}
#[doc = "Non-secure and Privilege access allowed."]
#[inline]
pub fn enum_ns_p(self) -> &'a mut W {
self.variant(MRT_RULEW::ENUM_NS_P)
}
#[doc = "Secure and Non-priviledge user access allowed."]
#[inline]
pub fn enum_s_np(self) -> &'a mut W {
self.variant(MRT_RULEW::ENUM_S_NP)
}
#[doc = "Secure and Priviledge user access allowed."]
#[inline]
pub fn enum_s_p(self) -> &'a mut W {
self.variant(MRT_RULEW::ENUM_S_P)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
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 `UTICK_RULE`"]
pub enum UTICK_RULEW {
#[doc = "Non-secure and Non-priviledge user access allowed."]
ENUM_NS_NP,
#[doc = "Non-secure and Privilege access allowed."]
ENUM_NS_P,
#[doc = "Secure and Non-priviledge user access allowed."]
ENUM_S_NP,
#[doc = "Secure and Priviledge user access allowed."]
ENUM_S_P,
}
impl UTICK_RULEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
UTICK_RULEW::ENUM_NS_NP => 0,
UTICK_RULEW::ENUM_NS_P => 1,
UTICK_RULEW::ENUM_S_NP => 2,
UTICK_RULEW::ENUM_S_P => 3,
}
}
}
#[doc = r" Proxy"]
pub struct _UTICK_RULEW<'a> {
w: &'a mut W,
}
impl<'a> _UTICK_RULEW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: UTICK_RULEW) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "Non-secure and Non-priviledge user access allowed."]
#[inline]
pub fn enum_ns_np(self) -> &'a mut W {
self.variant(UTICK_RULEW::ENUM_NS_NP)
}
#[doc = "Non-secure and Privilege access allowed."]
#[inline]
pub fn enum_ns_p(self) -> &'a mut W {
self.variant(UTICK_RULEW::ENUM_NS_P)
}
#[doc = "Secure and Non-priviledge user access allowed."]
#[inline]
pub fn enum_s_np(self) -> &'a mut W {
self.variant(UTICK_RULEW::ENUM_S_NP)
}
#[doc = "Secure and Priviledge user access allowed."]
#[inline]
pub fn enum_s_p(self) -> &'a mut W {
self.variant(UTICK_RULEW::ENUM_S_P)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 24;
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 = "Bits 0:1 - Standard counter/Timer 0"]
#[inline]
pub fn ctimer0_rule(&self) -> CTIMER0_RULER {
CTIMER0_RULER::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 4:5 - Standard counter/Timer 1"]
#[inline]
pub fn ctimer1_rule(&self) -> CTIMER1_RULER {
CTIMER1_RULER::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 4;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 16:17 - Windiwed wtachdog Timer"]
#[inline]
pub fn wwdt_rule(&self) -> WWDT_RULER {
WWDT_RULER::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 20:21 - Multi-rate Timer"]
#[inline]
pub fn mrt_rule(&self) -> MRT_RULER {
MRT_RULER::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 20;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 24:25 - Micro-Timer"]
#[inline]
pub fn utick_rule(&self) -> UTICK_RULER {
UTICK_RULER::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 24;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
}
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 = "Bits 0:1 - Standard counter/Timer 0"]
#[inline]
pub fn ctimer0_rule(&mut self) -> _CTIMER0_RULEW {
_CTIMER0_RULEW { w: self }
}
#[doc = "Bits 4:5 - Standard counter/Timer 1"]
#[inline]
pub fn ctimer1_rule(&mut self) -> _CTIMER1_RULEW {
_CTIMER1_RULEW { w: self }
}
#[doc = "Bits 16:17 - Windiwed wtachdog Timer"]
#[inline]
pub fn wwdt_rule(&mut self) -> _WWDT_RULEW {
_WWDT_RULEW { w: self }
}
#[doc = "Bits 20:21 - Multi-rate Timer"]
#[inline]
pub fn mrt_rule(&mut self) -> _MRT_RULEW {
_MRT_RULEW { w: self }
}
#[doc = "Bits 24:25 - Micro-Timer"]
#[inline]
pub fn utick_rule(&mut self) -> _UTICK_RULEW {
_UTICK_RULEW { w: self }
}
}