#[doc = "EMR"]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Emr(pub u32);
impl Emr {
#[doc = "Event mask on line x"]
#[must_use]
#[inline(always)]
pub const fn em0(&self) -> bool {
let val = (self.0 >> 0usize) & 0x01;
val != 0
}
#[doc = "Event mask on line x"]
#[inline(always)]
pub const fn set_em0(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
}
#[doc = "Event mask on line x"]
#[must_use]
#[inline(always)]
pub const fn em1(&self) -> bool {
let val = (self.0 >> 1usize) & 0x01;
val != 0
}
#[doc = "Event mask on line x"]
#[inline(always)]
pub const fn set_em1(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
}
#[doc = "Event mask on line x"]
#[must_use]
#[inline(always)]
pub const fn em2(&self) -> bool {
let val = (self.0 >> 2usize) & 0x01;
val != 0
}
#[doc = "Event mask on line x"]
#[inline(always)]
pub const fn set_em2(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
}
#[doc = "Event mask on line x"]
#[must_use]
#[inline(always)]
pub const fn em3(&self) -> bool {
let val = (self.0 >> 3usize) & 0x01;
val != 0
}
#[doc = "Event mask on line x"]
#[inline(always)]
pub const fn set_em3(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
}
#[doc = "Event mask on line x"]
#[must_use]
#[inline(always)]
pub const fn em4(&self) -> bool {
let val = (self.0 >> 4usize) & 0x01;
val != 0
}
#[doc = "Event mask on line x"]
#[inline(always)]
pub const fn set_em4(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
}
#[doc = "Event mask on line x"]
#[must_use]
#[inline(always)]
pub const fn em5(&self) -> bool {
let val = (self.0 >> 5usize) & 0x01;
val != 0
}
#[doc = "Event mask on line x"]
#[inline(always)]
pub const fn set_em5(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
}
#[doc = "Event mask on line x"]
#[must_use]
#[inline(always)]
pub const fn em6(&self) -> bool {
let val = (self.0 >> 6usize) & 0x01;
val != 0
}
#[doc = "Event mask on line x"]
#[inline(always)]
pub const fn set_em6(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
}
#[doc = "Event mask on line 16"]
#[must_use]
#[inline(always)]
pub const fn em16(&self) -> bool {
let val = (self.0 >> 16usize) & 0x01;
val != 0
}
#[doc = "Event mask on line 16"]
#[inline(always)]
pub const fn set_em16(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
}
#[doc = "Event mask on line 19"]
#[must_use]
#[inline(always)]
pub const fn em19(&self) -> bool {
let val = (self.0 >> 19usize) & 0x01;
val != 0
}
#[doc = "Event mask on line 19"]
#[inline(always)]
pub const fn set_em19(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
}
#[doc = "Eventmask on line x"]
#[must_use]
#[inline(always)]
pub const fn em21(&self) -> bool {
let val = (self.0 >> 21usize) & 0x01;
val != 0
}
#[doc = "Eventmask on line x"]
#[inline(always)]
pub const fn set_em21(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
}
#[doc = "Eventmask on line x"]
#[must_use]
#[inline(always)]
pub const fn em22(&self) -> bool {
let val = (self.0 >> 22usize) & 0x01;
val != 0
}
#[doc = "Eventmask on line x"]
#[inline(always)]
pub const fn set_em22(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
}
#[doc = "Eventmask on line x"]
#[must_use]
#[inline(always)]
pub const fn em23(&self) -> bool {
let val = (self.0 >> 23usize) & 0x01;
val != 0
}
#[doc = "Eventmask on line x"]
#[inline(always)]
pub const fn set_em23(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
}
}
impl Default for Emr {
#[inline(always)]
fn default() -> Emr {
Emr(0)
}
}
impl core::fmt::Debug for Emr {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Emr")
.field("em0", &self.em0())
.field("em1", &self.em1())
.field("em2", &self.em2())
.field("em3", &self.em3())
.field("em4", &self.em4())
.field("em5", &self.em5())
.field("em6", &self.em6())
.field("em16", &self.em16())
.field("em19", &self.em19())
.field("em21", &self.em21())
.field("em22", &self.em22())
.field("em23", &self.em23())
.finish()
}
}
#[cfg(feature = "defmt")]
impl defmt::Format for Emr {
fn format(&self, f: defmt::Formatter) {
defmt :: write ! (f , "Emr {{ em0: {=bool:?}, em1: {=bool:?}, em2: {=bool:?}, em3: {=bool:?}, em4: {=bool:?}, em5: {=bool:?}, em6: {=bool:?}, em16: {=bool:?}, em19: {=bool:?}, em21: {=bool:?}, em22: {=bool:?}, em23: {=bool:?} }}" , self . em0 () , self . em1 () , self . em2 () , self . em3 () , self . em4 () , self . em5 () , self . em6 () , self . em16 () , self . em19 () , self . em21 () , self . em22 () , self . em23 ())
}
}
#[doc = "FTSR"]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Ftsr(pub u32);
impl Ftsr {
#[doc = "Falling trigger event configuration bit of line x"]
#[must_use]
#[inline(always)]
pub const fn ft0(&self) -> bool {
let val = (self.0 >> 0usize) & 0x01;
val != 0
}
#[doc = "Falling trigger event configuration bit of line x"]
#[inline(always)]
pub const fn set_ft0(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
}
#[doc = "Falling trigger event configuration bit of line x"]
#[must_use]
#[inline(always)]
pub const fn ft1(&self) -> bool {
let val = (self.0 >> 1usize) & 0x01;
val != 0
}
#[doc = "Falling trigger event configuration bit of line x"]
#[inline(always)]
pub const fn set_ft1(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
}
#[doc = "Falling trigger event configuration bit of line x"]
#[must_use]
#[inline(always)]
pub const fn ft2(&self) -> bool {
let val = (self.0 >> 2usize) & 0x01;
val != 0
}
#[doc = "Falling trigger event configuration bit of line x"]
#[inline(always)]
pub const fn set_ft2(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
}
#[doc = "Falling trigger event configuration bit of line x"]
#[must_use]
#[inline(always)]
pub const fn ft3(&self) -> bool {
let val = (self.0 >> 3usize) & 0x01;
val != 0
}
#[doc = "Falling trigger event configuration bit of line x"]
#[inline(always)]
pub const fn set_ft3(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
}
#[doc = "Falling trigger event configuration bit of line x"]
#[must_use]
#[inline(always)]
pub const fn ft4(&self) -> bool {
let val = (self.0 >> 4usize) & 0x01;
val != 0
}
#[doc = "Falling trigger event configuration bit of line x"]
#[inline(always)]
pub const fn set_ft4(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
}
#[doc = "Falling trigger event configuration bit of line x"]
#[must_use]
#[inline(always)]
pub const fn ft5(&self) -> bool {
let val = (self.0 >> 5usize) & 0x01;
val != 0
}
#[doc = "Falling trigger event configuration bit of line x"]
#[inline(always)]
pub const fn set_ft5(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
}
#[doc = "Falling trigger event configuration bit of line x"]
#[must_use]
#[inline(always)]
pub const fn ft6(&self) -> bool {
let val = (self.0 >> 6usize) & 0x01;
val != 0
}
#[doc = "Falling trigger event configuration bit of line x"]
#[inline(always)]
pub const fn set_ft6(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
}
#[doc = "Falling trigger event configuration bit of line 16"]
#[must_use]
#[inline(always)]
pub const fn ft16(&self) -> bool {
let val = (self.0 >> 16usize) & 0x01;
val != 0
}
#[doc = "Falling trigger event configuration bit of line 16"]
#[inline(always)]
pub const fn set_ft16(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
}
#[doc = "Falling trigger event configuration bit of line 19"]
#[must_use]
#[inline(always)]
pub const fn ft19(&self) -> bool {
let val = (self.0 >> 19usize) & 0x01;
val != 0
}
#[doc = "Falling trigger event configuration bit of line 19"]
#[inline(always)]
pub const fn set_ft19(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
}
#[doc = "Falling trigger event configuration bit of line x"]
#[must_use]
#[inline(always)]
pub const fn ft21(&self) -> bool {
let val = (self.0 >> 21usize) & 0x01;
val != 0
}
#[doc = "Falling trigger event configuration bit of line x"]
#[inline(always)]
pub const fn set_ft21(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
}
#[doc = "Falling trigger event configuration bit of line x"]
#[must_use]
#[inline(always)]
pub const fn ft22(&self) -> bool {
let val = (self.0 >> 22usize) & 0x01;
val != 0
}
#[doc = "Falling trigger event configuration bit of line x"]
#[inline(always)]
pub const fn set_ft22(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
}
}
impl Default for Ftsr {
#[inline(always)]
fn default() -> Ftsr {
Ftsr(0)
}
}
impl core::fmt::Debug for Ftsr {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Ftsr")
.field("ft0", &self.ft0())
.field("ft1", &self.ft1())
.field("ft2", &self.ft2())
.field("ft3", &self.ft3())
.field("ft4", &self.ft4())
.field("ft5", &self.ft5())
.field("ft6", &self.ft6())
.field("ft16", &self.ft16())
.field("ft19", &self.ft19())
.field("ft21", &self.ft21())
.field("ft22", &self.ft22())
.finish()
}
}
#[cfg(feature = "defmt")]
impl defmt::Format for Ftsr {
fn format(&self, f: defmt::Formatter) {
defmt :: write ! (f , "Ftsr {{ ft0: {=bool:?}, ft1: {=bool:?}, ft2: {=bool:?}, ft3: {=bool:?}, ft4: {=bool:?}, ft5: {=bool:?}, ft6: {=bool:?}, ft16: {=bool:?}, ft19: {=bool:?}, ft21: {=bool:?}, ft22: {=bool:?} }}" , self . ft0 () , self . ft1 () , self . ft2 () , self . ft3 () , self . ft4 () , self . ft5 () , self . ft6 () , self . ft16 () , self . ft19 () , self . ft21 () , self . ft22 ())
}
}
#[doc = "IMR"]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Imr(pub u32);
impl Imr {
#[doc = "Interrupt mask on line x"]
#[must_use]
#[inline(always)]
pub const fn im0(&self) -> bool {
let val = (self.0 >> 0usize) & 0x01;
val != 0
}
#[doc = "Interrupt mask on line x"]
#[inline(always)]
pub const fn set_im0(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
}
#[doc = "Interrupt mask on line x"]
#[must_use]
#[inline(always)]
pub const fn im1(&self) -> bool {
let val = (self.0 >> 1usize) & 0x01;
val != 0
}
#[doc = "Interrupt mask on line x"]
#[inline(always)]
pub const fn set_im1(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
}
#[doc = "Interrupt mask on line x"]
#[must_use]
#[inline(always)]
pub const fn im2(&self) -> bool {
let val = (self.0 >> 2usize) & 0x01;
val != 0
}
#[doc = "Interrupt mask on line x"]
#[inline(always)]
pub const fn set_im2(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
}
#[doc = "Interrupt mask on line x"]
#[must_use]
#[inline(always)]
pub const fn im3(&self) -> bool {
let val = (self.0 >> 3usize) & 0x01;
val != 0
}
#[doc = "Interrupt mask on line x"]
#[inline(always)]
pub const fn set_im3(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
}
#[doc = "Interrupt mask on line x"]
#[must_use]
#[inline(always)]
pub const fn im4(&self) -> bool {
let val = (self.0 >> 4usize) & 0x01;
val != 0
}
#[doc = "Interrupt mask on line x"]
#[inline(always)]
pub const fn set_im4(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
}
#[doc = "Interrupt mask on line x"]
#[must_use]
#[inline(always)]
pub const fn im5(&self) -> bool {
let val = (self.0 >> 5usize) & 0x01;
val != 0
}
#[doc = "Interrupt mask on line x"]
#[inline(always)]
pub const fn set_im5(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
}
#[doc = "Interrupt mask on line x"]
#[must_use]
#[inline(always)]
pub const fn im6(&self) -> bool {
let val = (self.0 >> 6usize) & 0x01;
val != 0
}
#[doc = "Interrupt mask on line x"]
#[inline(always)]
pub const fn set_im6(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
}
#[doc = "Interrupt mask on line 16"]
#[must_use]
#[inline(always)]
pub const fn im16(&self) -> bool {
let val = (self.0 >> 16usize) & 0x01;
val != 0
}
#[doc = "Interrupt mask on line 16"]
#[inline(always)]
pub const fn set_im16(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
}
#[doc = "Interrupt mask on line 19"]
#[must_use]
#[inline(always)]
pub const fn im19(&self) -> bool {
let val = (self.0 >> 19usize) & 0x01;
val != 0
}
#[doc = "Interrupt mask on line 19"]
#[inline(always)]
pub const fn set_im19(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
}
#[doc = "Interrupt mask on line x"]
#[must_use]
#[inline(always)]
pub const fn im21(&self) -> bool {
let val = (self.0 >> 21usize) & 0x01;
val != 0
}
#[doc = "Interrupt mask on line x"]
#[inline(always)]
pub const fn set_im21(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
}
#[doc = "Interrupt mask on line x"]
#[must_use]
#[inline(always)]
pub const fn im22(&self) -> bool {
let val = (self.0 >> 22usize) & 0x01;
val != 0
}
#[doc = "Interrupt mask on line x"]
#[inline(always)]
pub const fn set_im22(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
}
#[doc = "Interrupt mask on line x"]
#[must_use]
#[inline(always)]
pub const fn im23(&self) -> bool {
let val = (self.0 >> 23usize) & 0x01;
val != 0
}
#[doc = "Interrupt mask on line x"]
#[inline(always)]
pub const fn set_im23(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 23usize)) | (((val as u32) & 0x01) << 23usize);
}
}
impl Default for Imr {
#[inline(always)]
fn default() -> Imr {
Imr(0)
}
}
impl core::fmt::Debug for Imr {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Imr")
.field("im0", &self.im0())
.field("im1", &self.im1())
.field("im2", &self.im2())
.field("im3", &self.im3())
.field("im4", &self.im4())
.field("im5", &self.im5())
.field("im6", &self.im6())
.field("im16", &self.im16())
.field("im19", &self.im19())
.field("im21", &self.im21())
.field("im22", &self.im22())
.field("im23", &self.im23())
.finish()
}
}
#[cfg(feature = "defmt")]
impl defmt::Format for Imr {
fn format(&self, f: defmt::Formatter) {
defmt :: write ! (f , "Imr {{ im0: {=bool:?}, im1: {=bool:?}, im2: {=bool:?}, im3: {=bool:?}, im4: {=bool:?}, im5: {=bool:?}, im6: {=bool:?}, im16: {=bool:?}, im19: {=bool:?}, im21: {=bool:?}, im22: {=bool:?}, im23: {=bool:?} }}" , self . im0 () , self . im1 () , self . im2 () , self . im3 () , self . im4 () , self . im5 () , self . im6 () , self . im16 () , self . im19 () , self . im21 () , self . im22 () , self . im23 ())
}
}
#[doc = "PR"]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Pr(pub u32);
impl Pr {
#[doc = "Pending interrupt flag on line x"]
#[must_use]
#[inline(always)]
pub const fn pif0(&self) -> bool {
let val = (self.0 >> 0usize) & 0x01;
val != 0
}
#[doc = "Pending interrupt flag on line x"]
#[inline(always)]
pub const fn set_pif0(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
}
#[doc = "Pending interrupt flag on line x"]
#[must_use]
#[inline(always)]
pub const fn pif1(&self) -> bool {
let val = (self.0 >> 1usize) & 0x01;
val != 0
}
#[doc = "Pending interrupt flag on line x"]
#[inline(always)]
pub const fn set_pif1(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
}
#[doc = "Pending interrupt flag on line x"]
#[must_use]
#[inline(always)]
pub const fn pif2(&self) -> bool {
let val = (self.0 >> 2usize) & 0x01;
val != 0
}
#[doc = "Pending interrupt flag on line x"]
#[inline(always)]
pub const fn set_pif2(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
}
#[doc = "Pending interrupt flag on line x"]
#[must_use]
#[inline(always)]
pub const fn pif3(&self) -> bool {
let val = (self.0 >> 3usize) & 0x01;
val != 0
}
#[doc = "Pending interrupt flag on line x"]
#[inline(always)]
pub const fn set_pif3(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
}
#[doc = "Pending interrupt flag on line x"]
#[must_use]
#[inline(always)]
pub const fn pif4(&self) -> bool {
let val = (self.0 >> 4usize) & 0x01;
val != 0
}
#[doc = "Pending interrupt flag on line x"]
#[inline(always)]
pub const fn set_pif4(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
}
#[doc = "Pending interrupt flag on line x"]
#[must_use]
#[inline(always)]
pub const fn pif5(&self) -> bool {
let val = (self.0 >> 5usize) & 0x01;
val != 0
}
#[doc = "Pending interrupt flag on line x"]
#[inline(always)]
pub const fn set_pif5(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
}
#[doc = "Pending interrupt flag on line x"]
#[must_use]
#[inline(always)]
pub const fn pif6(&self) -> bool {
let val = (self.0 >> 6usize) & 0x01;
val != 0
}
#[doc = "Pending interrupt flag on line x"]
#[inline(always)]
pub const fn set_pif6(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
}
#[doc = "Pending interrupt flag on line 16"]
#[must_use]
#[inline(always)]
pub const fn pif16(&self) -> bool {
let val = (self.0 >> 16usize) & 0x01;
val != 0
}
#[doc = "Pending interrupt flag on line 16"]
#[inline(always)]
pub const fn set_pif16(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
}
#[doc = "Pending interrupt flag on line 19"]
#[must_use]
#[inline(always)]
pub const fn pif19(&self) -> bool {
let val = (self.0 >> 19usize) & 0x01;
val != 0
}
#[doc = "Pending interrupt flag on line 19"]
#[inline(always)]
pub const fn set_pif19(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
}
#[doc = "Pending interrupt flag on line x"]
#[must_use]
#[inline(always)]
pub const fn pif21(&self) -> bool {
let val = (self.0 >> 21usize) & 0x01;
val != 0
}
#[doc = "Pending interrupt flag on line x"]
#[inline(always)]
pub const fn set_pif21(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
}
#[doc = "Pending interrupt flag on line x"]
#[must_use]
#[inline(always)]
pub const fn pif22(&self) -> bool {
let val = (self.0 >> 22usize) & 0x01;
val != 0
}
#[doc = "Pending interrupt flag on line x"]
#[inline(always)]
pub const fn set_pif22(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
}
}
impl Default for Pr {
#[inline(always)]
fn default() -> Pr {
Pr(0)
}
}
impl core::fmt::Debug for Pr {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Pr")
.field("pif0", &self.pif0())
.field("pif1", &self.pif1())
.field("pif2", &self.pif2())
.field("pif3", &self.pif3())
.field("pif4", &self.pif4())
.field("pif5", &self.pif5())
.field("pif6", &self.pif6())
.field("pif16", &self.pif16())
.field("pif19", &self.pif19())
.field("pif21", &self.pif21())
.field("pif22", &self.pif22())
.finish()
}
}
#[cfg(feature = "defmt")]
impl defmt::Format for Pr {
fn format(&self, f: defmt::Formatter) {
defmt :: write ! (f , "Pr {{ pif0: {=bool:?}, pif1: {=bool:?}, pif2: {=bool:?}, pif3: {=bool:?}, pif4: {=bool:?}, pif5: {=bool:?}, pif6: {=bool:?}, pif16: {=bool:?}, pif19: {=bool:?}, pif21: {=bool:?}, pif22: {=bool:?} }}" , self . pif0 () , self . pif1 () , self . pif2 () , self . pif3 () , self . pif4 () , self . pif5 () , self . pif6 () , self . pif16 () , self . pif19 () , self . pif21 () , self . pif22 ())
}
}
#[doc = "RTSR"]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Rtsr(pub u32);
impl Rtsr {
#[doc = "Rising trigger event configuration bit of line x"]
#[must_use]
#[inline(always)]
pub const fn rt0(&self) -> bool {
let val = (self.0 >> 0usize) & 0x01;
val != 0
}
#[doc = "Rising trigger event configuration bit of line x"]
#[inline(always)]
pub const fn set_rt0(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
}
#[doc = "Rising trigger event configuration bit of line x"]
#[must_use]
#[inline(always)]
pub const fn rt1(&self) -> bool {
let val = (self.0 >> 1usize) & 0x01;
val != 0
}
#[doc = "Rising trigger event configuration bit of line x"]
#[inline(always)]
pub const fn set_rt1(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
}
#[doc = "Rising trigger event configuration bit of line x"]
#[must_use]
#[inline(always)]
pub const fn rt2(&self) -> bool {
let val = (self.0 >> 2usize) & 0x01;
val != 0
}
#[doc = "Rising trigger event configuration bit of line x"]
#[inline(always)]
pub const fn set_rt2(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
}
#[doc = "Rising trigger event configuration bit of line x"]
#[must_use]
#[inline(always)]
pub const fn rt3(&self) -> bool {
let val = (self.0 >> 3usize) & 0x01;
val != 0
}
#[doc = "Rising trigger event configuration bit of line x"]
#[inline(always)]
pub const fn set_rt3(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
}
#[doc = "Rising trigger event configuration bit of line x"]
#[must_use]
#[inline(always)]
pub const fn rt4(&self) -> bool {
let val = (self.0 >> 4usize) & 0x01;
val != 0
}
#[doc = "Rising trigger event configuration bit of line x"]
#[inline(always)]
pub const fn set_rt4(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
}
#[doc = "Rising trigger event configuration bit of line x"]
#[must_use]
#[inline(always)]
pub const fn rt5(&self) -> bool {
let val = (self.0 >> 5usize) & 0x01;
val != 0
}
#[doc = "Rising trigger event configuration bit of line x"]
#[inline(always)]
pub const fn set_rt5(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
}
#[doc = "Rising trigger event configuration bit of line x"]
#[must_use]
#[inline(always)]
pub const fn rt6(&self) -> bool {
let val = (self.0 >> 6usize) & 0x01;
val != 0
}
#[doc = "Rising trigger event configuration bit of line x"]
#[inline(always)]
pub const fn set_rt6(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
}
#[doc = "Rising trigger event configuration bit of line 16"]
#[must_use]
#[inline(always)]
pub const fn rt16(&self) -> bool {
let val = (self.0 >> 16usize) & 0x01;
val != 0
}
#[doc = "Rising trigger event configuration bit of line 16"]
#[inline(always)]
pub const fn set_rt16(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
}
#[doc = "Rising trigger event configuration bit of line 19"]
#[must_use]
#[inline(always)]
pub const fn rt19(&self) -> bool {
let val = (self.0 >> 19usize) & 0x01;
val != 0
}
#[doc = "Rising trigger event configuration bit of line 19"]
#[inline(always)]
pub const fn set_rt19(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
}
#[doc = "Rising trigger event configuration bit of line x"]
#[must_use]
#[inline(always)]
pub const fn rt21(&self) -> bool {
let val = (self.0 >> 21usize) & 0x01;
val != 0
}
#[doc = "Rising trigger event configuration bit of line x"]
#[inline(always)]
pub const fn set_rt21(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
}
#[doc = "Rising trigger event configuration bit of line x"]
#[must_use]
#[inline(always)]
pub const fn rt22(&self) -> bool {
let val = (self.0 >> 22usize) & 0x01;
val != 0
}
#[doc = "Rising trigger event configuration bit of line x"]
#[inline(always)]
pub const fn set_rt22(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
}
}
impl Default for Rtsr {
#[inline(always)]
fn default() -> Rtsr {
Rtsr(0)
}
}
impl core::fmt::Debug for Rtsr {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Rtsr")
.field("rt0", &self.rt0())
.field("rt1", &self.rt1())
.field("rt2", &self.rt2())
.field("rt3", &self.rt3())
.field("rt4", &self.rt4())
.field("rt5", &self.rt5())
.field("rt6", &self.rt6())
.field("rt16", &self.rt16())
.field("rt19", &self.rt19())
.field("rt21", &self.rt21())
.field("rt22", &self.rt22())
.finish()
}
}
#[cfg(feature = "defmt")]
impl defmt::Format for Rtsr {
fn format(&self, f: defmt::Formatter) {
defmt :: write ! (f , "Rtsr {{ rt0: {=bool:?}, rt1: {=bool:?}, rt2: {=bool:?}, rt3: {=bool:?}, rt4: {=bool:?}, rt5: {=bool:?}, rt6: {=bool:?}, rt16: {=bool:?}, rt19: {=bool:?}, rt21: {=bool:?}, rt22: {=bool:?} }}" , self . rt0 () , self . rt1 () , self . rt2 () , self . rt3 () , self . rt4 () , self . rt5 () , self . rt6 () , self . rt16 () , self . rt19 () , self . rt21 () , self . rt22 ())
}
}
#[doc = "SWIER"]
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct Swier(pub u32);
impl Swier {
#[doc = "Software interrupt on line x"]
#[must_use]
#[inline(always)]
pub const fn swi0(&self) -> bool {
let val = (self.0 >> 0usize) & 0x01;
val != 0
}
#[doc = "Software interrupt on line x"]
#[inline(always)]
pub const fn set_swi0(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 0usize)) | (((val as u32) & 0x01) << 0usize);
}
#[doc = "Software interrupt on line x"]
#[must_use]
#[inline(always)]
pub const fn swi1(&self) -> bool {
let val = (self.0 >> 1usize) & 0x01;
val != 0
}
#[doc = "Software interrupt on line x"]
#[inline(always)]
pub const fn set_swi1(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 1usize)) | (((val as u32) & 0x01) << 1usize);
}
#[doc = "Software interrupt on line x"]
#[must_use]
#[inline(always)]
pub const fn swi2(&self) -> bool {
let val = (self.0 >> 2usize) & 0x01;
val != 0
}
#[doc = "Software interrupt on line x"]
#[inline(always)]
pub const fn set_swi2(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 2usize)) | (((val as u32) & 0x01) << 2usize);
}
#[doc = "Software interrupt on line x"]
#[must_use]
#[inline(always)]
pub const fn swi3(&self) -> bool {
let val = (self.0 >> 3usize) & 0x01;
val != 0
}
#[doc = "Software interrupt on line x"]
#[inline(always)]
pub const fn set_swi3(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 3usize)) | (((val as u32) & 0x01) << 3usize);
}
#[doc = "Software interrupt on line x"]
#[must_use]
#[inline(always)]
pub const fn swi4(&self) -> bool {
let val = (self.0 >> 4usize) & 0x01;
val != 0
}
#[doc = "Software interrupt on line x"]
#[inline(always)]
pub const fn set_swi4(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 4usize)) | (((val as u32) & 0x01) << 4usize);
}
#[doc = "Software interrupt on line x"]
#[must_use]
#[inline(always)]
pub const fn swi5(&self) -> bool {
let val = (self.0 >> 5usize) & 0x01;
val != 0
}
#[doc = "Software interrupt on line x"]
#[inline(always)]
pub const fn set_swi5(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 5usize)) | (((val as u32) & 0x01) << 5usize);
}
#[doc = "Software interrupt on line x"]
#[must_use]
#[inline(always)]
pub const fn swi6(&self) -> bool {
let val = (self.0 >> 6usize) & 0x01;
val != 0
}
#[doc = "Software interrupt on line x"]
#[inline(always)]
pub const fn set_swi6(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 6usize)) | (((val as u32) & 0x01) << 6usize);
}
#[doc = "Software interrupt on line 16"]
#[must_use]
#[inline(always)]
pub const fn swi16(&self) -> bool {
let val = (self.0 >> 16usize) & 0x01;
val != 0
}
#[doc = "Software interrupt on line 16"]
#[inline(always)]
pub const fn set_swi16(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 16usize)) | (((val as u32) & 0x01) << 16usize);
}
#[doc = "Software interrupt on line 19"]
#[must_use]
#[inline(always)]
pub const fn swi19(&self) -> bool {
let val = (self.0 >> 19usize) & 0x01;
val != 0
}
#[doc = "Software interrupt on line 19"]
#[inline(always)]
pub const fn set_swi19(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 19usize)) | (((val as u32) & 0x01) << 19usize);
}
#[doc = "Software interrupt on line x"]
#[must_use]
#[inline(always)]
pub const fn swi21(&self) -> bool {
let val = (self.0 >> 21usize) & 0x01;
val != 0
}
#[doc = "Software interrupt on line x"]
#[inline(always)]
pub const fn set_swi21(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 21usize)) | (((val as u32) & 0x01) << 21usize);
}
#[doc = "Software interrupt on line x"]
#[must_use]
#[inline(always)]
pub const fn swi22(&self) -> bool {
let val = (self.0 >> 22usize) & 0x01;
val != 0
}
#[doc = "Software interrupt on line x"]
#[inline(always)]
pub const fn set_swi22(&mut self, val: bool) {
self.0 = (self.0 & !(0x01 << 22usize)) | (((val as u32) & 0x01) << 22usize);
}
}
impl Default for Swier {
#[inline(always)]
fn default() -> Swier {
Swier(0)
}
}
impl core::fmt::Debug for Swier {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("Swier")
.field("swi0", &self.swi0())
.field("swi1", &self.swi1())
.field("swi2", &self.swi2())
.field("swi3", &self.swi3())
.field("swi4", &self.swi4())
.field("swi5", &self.swi5())
.field("swi6", &self.swi6())
.field("swi16", &self.swi16())
.field("swi19", &self.swi19())
.field("swi21", &self.swi21())
.field("swi22", &self.swi22())
.finish()
}
}
#[cfg(feature = "defmt")]
impl defmt::Format for Swier {
fn format(&self, f: defmt::Formatter) {
defmt :: write ! (f , "Swier {{ swi0: {=bool:?}, swi1: {=bool:?}, swi2: {=bool:?}, swi3: {=bool:?}, swi4: {=bool:?}, swi5: {=bool:?}, swi6: {=bool:?}, swi16: {=bool:?}, swi19: {=bool:?}, swi21: {=bool:?}, swi22: {=bool:?} }}" , self . swi0 () , self . swi1 () , self . swi2 () , self . swi3 () , self . swi4 () , self . swi5 () , self . swi6 () , self . swi16 () , self . swi19 () , self . swi21 () , self . swi22 ())
}
}