#[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::IER {
#[doc = r"Modifies the contents of the register"]
#[inline(always)]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
{
let bits = self.register.get();
self.register.set(f(&R { bits }, &mut W { bits }).bits);
}
#[doc = r"Reads the contents of the register"]
#[inline(always)]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
#[doc = r"Writes to the register"]
#[inline(always)]
pub fn write<F>(&self, f: F)
where
F: FnOnce(&mut W) -> &mut W,
{
self.register.set(
f(&mut W {
bits: Self::reset_value(),
})
.bits,
);
}
#[doc = r"Reset value of the register"]
#[inline(always)]
pub const fn reset_value() -> u32 {
0
}
#[doc = r"Writes the reset value to the register"]
#[inline(always)]
pub fn reset(&self) {
self.register.set(Self::reset_value())
}
}
#[doc = "Possible values of the field `JQOVFIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum JQOVFIER {
#[doc = "Injected context queue overflow interrupt disabled"]
DISABLED,
#[doc = "Injected context queue overflow interrupt enabled"]
ENABLED,
}
impl JQOVFIER {
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
JQOVFIER::DISABLED => false,
JQOVFIER::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> JQOVFIER {
match value {
false => JQOVFIER::DISABLED,
true => JQOVFIER::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == JQOVFIER::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == JQOVFIER::ENABLED
}
}
#[doc = "Values that can be written to the field `JQOVFIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum JQOVFIEW {
#[doc = "Injected context queue overflow interrupt disabled"]
DISABLED,
#[doc = "Injected context queue overflow interrupt enabled"]
ENABLED,
}
impl JQOVFIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
JQOVFIEW::DISABLED => false,
JQOVFIEW::ENABLED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _JQOVFIEW<'a> {
w: &'a mut W,
}
impl<'a> _JQOVFIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: JQOVFIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Injected context queue overflow interrupt disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(JQOVFIEW::DISABLED)
}
#[doc = "Injected context queue overflow interrupt enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(JQOVFIEW::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 10);
self.w.bits |= ((value as u32) & 0x01) << 10;
self.w
}
}
#[doc = "Possible values of the field `AWD3IE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum AWD3IER {
#[doc = "Analog watchdog interrupt disabled"]
DISABLED,
#[doc = "Analog watchdog interrupt enabled"]
ENABLED,
}
impl AWD3IER {
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
AWD3IER::DISABLED => false,
AWD3IER::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> AWD3IER {
match value {
false => AWD3IER::DISABLED,
true => AWD3IER::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == AWD3IER::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == AWD3IER::ENABLED
}
}
#[doc = "Values that can be written to the field `AWD3IE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum AWD3IEW {
#[doc = "Analog watchdog interrupt disabled"]
DISABLED,
#[doc = "Analog watchdog interrupt enabled"]
ENABLED,
}
impl AWD3IEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
AWD3IEW::DISABLED => false,
AWD3IEW::ENABLED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _AWD3IEW<'a> {
w: &'a mut W,
}
impl<'a> _AWD3IEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AWD3IEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Analog watchdog interrupt disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(AWD3IEW::DISABLED)
}
#[doc = "Analog watchdog interrupt enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(AWD3IEW::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 9);
self.w.bits |= ((value as u32) & 0x01) << 9;
self.w
}
}
#[doc = "Possible values of the field `AWD2IE`"]
pub type AWD2IER = AWD3IER;
#[doc = "Values that can be written to the field `AWD2IE`"]
pub type AWD2IEW = AWD3IEW;
#[doc = r"Proxy"]
pub struct _AWD2IEW<'a> {
w: &'a mut W,
}
impl<'a> _AWD2IEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AWD2IEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Analog watchdog interrupt disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(AWD3IEW::DISABLED)
}
#[doc = "Analog watchdog interrupt enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(AWD3IEW::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 8);
self.w.bits |= ((value as u32) & 0x01) << 8;
self.w
}
}
#[doc = "Possible values of the field `AWD1IE`"]
pub type AWD1IER = AWD3IER;
#[doc = "Values that can be written to the field `AWD1IE`"]
pub type AWD1IEW = AWD3IEW;
#[doc = r"Proxy"]
pub struct _AWD1IEW<'a> {
w: &'a mut W,
}
impl<'a> _AWD1IEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AWD1IEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Analog watchdog interrupt disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(AWD3IEW::DISABLED)
}
#[doc = "Analog watchdog interrupt enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(AWD3IEW::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 7);
self.w.bits |= ((value as u32) & 0x01) << 7;
self.w
}
}
#[doc = "Possible values of the field `JEOSIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum JEOSIER {
#[doc = "End of injected sequence interrupt disabled"]
DISABLED,
#[doc = "End of injected sequence interrupt enabled"]
ENABLED,
}
impl JEOSIER {
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
JEOSIER::DISABLED => false,
JEOSIER::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> JEOSIER {
match value {
false => JEOSIER::DISABLED,
true => JEOSIER::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == JEOSIER::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == JEOSIER::ENABLED
}
}
#[doc = "Values that can be written to the field `JEOSIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum JEOSIEW {
#[doc = "End of injected sequence interrupt disabled"]
DISABLED,
#[doc = "End of injected sequence interrupt enabled"]
ENABLED,
}
impl JEOSIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
JEOSIEW::DISABLED => false,
JEOSIEW::ENABLED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _JEOSIEW<'a> {
w: &'a mut W,
}
impl<'a> _JEOSIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: JEOSIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "End of injected sequence interrupt disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(JEOSIEW::DISABLED)
}
#[doc = "End of injected sequence interrupt enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(JEOSIEW::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 6);
self.w.bits |= ((value as u32) & 0x01) << 6;
self.w
}
}
#[doc = "Possible values of the field `JEOCIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum JEOCIER {
#[doc = "End of injected conversion interrupt disabled"]
DISABLED,
#[doc = "End of injected conversion interrupt enabled"]
ENABLED,
}
impl JEOCIER {
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
JEOCIER::DISABLED => false,
JEOCIER::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> JEOCIER {
match value {
false => JEOCIER::DISABLED,
true => JEOCIER::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == JEOCIER::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == JEOCIER::ENABLED
}
}
#[doc = "Values that can be written to the field `JEOCIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum JEOCIEW {
#[doc = "End of injected conversion interrupt disabled"]
DISABLED,
#[doc = "End of injected conversion interrupt enabled"]
ENABLED,
}
impl JEOCIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
JEOCIEW::DISABLED => false,
JEOCIEW::ENABLED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _JEOCIEW<'a> {
w: &'a mut W,
}
impl<'a> _JEOCIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: JEOCIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "End of injected conversion interrupt disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(JEOCIEW::DISABLED)
}
#[doc = "End of injected conversion interrupt enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(JEOCIEW::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 5);
self.w.bits |= ((value as u32) & 0x01) << 5;
self.w
}
}
#[doc = "Possible values of the field `OVRIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OVRIER {
#[doc = "Overrun interrupt disabled"]
DISABLED,
#[doc = "Overrun interrupt enabled"]
ENABLED,
}
impl OVRIER {
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
OVRIER::DISABLED => false,
OVRIER::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> OVRIER {
match value {
false => OVRIER::DISABLED,
true => OVRIER::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == OVRIER::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == OVRIER::ENABLED
}
}
#[doc = "Values that can be written to the field `OVRIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OVRIEW {
#[doc = "Overrun interrupt disabled"]
DISABLED,
#[doc = "Overrun interrupt enabled"]
ENABLED,
}
impl OVRIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
OVRIEW::DISABLED => false,
OVRIEW::ENABLED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _OVRIEW<'a> {
w: &'a mut W,
}
impl<'a> _OVRIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OVRIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Overrun interrupt disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(OVRIEW::DISABLED)
}
#[doc = "Overrun interrupt enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(OVRIEW::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 4);
self.w.bits |= ((value as u32) & 0x01) << 4;
self.w
}
}
#[doc = "Possible values of the field `EOSIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EOSIER {
#[doc = "End of regular sequence interrupt disabled"]
DISABLED,
#[doc = "End of regular sequence interrupt enabled"]
ENABLED,
}
impl EOSIER {
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
EOSIER::DISABLED => false,
EOSIER::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> EOSIER {
match value {
false => EOSIER::DISABLED,
true => EOSIER::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EOSIER::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EOSIER::ENABLED
}
}
#[doc = "Values that can be written to the field `EOSIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EOSIEW {
#[doc = "End of regular sequence interrupt disabled"]
DISABLED,
#[doc = "End of regular sequence interrupt enabled"]
ENABLED,
}
impl EOSIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
EOSIEW::DISABLED => false,
EOSIEW::ENABLED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _EOSIEW<'a> {
w: &'a mut W,
}
impl<'a> _EOSIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: EOSIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "End of regular sequence interrupt disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EOSIEW::DISABLED)
}
#[doc = "End of regular sequence interrupt enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EOSIEW::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 3);
self.w.bits |= ((value as u32) & 0x01) << 3;
self.w
}
}
#[doc = "Possible values of the field `EOCIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EOCIER {
#[doc = "End of regular conversion interrupt disabled"]
DISABLED,
#[doc = "End of regular conversion interrupt enabled"]
ENABLED,
}
impl EOCIER {
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
EOCIER::DISABLED => false,
EOCIER::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> EOCIER {
match value {
false => EOCIER::DISABLED,
true => EOCIER::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EOCIER::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EOCIER::ENABLED
}
}
#[doc = "Values that can be written to the field `EOCIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EOCIEW {
#[doc = "End of regular conversion interrupt disabled"]
DISABLED,
#[doc = "End of regular conversion interrupt enabled"]
ENABLED,
}
impl EOCIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
EOCIEW::DISABLED => false,
EOCIEW::ENABLED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _EOCIEW<'a> {
w: &'a mut W,
}
impl<'a> _EOCIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: EOCIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "End of regular conversion interrupt disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EOCIEW::DISABLED)
}
#[doc = "End of regular conversion interrupt enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EOCIEW::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 2);
self.w.bits |= ((value as u32) & 0x01) << 2;
self.w
}
}
#[doc = "Possible values of the field `EOSMPIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EOSMPIER {
#[doc = "End of regular conversion sampling phase interrupt disabled"]
DISABLED,
#[doc = "End of regular conversion sampling phase interrupt enabled"]
ENABLED,
}
impl EOSMPIER {
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
EOSMPIER::DISABLED => false,
EOSMPIER::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> EOSMPIER {
match value {
false => EOSMPIER::DISABLED,
true => EOSMPIER::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EOSMPIER::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EOSMPIER::ENABLED
}
}
#[doc = "Values that can be written to the field `EOSMPIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EOSMPIEW {
#[doc = "End of regular conversion sampling phase interrupt disabled"]
DISABLED,
#[doc = "End of regular conversion sampling phase interrupt enabled"]
ENABLED,
}
impl EOSMPIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
EOSMPIEW::DISABLED => false,
EOSMPIEW::ENABLED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _EOSMPIEW<'a> {
w: &'a mut W,
}
impl<'a> _EOSMPIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: EOSMPIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "End of regular conversion sampling phase interrupt disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EOSMPIEW::DISABLED)
}
#[doc = "End of regular conversion sampling phase interrupt enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EOSMPIEW::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 1);
self.w.bits |= ((value as u32) & 0x01) << 1;
self.w
}
}
#[doc = "Possible values of the field `ADRDYIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADRDYIER {
#[doc = "ADC ready interrupt disabled"]
DISABLED,
#[doc = "ADC ready interrupt enabled"]
ENABLED,
}
impl ADRDYIER {
#[doc = r"Returns `true` if the bit is clear (0)"]
#[inline(always)]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r"Returns `true` if the bit is set (1)"]
#[inline(always)]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bit(&self) -> bool {
match *self {
ADRDYIER::DISABLED => false,
ADRDYIER::ENABLED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> ADRDYIER {
match value {
false => ADRDYIER::DISABLED,
true => ADRDYIER::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADRDYIER::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADRDYIER::ENABLED
}
}
#[doc = "Values that can be written to the field `ADRDYIE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADRDYIEW {
#[doc = "ADC ready interrupt disabled"]
DISABLED,
#[doc = "ADC ready interrupt enabled"]
ENABLED,
}
impl ADRDYIEW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
ADRDYIEW::DISABLED => false,
ADRDYIEW::ENABLED => true,
}
}
}
#[doc = r"Proxy"]
pub struct _ADRDYIEW<'a> {
w: &'a mut W,
}
impl<'a> _ADRDYIEW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ADRDYIEW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "ADC ready interrupt disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADRDYIEW::DISABLED)
}
#[doc = "ADC ready interrupt enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADRDYIEW::ENABLED)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits &= !(0x01 << 0);
self.w.bits |= ((value as u32) & 0x01) << 0;
self.w
}
}
impl R {
#[doc = r"Value of the register as raw bits"]
#[inline(always)]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bit 10 - ADC group injected contexts queue overflow interrupt"]
#[inline(always)]
pub fn jqovfie(&self) -> JQOVFIER {
JQOVFIER::_from(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 9 - ADC analog watchdog 3 interrupt"]
#[inline(always)]
pub fn awd3ie(&self) -> AWD3IER {
AWD3IER::_from(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 8 - ADC analog watchdog 2 interrupt"]
#[inline(always)]
pub fn awd2ie(&self) -> AWD2IER {
AWD2IER::_from(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 7 - ADC analog watchdog 1 interrupt"]
#[inline(always)]
pub fn awd1ie(&self) -> AWD1IER {
AWD1IER::_from(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 6 - ADC group injected end of sequence conversions interrupt"]
#[inline(always)]
pub fn jeosie(&self) -> JEOSIER {
JEOSIER::_from(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 5 - ADC group injected end of unitary conversion interrupt"]
#[inline(always)]
pub fn jeocie(&self) -> JEOCIER {
JEOCIER::_from(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 4 - ADC group regular overrun interrupt"]
#[inline(always)]
pub fn ovrie(&self) -> OVRIER {
OVRIER::_from(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3 - ADC group regular end of sequence conversions interrupt"]
#[inline(always)]
pub fn eosie(&self) -> EOSIER {
EOSIER::_from(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 2 - ADC group regular end of unitary conversion interrupt"]
#[inline(always)]
pub fn eocie(&self) -> EOCIER {
EOCIER::_from(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - ADC group regular end of sampling interrupt"]
#[inline(always)]
pub fn eosmpie(&self) -> EOSMPIER {
EOSMPIER::_from(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - ADC ready interrupt"]
#[inline(always)]
pub fn adrdyie(&self) -> ADRDYIER {
ADRDYIER::_from(((self.bits >> 0) & 0x01) != 0)
}
}
impl W {
#[doc = r"Writes raw bits to the register"]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
#[doc = "Bit 10 - ADC group injected contexts queue overflow interrupt"]
#[inline(always)]
pub fn jqovfie(&mut self) -> _JQOVFIEW {
_JQOVFIEW { w: self }
}
#[doc = "Bit 9 - ADC analog watchdog 3 interrupt"]
#[inline(always)]
pub fn awd3ie(&mut self) -> _AWD3IEW {
_AWD3IEW { w: self }
}
#[doc = "Bit 8 - ADC analog watchdog 2 interrupt"]
#[inline(always)]
pub fn awd2ie(&mut self) -> _AWD2IEW {
_AWD2IEW { w: self }
}
#[doc = "Bit 7 - ADC analog watchdog 1 interrupt"]
#[inline(always)]
pub fn awd1ie(&mut self) -> _AWD1IEW {
_AWD1IEW { w: self }
}
#[doc = "Bit 6 - ADC group injected end of sequence conversions interrupt"]
#[inline(always)]
pub fn jeosie(&mut self) -> _JEOSIEW {
_JEOSIEW { w: self }
}
#[doc = "Bit 5 - ADC group injected end of unitary conversion interrupt"]
#[inline(always)]
pub fn jeocie(&mut self) -> _JEOCIEW {
_JEOCIEW { w: self }
}
#[doc = "Bit 4 - ADC group regular overrun interrupt"]
#[inline(always)]
pub fn ovrie(&mut self) -> _OVRIEW {
_OVRIEW { w: self }
}
#[doc = "Bit 3 - ADC group regular end of sequence conversions interrupt"]
#[inline(always)]
pub fn eosie(&mut self) -> _EOSIEW {
_EOSIEW { w: self }
}
#[doc = "Bit 2 - ADC group regular end of unitary conversion interrupt"]
#[inline(always)]
pub fn eocie(&mut self) -> _EOCIEW {
_EOCIEW { w: self }
}
#[doc = "Bit 1 - ADC group regular end of sampling interrupt"]
#[inline(always)]
pub fn eosmpie(&mut self) -> _EOSMPIEW {
_EOSMPIEW { w: self }
}
#[doc = "Bit 0 - ADC ready interrupt"]
#[inline(always)]
pub fn adrdyie(&mut self) -> _ADRDYIEW {
_ADRDYIEW { w: self }
}
}