#[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_AHB0_0_SLAVE_RULE {
#[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 `DMA0_RULE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DMA0_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 DMA0_RULER {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
DMA0_RULER::ENUM_NS_NP => 0,
DMA0_RULER::ENUM_NS_P => 1,
DMA0_RULER::ENUM_S_NP => 2,
DMA0_RULER::ENUM_S_P => 3,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> DMA0_RULER {
match value {
0 => DMA0_RULER::ENUM_NS_NP,
1 => DMA0_RULER::ENUM_NS_P,
2 => DMA0_RULER::ENUM_S_NP,
3 => DMA0_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 == DMA0_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 == DMA0_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 == DMA0_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 == DMA0_RULER::ENUM_S_P
}
}
#[doc = "Possible values of the field `FS_USB_DEV_RULE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FS_USB_DEV_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 FS_USB_DEV_RULER {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
FS_USB_DEV_RULER::ENUM_NS_NP => 0,
FS_USB_DEV_RULER::ENUM_NS_P => 1,
FS_USB_DEV_RULER::ENUM_S_NP => 2,
FS_USB_DEV_RULER::ENUM_S_P => 3,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> FS_USB_DEV_RULER {
match value {
0 => FS_USB_DEV_RULER::ENUM_NS_NP,
1 => FS_USB_DEV_RULER::ENUM_NS_P,
2 => FS_USB_DEV_RULER::ENUM_S_NP,
3 => FS_USB_DEV_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 == FS_USB_DEV_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 == FS_USB_DEV_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 == FS_USB_DEV_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 == FS_USB_DEV_RULER::ENUM_S_P
}
}
#[doc = "Possible values of the field `SCT_RULE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SCT_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 SCT_RULER {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
SCT_RULER::ENUM_NS_NP => 0,
SCT_RULER::ENUM_NS_P => 1,
SCT_RULER::ENUM_S_NP => 2,
SCT_RULER::ENUM_S_P => 3,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> SCT_RULER {
match value {
0 => SCT_RULER::ENUM_NS_NP,
1 => SCT_RULER::ENUM_NS_P,
2 => SCT_RULER::ENUM_S_NP,
3 => SCT_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 == SCT_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 == SCT_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 == SCT_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 == SCT_RULER::ENUM_S_P
}
}
#[doc = "Possible values of the field `FLEXCOMM0_RULE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FLEXCOMM0_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 FLEXCOMM0_RULER {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
FLEXCOMM0_RULER::ENUM_NS_NP => 0,
FLEXCOMM0_RULER::ENUM_NS_P => 1,
FLEXCOMM0_RULER::ENUM_S_NP => 2,
FLEXCOMM0_RULER::ENUM_S_P => 3,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> FLEXCOMM0_RULER {
match value {
0 => FLEXCOMM0_RULER::ENUM_NS_NP,
1 => FLEXCOMM0_RULER::ENUM_NS_P,
2 => FLEXCOMM0_RULER::ENUM_S_NP,
3 => FLEXCOMM0_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 == FLEXCOMM0_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 == FLEXCOMM0_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 == FLEXCOMM0_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 == FLEXCOMM0_RULER::ENUM_S_P
}
}
#[doc = "Possible values of the field `FLEXCOMM1_RULE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FLEXCOMM1_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 FLEXCOMM1_RULER {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
FLEXCOMM1_RULER::ENUM_NS_NP => 0,
FLEXCOMM1_RULER::ENUM_NS_P => 1,
FLEXCOMM1_RULER::ENUM_S_NP => 2,
FLEXCOMM1_RULER::ENUM_S_P => 3,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> FLEXCOMM1_RULER {
match value {
0 => FLEXCOMM1_RULER::ENUM_NS_NP,
1 => FLEXCOMM1_RULER::ENUM_NS_P,
2 => FLEXCOMM1_RULER::ENUM_S_NP,
3 => FLEXCOMM1_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 == FLEXCOMM1_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 == FLEXCOMM1_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 == FLEXCOMM1_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 == FLEXCOMM1_RULER::ENUM_S_P
}
}
#[doc = "Values that can be written to the field `DMA0_RULE`"]
pub enum DMA0_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 DMA0_RULEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
DMA0_RULEW::ENUM_NS_NP => 0,
DMA0_RULEW::ENUM_NS_P => 1,
DMA0_RULEW::ENUM_S_NP => 2,
DMA0_RULEW::ENUM_S_P => 3,
}
}
}
#[doc = r" Proxy"]
pub struct _DMA0_RULEW<'a> {
w: &'a mut W,
}
impl<'a> _DMA0_RULEW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: DMA0_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(DMA0_RULEW::ENUM_NS_NP)
}
#[doc = "Non-secure and Privilege access allowed."]
#[inline]
pub fn enum_ns_p(self) -> &'a mut W {
self.variant(DMA0_RULEW::ENUM_NS_P)
}
#[doc = "Secure and Non-priviledge user access allowed."]
#[inline]
pub fn enum_s_np(self) -> &'a mut W {
self.variant(DMA0_RULEW::ENUM_S_NP)
}
#[doc = "Secure and Priviledge user access allowed."]
#[inline]
pub fn enum_s_p(self) -> &'a mut W {
self.variant(DMA0_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 = 8;
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 `FS_USB_DEV_RULE`"]
pub enum FS_USB_DEV_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 FS_USB_DEV_RULEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
FS_USB_DEV_RULEW::ENUM_NS_NP => 0,
FS_USB_DEV_RULEW::ENUM_NS_P => 1,
FS_USB_DEV_RULEW::ENUM_S_NP => 2,
FS_USB_DEV_RULEW::ENUM_S_P => 3,
}
}
}
#[doc = r" Proxy"]
pub struct _FS_USB_DEV_RULEW<'a> {
w: &'a mut W,
}
impl<'a> _FS_USB_DEV_RULEW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: FS_USB_DEV_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(FS_USB_DEV_RULEW::ENUM_NS_NP)
}
#[doc = "Non-secure and Privilege access allowed."]
#[inline]
pub fn enum_ns_p(self) -> &'a mut W {
self.variant(FS_USB_DEV_RULEW::ENUM_NS_P)
}
#[doc = "Secure and Non-priviledge user access allowed."]
#[inline]
pub fn enum_s_np(self) -> &'a mut W {
self.variant(FS_USB_DEV_RULEW::ENUM_S_NP)
}
#[doc = "Secure and Priviledge user access allowed."]
#[inline]
pub fn enum_s_p(self) -> &'a mut W {
self.variant(FS_USB_DEV_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 `SCT_RULE`"]
pub enum SCT_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 SCT_RULEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
SCT_RULEW::ENUM_NS_NP => 0,
SCT_RULEW::ENUM_NS_P => 1,
SCT_RULEW::ENUM_S_NP => 2,
SCT_RULEW::ENUM_S_P => 3,
}
}
}
#[doc = r" Proxy"]
pub struct _SCT_RULEW<'a> {
w: &'a mut W,
}
impl<'a> _SCT_RULEW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: SCT_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(SCT_RULEW::ENUM_NS_NP)
}
#[doc = "Non-secure and Privilege access allowed."]
#[inline]
pub fn enum_ns_p(self) -> &'a mut W {
self.variant(SCT_RULEW::ENUM_NS_P)
}
#[doc = "Secure and Non-priviledge user access allowed."]
#[inline]
pub fn enum_s_np(self) -> &'a mut W {
self.variant(SCT_RULEW::ENUM_S_NP)
}
#[doc = "Secure and Priviledge user access allowed."]
#[inline]
pub fn enum_s_p(self) -> &'a mut W {
self.variant(SCT_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 `FLEXCOMM0_RULE`"]
pub enum FLEXCOMM0_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 FLEXCOMM0_RULEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
FLEXCOMM0_RULEW::ENUM_NS_NP => 0,
FLEXCOMM0_RULEW::ENUM_NS_P => 1,
FLEXCOMM0_RULEW::ENUM_S_NP => 2,
FLEXCOMM0_RULEW::ENUM_S_P => 3,
}
}
}
#[doc = r" Proxy"]
pub struct _FLEXCOMM0_RULEW<'a> {
w: &'a mut W,
}
impl<'a> _FLEXCOMM0_RULEW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: FLEXCOMM0_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(FLEXCOMM0_RULEW::ENUM_NS_NP)
}
#[doc = "Non-secure and Privilege access allowed."]
#[inline]
pub fn enum_ns_p(self) -> &'a mut W {
self.variant(FLEXCOMM0_RULEW::ENUM_NS_P)
}
#[doc = "Secure and Non-priviledge user access allowed."]
#[inline]
pub fn enum_s_np(self) -> &'a mut W {
self.variant(FLEXCOMM0_RULEW::ENUM_S_NP)
}
#[doc = "Secure and Priviledge user access allowed."]
#[inline]
pub fn enum_s_p(self) -> &'a mut W {
self.variant(FLEXCOMM0_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
}
}
#[doc = "Values that can be written to the field `FLEXCOMM1_RULE`"]
pub enum FLEXCOMM1_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 FLEXCOMM1_RULEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
FLEXCOMM1_RULEW::ENUM_NS_NP => 0,
FLEXCOMM1_RULEW::ENUM_NS_P => 1,
FLEXCOMM1_RULEW::ENUM_S_NP => 2,
FLEXCOMM1_RULEW::ENUM_S_P => 3,
}
}
}
#[doc = r" Proxy"]
pub struct _FLEXCOMM1_RULEW<'a> {
w: &'a mut W,
}
impl<'a> _FLEXCOMM1_RULEW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: FLEXCOMM1_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(FLEXCOMM1_RULEW::ENUM_NS_NP)
}
#[doc = "Non-secure and Privilege access allowed."]
#[inline]
pub fn enum_ns_p(self) -> &'a mut W {
self.variant(FLEXCOMM1_RULEW::ENUM_NS_P)
}
#[doc = "Secure and Non-priviledge user access allowed."]
#[inline]
pub fn enum_s_np(self) -> &'a mut W {
self.variant(FLEXCOMM1_RULEW::ENUM_S_NP)
}
#[doc = "Secure and Priviledge user access allowed."]
#[inline]
pub fn enum_s_p(self) -> &'a mut W {
self.variant(FLEXCOMM1_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 = 28;
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 8:9 - DMA Controller"]
#[inline]
pub fn dma0_rule(&self) -> DMA0_RULER {
DMA0_RULER::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 16:17 - USB Full-speed device"]
#[inline]
pub fn fs_usb_dev_rule(&self) -> FS_USB_DEV_RULER {
FS_USB_DEV_RULER::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 20:21 - SCTimer"]
#[inline]
pub fn sct_rule(&self) -> SCT_RULER {
SCT_RULER::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 20;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 24:25 - Flexcomm interface 0"]
#[inline]
pub fn flexcomm0_rule(&self) -> FLEXCOMM0_RULER {
FLEXCOMM0_RULER::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 24;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 28:29 - Flexcomm interface 1"]
#[inline]
pub fn flexcomm1_rule(&self) -> FLEXCOMM1_RULER {
FLEXCOMM1_RULER::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 28;
((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 8:9 - DMA Controller"]
#[inline]
pub fn dma0_rule(&mut self) -> _DMA0_RULEW {
_DMA0_RULEW { w: self }
}
#[doc = "Bits 16:17 - USB Full-speed device"]
#[inline]
pub fn fs_usb_dev_rule(&mut self) -> _FS_USB_DEV_RULEW {
_FS_USB_DEV_RULEW { w: self }
}
#[doc = "Bits 20:21 - SCTimer"]
#[inline]
pub fn sct_rule(&mut self) -> _SCT_RULEW {
_SCT_RULEW { w: self }
}
#[doc = "Bits 24:25 - Flexcomm interface 0"]
#[inline]
pub fn flexcomm0_rule(&mut self) -> _FLEXCOMM0_RULEW {
_FLEXCOMM0_RULEW { w: self }
}
#[doc = "Bits 28:29 - Flexcomm interface 1"]
#[inline]
pub fn flexcomm1_rule(&mut self) -> _FLEXCOMM1_RULEW {
_FLEXCOMM1_RULEW { w: self }
}
}