779 lines
21 KiB
Rust
779 lines
21 KiB
Rust
#[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::ADC14IER1 {
|
|
#[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 `ADC14INIE`"]
|
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
|
pub enum ADC14INIER {
|
|
#[doc = "Interrupt disabled"]
|
|
ADC14INIE_0,
|
|
#[doc = "Interrupt enabled"]
|
|
ADC14INIE_1,
|
|
}
|
|
impl ADC14INIER {
|
|
#[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 {
|
|
ADC14INIER::ADC14INIE_0 => false,
|
|
ADC14INIER::ADC14INIE_1 => true,
|
|
}
|
|
}
|
|
#[allow(missing_docs)]
|
|
#[doc(hidden)]
|
|
#[inline]
|
|
pub fn _from(value: bool) -> ADC14INIER {
|
|
match value {
|
|
false => ADC14INIER::ADC14INIE_0,
|
|
true => ADC14INIER::ADC14INIE_1,
|
|
}
|
|
}
|
|
#[doc = "Checks if the value of the field is `ADC14INIE_0`"]
|
|
#[inline]
|
|
pub fn is_adc14inie_0(&self) -> bool {
|
|
*self == ADC14INIER::ADC14INIE_0
|
|
}
|
|
#[doc = "Checks if the value of the field is `ADC14INIE_1`"]
|
|
#[inline]
|
|
pub fn is_adc14inie_1(&self) -> bool {
|
|
*self == ADC14INIER::ADC14INIE_1
|
|
}
|
|
}
|
|
#[doc = "Possible values of the field `ADC14LOIE`"]
|
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
|
pub enum ADC14LOIER {
|
|
#[doc = "Interrupt disabled"]
|
|
ADC14LOIE_0,
|
|
#[doc = "Interrupt enabled"]
|
|
ADC14LOIE_1,
|
|
}
|
|
impl ADC14LOIER {
|
|
#[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 {
|
|
ADC14LOIER::ADC14LOIE_0 => false,
|
|
ADC14LOIER::ADC14LOIE_1 => true,
|
|
}
|
|
}
|
|
#[allow(missing_docs)]
|
|
#[doc(hidden)]
|
|
#[inline]
|
|
pub fn _from(value: bool) -> ADC14LOIER {
|
|
match value {
|
|
false => ADC14LOIER::ADC14LOIE_0,
|
|
true => ADC14LOIER::ADC14LOIE_1,
|
|
}
|
|
}
|
|
#[doc = "Checks if the value of the field is `ADC14LOIE_0`"]
|
|
#[inline]
|
|
pub fn is_adc14loie_0(&self) -> bool {
|
|
*self == ADC14LOIER::ADC14LOIE_0
|
|
}
|
|
#[doc = "Checks if the value of the field is `ADC14LOIE_1`"]
|
|
#[inline]
|
|
pub fn is_adc14loie_1(&self) -> bool {
|
|
*self == ADC14LOIER::ADC14LOIE_1
|
|
}
|
|
}
|
|
#[doc = "Possible values of the field `ADC14HIIE`"]
|
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
|
pub enum ADC14HIIER {
|
|
#[doc = "Interrupt disabled"]
|
|
ADC14HIIE_0,
|
|
#[doc = "Interrupt enabled"]
|
|
ADC14HIIE_1,
|
|
}
|
|
impl ADC14HIIER {
|
|
#[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 {
|
|
ADC14HIIER::ADC14HIIE_0 => false,
|
|
ADC14HIIER::ADC14HIIE_1 => true,
|
|
}
|
|
}
|
|
#[allow(missing_docs)]
|
|
#[doc(hidden)]
|
|
#[inline]
|
|
pub fn _from(value: bool) -> ADC14HIIER {
|
|
match value {
|
|
false => ADC14HIIER::ADC14HIIE_0,
|
|
true => ADC14HIIER::ADC14HIIE_1,
|
|
}
|
|
}
|
|
#[doc = "Checks if the value of the field is `ADC14HIIE_0`"]
|
|
#[inline]
|
|
pub fn is_adc14hiie_0(&self) -> bool {
|
|
*self == ADC14HIIER::ADC14HIIE_0
|
|
}
|
|
#[doc = "Checks if the value of the field is `ADC14HIIE_1`"]
|
|
#[inline]
|
|
pub fn is_adc14hiie_1(&self) -> bool {
|
|
*self == ADC14HIIER::ADC14HIIE_1
|
|
}
|
|
}
|
|
#[doc = "Possible values of the field `ADC14OVIE`"]
|
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
|
pub enum ADC14OVIER {
|
|
#[doc = "Interrupt disabled"]
|
|
ADC14OVIE_0,
|
|
#[doc = "Interrupt enabled"]
|
|
ADC14OVIE_1,
|
|
}
|
|
impl ADC14OVIER {
|
|
#[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 {
|
|
ADC14OVIER::ADC14OVIE_0 => false,
|
|
ADC14OVIER::ADC14OVIE_1 => true,
|
|
}
|
|
}
|
|
#[allow(missing_docs)]
|
|
#[doc(hidden)]
|
|
#[inline]
|
|
pub fn _from(value: bool) -> ADC14OVIER {
|
|
match value {
|
|
false => ADC14OVIER::ADC14OVIE_0,
|
|
true => ADC14OVIER::ADC14OVIE_1,
|
|
}
|
|
}
|
|
#[doc = "Checks if the value of the field is `ADC14OVIE_0`"]
|
|
#[inline]
|
|
pub fn is_adc14ovie_0(&self) -> bool {
|
|
*self == ADC14OVIER::ADC14OVIE_0
|
|
}
|
|
#[doc = "Checks if the value of the field is `ADC14OVIE_1`"]
|
|
#[inline]
|
|
pub fn is_adc14ovie_1(&self) -> bool {
|
|
*self == ADC14OVIER::ADC14OVIE_1
|
|
}
|
|
}
|
|
#[doc = "Possible values of the field `ADC14TOVIE`"]
|
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
|
pub enum ADC14TOVIER {
|
|
#[doc = "Interrupt disabled"]
|
|
ADC14TOVIE_0,
|
|
#[doc = "Interrupt enabled"]
|
|
ADC14TOVIE_1,
|
|
}
|
|
impl ADC14TOVIER {
|
|
#[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 {
|
|
ADC14TOVIER::ADC14TOVIE_0 => false,
|
|
ADC14TOVIER::ADC14TOVIE_1 => true,
|
|
}
|
|
}
|
|
#[allow(missing_docs)]
|
|
#[doc(hidden)]
|
|
#[inline]
|
|
pub fn _from(value: bool) -> ADC14TOVIER {
|
|
match value {
|
|
false => ADC14TOVIER::ADC14TOVIE_0,
|
|
true => ADC14TOVIER::ADC14TOVIE_1,
|
|
}
|
|
}
|
|
#[doc = "Checks if the value of the field is `ADC14TOVIE_0`"]
|
|
#[inline]
|
|
pub fn is_adc14tovie_0(&self) -> bool {
|
|
*self == ADC14TOVIER::ADC14TOVIE_0
|
|
}
|
|
#[doc = "Checks if the value of the field is `ADC14TOVIE_1`"]
|
|
#[inline]
|
|
pub fn is_adc14tovie_1(&self) -> bool {
|
|
*self == ADC14TOVIER::ADC14TOVIE_1
|
|
}
|
|
}
|
|
#[doc = "Possible values of the field `ADC14RDYIE`"]
|
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
|
pub enum ADC14RDYIER {
|
|
#[doc = "Interrupt disabled"]
|
|
ADC14RDYIE_0,
|
|
#[doc = "Interrupt enabled"]
|
|
ADC14RDYIE_1,
|
|
}
|
|
impl ADC14RDYIER {
|
|
#[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 {
|
|
ADC14RDYIER::ADC14RDYIE_0 => false,
|
|
ADC14RDYIER::ADC14RDYIE_1 => true,
|
|
}
|
|
}
|
|
#[allow(missing_docs)]
|
|
#[doc(hidden)]
|
|
#[inline]
|
|
pub fn _from(value: bool) -> ADC14RDYIER {
|
|
match value {
|
|
false => ADC14RDYIER::ADC14RDYIE_0,
|
|
true => ADC14RDYIER::ADC14RDYIE_1,
|
|
}
|
|
}
|
|
#[doc = "Checks if the value of the field is `ADC14RDYIE_0`"]
|
|
#[inline]
|
|
pub fn is_adc14rdyie_0(&self) -> bool {
|
|
*self == ADC14RDYIER::ADC14RDYIE_0
|
|
}
|
|
#[doc = "Checks if the value of the field is `ADC14RDYIE_1`"]
|
|
#[inline]
|
|
pub fn is_adc14rdyie_1(&self) -> bool {
|
|
*self == ADC14RDYIER::ADC14RDYIE_1
|
|
}
|
|
}
|
|
#[doc = "Values that can be written to the field `ADC14INIE`"]
|
|
pub enum ADC14INIEW {
|
|
#[doc = "Interrupt disabled"]
|
|
ADC14INIE_0,
|
|
#[doc = "Interrupt enabled"]
|
|
ADC14INIE_1,
|
|
}
|
|
impl ADC14INIEW {
|
|
#[allow(missing_docs)]
|
|
#[doc(hidden)]
|
|
#[inline]
|
|
pub fn _bits(&self) -> bool {
|
|
match *self {
|
|
ADC14INIEW::ADC14INIE_0 => false,
|
|
ADC14INIEW::ADC14INIE_1 => true,
|
|
}
|
|
}
|
|
}
|
|
#[doc = r" Proxy"]
|
|
pub struct _ADC14INIEW<'a> {
|
|
w: &'a mut W,
|
|
}
|
|
impl<'a> _ADC14INIEW<'a> {
|
|
#[doc = r" Writes `variant` to the field"]
|
|
#[inline]
|
|
pub fn variant(self, variant: ADC14INIEW) -> &'a mut W {
|
|
{
|
|
self.bit(variant._bits())
|
|
}
|
|
}
|
|
#[doc = "Interrupt disabled"]
|
|
#[inline]
|
|
pub fn adc14inie_0(self) -> &'a mut W {
|
|
self.variant(ADC14INIEW::ADC14INIE_0)
|
|
}
|
|
#[doc = "Interrupt enabled"]
|
|
#[inline]
|
|
pub fn adc14inie_1(self) -> &'a mut W {
|
|
self.variant(ADC14INIEW::ADC14INIE_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 = 1;
|
|
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 `ADC14LOIE`"]
|
|
pub enum ADC14LOIEW {
|
|
#[doc = "Interrupt disabled"]
|
|
ADC14LOIE_0,
|
|
#[doc = "Interrupt enabled"]
|
|
ADC14LOIE_1,
|
|
}
|
|
impl ADC14LOIEW {
|
|
#[allow(missing_docs)]
|
|
#[doc(hidden)]
|
|
#[inline]
|
|
pub fn _bits(&self) -> bool {
|
|
match *self {
|
|
ADC14LOIEW::ADC14LOIE_0 => false,
|
|
ADC14LOIEW::ADC14LOIE_1 => true,
|
|
}
|
|
}
|
|
}
|
|
#[doc = r" Proxy"]
|
|
pub struct _ADC14LOIEW<'a> {
|
|
w: &'a mut W,
|
|
}
|
|
impl<'a> _ADC14LOIEW<'a> {
|
|
#[doc = r" Writes `variant` to the field"]
|
|
#[inline]
|
|
pub fn variant(self, variant: ADC14LOIEW) -> &'a mut W {
|
|
{
|
|
self.bit(variant._bits())
|
|
}
|
|
}
|
|
#[doc = "Interrupt disabled"]
|
|
#[inline]
|
|
pub fn adc14loie_0(self) -> &'a mut W {
|
|
self.variant(ADC14LOIEW::ADC14LOIE_0)
|
|
}
|
|
#[doc = "Interrupt enabled"]
|
|
#[inline]
|
|
pub fn adc14loie_1(self) -> &'a mut W {
|
|
self.variant(ADC14LOIEW::ADC14LOIE_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 `ADC14HIIE`"]
|
|
pub enum ADC14HIIEW {
|
|
#[doc = "Interrupt disabled"]
|
|
ADC14HIIE_0,
|
|
#[doc = "Interrupt enabled"]
|
|
ADC14HIIE_1,
|
|
}
|
|
impl ADC14HIIEW {
|
|
#[allow(missing_docs)]
|
|
#[doc(hidden)]
|
|
#[inline]
|
|
pub fn _bits(&self) -> bool {
|
|
match *self {
|
|
ADC14HIIEW::ADC14HIIE_0 => false,
|
|
ADC14HIIEW::ADC14HIIE_1 => true,
|
|
}
|
|
}
|
|
}
|
|
#[doc = r" Proxy"]
|
|
pub struct _ADC14HIIEW<'a> {
|
|
w: &'a mut W,
|
|
}
|
|
impl<'a> _ADC14HIIEW<'a> {
|
|
#[doc = r" Writes `variant` to the field"]
|
|
#[inline]
|
|
pub fn variant(self, variant: ADC14HIIEW) -> &'a mut W {
|
|
{
|
|
self.bit(variant._bits())
|
|
}
|
|
}
|
|
#[doc = "Interrupt disabled"]
|
|
#[inline]
|
|
pub fn adc14hiie_0(self) -> &'a mut W {
|
|
self.variant(ADC14HIIEW::ADC14HIIE_0)
|
|
}
|
|
#[doc = "Interrupt enabled"]
|
|
#[inline]
|
|
pub fn adc14hiie_1(self) -> &'a mut W {
|
|
self.variant(ADC14HIIEW::ADC14HIIE_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 `ADC14OVIE`"]
|
|
pub enum ADC14OVIEW {
|
|
#[doc = "Interrupt disabled"]
|
|
ADC14OVIE_0,
|
|
#[doc = "Interrupt enabled"]
|
|
ADC14OVIE_1,
|
|
}
|
|
impl ADC14OVIEW {
|
|
#[allow(missing_docs)]
|
|
#[doc(hidden)]
|
|
#[inline]
|
|
pub fn _bits(&self) -> bool {
|
|
match *self {
|
|
ADC14OVIEW::ADC14OVIE_0 => false,
|
|
ADC14OVIEW::ADC14OVIE_1 => true,
|
|
}
|
|
}
|
|
}
|
|
#[doc = r" Proxy"]
|
|
pub struct _ADC14OVIEW<'a> {
|
|
w: &'a mut W,
|
|
}
|
|
impl<'a> _ADC14OVIEW<'a> {
|
|
#[doc = r" Writes `variant` to the field"]
|
|
#[inline]
|
|
pub fn variant(self, variant: ADC14OVIEW) -> &'a mut W {
|
|
{
|
|
self.bit(variant._bits())
|
|
}
|
|
}
|
|
#[doc = "Interrupt disabled"]
|
|
#[inline]
|
|
pub fn adc14ovie_0(self) -> &'a mut W {
|
|
self.variant(ADC14OVIEW::ADC14OVIE_0)
|
|
}
|
|
#[doc = "Interrupt enabled"]
|
|
#[inline]
|
|
pub fn adc14ovie_1(self) -> &'a mut W {
|
|
self.variant(ADC14OVIEW::ADC14OVIE_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 `ADC14TOVIE`"]
|
|
pub enum ADC14TOVIEW {
|
|
#[doc = "Interrupt disabled"]
|
|
ADC14TOVIE_0,
|
|
#[doc = "Interrupt enabled"]
|
|
ADC14TOVIE_1,
|
|
}
|
|
impl ADC14TOVIEW {
|
|
#[allow(missing_docs)]
|
|
#[doc(hidden)]
|
|
#[inline]
|
|
pub fn _bits(&self) -> bool {
|
|
match *self {
|
|
ADC14TOVIEW::ADC14TOVIE_0 => false,
|
|
ADC14TOVIEW::ADC14TOVIE_1 => true,
|
|
}
|
|
}
|
|
}
|
|
#[doc = r" Proxy"]
|
|
pub struct _ADC14TOVIEW<'a> {
|
|
w: &'a mut W,
|
|
}
|
|
impl<'a> _ADC14TOVIEW<'a> {
|
|
#[doc = r" Writes `variant` to the field"]
|
|
#[inline]
|
|
pub fn variant(self, variant: ADC14TOVIEW) -> &'a mut W {
|
|
{
|
|
self.bit(variant._bits())
|
|
}
|
|
}
|
|
#[doc = "Interrupt disabled"]
|
|
#[inline]
|
|
pub fn adc14tovie_0(self) -> &'a mut W {
|
|
self.variant(ADC14TOVIEW::ADC14TOVIE_0)
|
|
}
|
|
#[doc = "Interrupt enabled"]
|
|
#[inline]
|
|
pub fn adc14tovie_1(self) -> &'a mut W {
|
|
self.variant(ADC14TOVIEW::ADC14TOVIE_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 = 5;
|
|
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 `ADC14RDYIE`"]
|
|
pub enum ADC14RDYIEW {
|
|
#[doc = "Interrupt disabled"]
|
|
ADC14RDYIE_0,
|
|
#[doc = "Interrupt enabled"]
|
|
ADC14RDYIE_1,
|
|
}
|
|
impl ADC14RDYIEW {
|
|
#[allow(missing_docs)]
|
|
#[doc(hidden)]
|
|
#[inline]
|
|
pub fn _bits(&self) -> bool {
|
|
match *self {
|
|
ADC14RDYIEW::ADC14RDYIE_0 => false,
|
|
ADC14RDYIEW::ADC14RDYIE_1 => true,
|
|
}
|
|
}
|
|
}
|
|
#[doc = r" Proxy"]
|
|
pub struct _ADC14RDYIEW<'a> {
|
|
w: &'a mut W,
|
|
}
|
|
impl<'a> _ADC14RDYIEW<'a> {
|
|
#[doc = r" Writes `variant` to the field"]
|
|
#[inline]
|
|
pub fn variant(self, variant: ADC14RDYIEW) -> &'a mut W {
|
|
{
|
|
self.bit(variant._bits())
|
|
}
|
|
}
|
|
#[doc = "Interrupt disabled"]
|
|
#[inline]
|
|
pub fn adc14rdyie_0(self) -> &'a mut W {
|
|
self.variant(ADC14RDYIEW::ADC14RDYIE_0)
|
|
}
|
|
#[doc = "Interrupt enabled"]
|
|
#[inline]
|
|
pub fn adc14rdyie_1(self) -> &'a mut W {
|
|
self.variant(ADC14RDYIEW::ADC14RDYIE_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 = 6;
|
|
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 1 - Interrupt enable for ADC14MEMx within comparator window"]
|
|
#[inline]
|
|
pub fn adc14inie(&self) -> ADC14INIER {
|
|
ADC14INIER::_from({
|
|
const MASK: bool = true;
|
|
const OFFSET: u8 = 1;
|
|
((self.bits >> OFFSET) & MASK as u32) != 0
|
|
})
|
|
}
|
|
#[doc = "Bit 2 - Interrupt enable for ADC14MEMx below comparator window"]
|
|
#[inline]
|
|
pub fn adc14loie(&self) -> ADC14LOIER {
|
|
ADC14LOIER::_from({
|
|
const MASK: bool = true;
|
|
const OFFSET: u8 = 2;
|
|
((self.bits >> OFFSET) & MASK as u32) != 0
|
|
})
|
|
}
|
|
#[doc = "Bit 3 - Interrupt enable for ADC14MEMx above comparator window"]
|
|
#[inline]
|
|
pub fn adc14hiie(&self) -> ADC14HIIER {
|
|
ADC14HIIER::_from({
|
|
const MASK: bool = true;
|
|
const OFFSET: u8 = 3;
|
|
((self.bits >> OFFSET) & MASK as u32) != 0
|
|
})
|
|
}
|
|
#[doc = "Bit 4 - ADC14MEMx overflow-interrupt enable"]
|
|
#[inline]
|
|
pub fn adc14ovie(&self) -> ADC14OVIER {
|
|
ADC14OVIER::_from({
|
|
const MASK: bool = true;
|
|
const OFFSET: u8 = 4;
|
|
((self.bits >> OFFSET) & MASK as u32) != 0
|
|
})
|
|
}
|
|
#[doc = "Bit 5 - ADC14 conversion-time-overflow interrupt enable"]
|
|
#[inline]
|
|
pub fn adc14tovie(&self) -> ADC14TOVIER {
|
|
ADC14TOVIER::_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 enable"]
|
|
#[inline]
|
|
pub fn adc14rdyie(&self) -> ADC14RDYIER {
|
|
ADC14RDYIER::_from({
|
|
const MASK: bool = true;
|
|
const OFFSET: u8 = 6;
|
|
((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 1 - Interrupt enable for ADC14MEMx within comparator window"]
|
|
#[inline]
|
|
pub fn adc14inie(&mut self) -> _ADC14INIEW {
|
|
_ADC14INIEW { w: self }
|
|
}
|
|
#[doc = "Bit 2 - Interrupt enable for ADC14MEMx below comparator window"]
|
|
#[inline]
|
|
pub fn adc14loie(&mut self) -> _ADC14LOIEW {
|
|
_ADC14LOIEW { w: self }
|
|
}
|
|
#[doc = "Bit 3 - Interrupt enable for ADC14MEMx above comparator window"]
|
|
#[inline]
|
|
pub fn adc14hiie(&mut self) -> _ADC14HIIEW {
|
|
_ADC14HIIEW { w: self }
|
|
}
|
|
#[doc = "Bit 4 - ADC14MEMx overflow-interrupt enable"]
|
|
#[inline]
|
|
pub fn adc14ovie(&mut self) -> _ADC14OVIEW {
|
|
_ADC14OVIEW { w: self }
|
|
}
|
|
#[doc = "Bit 5 - ADC14 conversion-time-overflow interrupt enable"]
|
|
#[inline]
|
|
pub fn adc14tovie(&mut self) -> _ADC14TOVIEW {
|
|
_ADC14TOVIEW { w: self }
|
|
}
|
|
#[doc = "Bit 6 - ADC14 local buffered reference ready interrupt enable"]
|
|
#[inline]
|
|
pub fn adc14rdyie(&mut self) -> _ADC14RDYIEW {
|
|
_ADC14RDYIEW { w: self }
|
|
}
|
|
}
|