rust-embedded-talk/example-source/msp432p401r/src/adc14/adc14ifgr1.rs

357 lines
10 KiB
Rust

#[doc = r" Value read from the register"]
pub struct R {
bits: u32,
}
impl super::ADC14IFGR1 {
#[doc = r" Reads the contents of the register"]
#[inline]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
}
#[doc = "Possible values of the field `ADC14INIFG`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADC14INIFGR {
#[doc = "No interrupt pending"]
ADC14INIFG_0,
#[doc = "Interrupt pending"]
ADC14INIFG_1,
}
impl ADC14INIFGR {
#[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 {
ADC14INIFGR::ADC14INIFG_0 => false,
ADC14INIFGR::ADC14INIFG_1 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> ADC14INIFGR {
match value {
false => ADC14INIFGR::ADC14INIFG_0,
true => ADC14INIFGR::ADC14INIFG_1,
}
}
#[doc = "Checks if the value of the field is `ADC14INIFG_0`"]
#[inline]
pub fn is_adc14inifg_0(&self) -> bool {
*self == ADC14INIFGR::ADC14INIFG_0
}
#[doc = "Checks if the value of the field is `ADC14INIFG_1`"]
#[inline]
pub fn is_adc14inifg_1(&self) -> bool {
*self == ADC14INIFGR::ADC14INIFG_1
}
}
#[doc = "Possible values of the field `ADC14LOIFG`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADC14LOIFGR {
#[doc = "No interrupt pending"]
ADC14LOIFG_0,
#[doc = "Interrupt pending"]
ADC14LOIFG_1,
}
impl ADC14LOIFGR {
#[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 {
ADC14LOIFGR::ADC14LOIFG_0 => false,
ADC14LOIFGR::ADC14LOIFG_1 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> ADC14LOIFGR {
match value {
false => ADC14LOIFGR::ADC14LOIFG_0,
true => ADC14LOIFGR::ADC14LOIFG_1,
}
}
#[doc = "Checks if the value of the field is `ADC14LOIFG_0`"]
#[inline]
pub fn is_adc14loifg_0(&self) -> bool {
*self == ADC14LOIFGR::ADC14LOIFG_0
}
#[doc = "Checks if the value of the field is `ADC14LOIFG_1`"]
#[inline]
pub fn is_adc14loifg_1(&self) -> bool {
*self == ADC14LOIFGR::ADC14LOIFG_1
}
}
#[doc = "Possible values of the field `ADC14HIIFG`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADC14HIIFGR {
#[doc = "No interrupt pending"]
ADC14HIIFG_0,
#[doc = "Interrupt pending"]
ADC14HIIFG_1,
}
impl ADC14HIIFGR {
#[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 {
ADC14HIIFGR::ADC14HIIFG_0 => false,
ADC14HIIFGR::ADC14HIIFG_1 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> ADC14HIIFGR {
match value {
false => ADC14HIIFGR::ADC14HIIFG_0,
true => ADC14HIIFGR::ADC14HIIFG_1,
}
}
#[doc = "Checks if the value of the field is `ADC14HIIFG_0`"]
#[inline]
pub fn is_adc14hiifg_0(&self) -> bool {
*self == ADC14HIIFGR::ADC14HIIFG_0
}
#[doc = "Checks if the value of the field is `ADC14HIIFG_1`"]
#[inline]
pub fn is_adc14hiifg_1(&self) -> bool {
*self == ADC14HIIFGR::ADC14HIIFG_1
}
}
#[doc = "Possible values of the field `ADC14OVIFG`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADC14OVIFGR {
#[doc = "No interrupt pending"]
ADC14OVIFG_0,
#[doc = "Interrupt pending"]
ADC14OVIFG_1,
}
impl ADC14OVIFGR {
#[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 {
ADC14OVIFGR::ADC14OVIFG_0 => false,
ADC14OVIFGR::ADC14OVIFG_1 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> ADC14OVIFGR {
match value {
false => ADC14OVIFGR::ADC14OVIFG_0,
true => ADC14OVIFGR::ADC14OVIFG_1,
}
}
#[doc = "Checks if the value of the field is `ADC14OVIFG_0`"]
#[inline]
pub fn is_adc14ovifg_0(&self) -> bool {
*self == ADC14OVIFGR::ADC14OVIFG_0
}
#[doc = "Checks if the value of the field is `ADC14OVIFG_1`"]
#[inline]
pub fn is_adc14ovifg_1(&self) -> bool {
*self == ADC14OVIFGR::ADC14OVIFG_1
}
}
#[doc = "Possible values of the field `ADC14TOVIFG`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADC14TOVIFGR {
#[doc = "No interrupt pending"]
ADC14TOVIFG_0,
#[doc = "Interrupt pending"]
ADC14TOVIFG_1,
}
impl ADC14TOVIFGR {
#[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 {
ADC14TOVIFGR::ADC14TOVIFG_0 => false,
ADC14TOVIFGR::ADC14TOVIFG_1 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> ADC14TOVIFGR {
match value {
false => ADC14TOVIFGR::ADC14TOVIFG_0,
true => ADC14TOVIFGR::ADC14TOVIFG_1,
}
}
#[doc = "Checks if the value of the field is `ADC14TOVIFG_0`"]
#[inline]
pub fn is_adc14tovifg_0(&self) -> bool {
*self == ADC14TOVIFGR::ADC14TOVIFG_0
}
#[doc = "Checks if the value of the field is `ADC14TOVIFG_1`"]
#[inline]
pub fn is_adc14tovifg_1(&self) -> bool {
*self == ADC14TOVIFGR::ADC14TOVIFG_1
}
}
#[doc = "Possible values of the field `ADC14RDYIFG`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADC14RDYIFGR {
#[doc = "No interrupt pending"]
ADC14RDYIFG_0,
#[doc = "Interrupt pending"]
ADC14RDYIFG_1,
}
impl ADC14RDYIFGR {
#[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 {
ADC14RDYIFGR::ADC14RDYIFG_0 => false,
ADC14RDYIFGR::ADC14RDYIFG_1 => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: bool) -> ADC14RDYIFGR {
match value {
false => ADC14RDYIFGR::ADC14RDYIFG_0,
true => ADC14RDYIFGR::ADC14RDYIFG_1,
}
}
#[doc = "Checks if the value of the field is `ADC14RDYIFG_0`"]
#[inline]
pub fn is_adc14rdyifg_0(&self) -> bool {
*self == ADC14RDYIFGR::ADC14RDYIFG_0
}
#[doc = "Checks if the value of the field is `ADC14RDYIFG_1`"]
#[inline]
pub fn is_adc14rdyifg_1(&self) -> bool {
*self == ADC14RDYIFGR::ADC14RDYIFG_1
}
}
impl R {
#[doc = r" Value of the register as raw bits"]
#[inline]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bit 1 - Interrupt flag for ADC14MEMx within comparator window"]
#[inline]
pub fn adc14inifg(&self) -> ADC14INIFGR {
ADC14INIFGR::_from({
const MASK: bool = true;
const OFFSET: u8 = 1;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 2 - Interrupt flag for ADC14MEMx below comparator window"]
#[inline]
pub fn adc14loifg(&self) -> ADC14LOIFGR {
ADC14LOIFGR::_from({
const MASK: bool = true;
const OFFSET: u8 = 2;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 3 - Interrupt flag for ADC14MEMx above comparator window"]
#[inline]
pub fn adc14hiifg(&self) -> ADC14HIIFGR {
ADC14HIIFGR::_from({
const MASK: bool = true;
const OFFSET: u8 = 3;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 4 - ADC14MEMx overflow interrupt flag"]
#[inline]
pub fn adc14ovifg(&self) -> ADC14OVIFGR {
ADC14OVIFGR::_from({
const MASK: bool = true;
const OFFSET: u8 = 4;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 5 - ADC14 conversion time overflow interrupt flag"]
#[inline]
pub fn adc14tovifg(&self) -> ADC14TOVIFGR {
ADC14TOVIFGR::_from({
const MASK: bool = true;
const OFFSET: u8 = 5;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
#[doc = "Bit 6 - ADC14 local buffered reference ready interrupt flag"]
#[inline]
pub fn adc14rdyifg(&self) -> ADC14RDYIFGR {
ADC14RDYIFGR::_from({
const MASK: bool = true;
const OFFSET: u8 = 6;
((self.bits >> OFFSET) & MASK as u32) != 0
})
}
}