#[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::ISR {
#[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 `JQOVF`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum JQOVFR {
#[doc = "No injected context queue overflow has occurred"]
NOOVERFLOW,
#[doc = "Injected context queue overflow has occurred"]
OVERFLOW,
}
impl JQOVFR {
#[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 {
JQOVFR::NOOVERFLOW => false,
JQOVFR::OVERFLOW => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> JQOVFR {
match value {
false => JQOVFR::NOOVERFLOW,
true => JQOVFR::OVERFLOW,
}
}
#[doc = "Checks if the value of the field is `NOOVERFLOW`"]
#[inline(always)]
pub fn is_no_overflow(&self) -> bool {
*self == JQOVFR::NOOVERFLOW
}
#[doc = "Checks if the value of the field is `OVERFLOW`"]
#[inline(always)]
pub fn is_overflow(&self) -> bool {
*self == JQOVFR::OVERFLOW
}
}
#[doc = "Values that can be written to the field `JQOVF`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum JQOVFW {
#[doc = "Clear injected context queue overflow flag"]
CLEAR,
}
impl JQOVFW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
JQOVFW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _JQOVFW<'a> {
w: &'a mut W,
}
impl<'a> _JQOVFW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: JQOVFW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clear injected context queue overflow flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(JQOVFW::CLEAR)
}
#[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 `AWD3`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum AWD3R {
#[doc = "No analog watchdog event occurred"]
NOEVENT,
#[doc = "Analog watchdog event occurred"]
EVENT,
}
impl AWD3R {
#[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 {
AWD3R::NOEVENT => false,
AWD3R::EVENT => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> AWD3R {
match value {
false => AWD3R::NOEVENT,
true => AWD3R::EVENT,
}
}
#[doc = "Checks if the value of the field is `NOEVENT`"]
#[inline(always)]
pub fn is_no_event(&self) -> bool {
*self == AWD3R::NOEVENT
}
#[doc = "Checks if the value of the field is `EVENT`"]
#[inline(always)]
pub fn is_event(&self) -> bool {
*self == AWD3R::EVENT
}
}
#[doc = "Values that can be written to the field `AWD3`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum AWD3W {
#[doc = "Clear analog watchdog event occurred flag"]
CLEAR,
}
impl AWD3W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
AWD3W::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _AWD3W<'a> {
w: &'a mut W,
}
impl<'a> _AWD3W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AWD3W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clear analog watchdog event occurred flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(AWD3W::CLEAR)
}
#[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 `AWD2`"]
pub type AWD2R = AWD3R;
#[doc = "Values that can be written to the field `AWD2`"]
pub type AWD2W = AWD3W;
#[doc = r"Proxy"]
pub struct _AWD2W<'a> {
w: &'a mut W,
}
impl<'a> _AWD2W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AWD2W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clear analog watchdog event occurred flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(AWD3W::CLEAR)
}
#[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 `AWD1`"]
pub type AWD1R = AWD3R;
#[doc = "Values that can be written to the field `AWD1`"]
pub type AWD1W = AWD3W;
#[doc = r"Proxy"]
pub struct _AWD1W<'a> {
w: &'a mut W,
}
impl<'a> _AWD1W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AWD1W) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clear analog watchdog event occurred flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(AWD3W::CLEAR)
}
#[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 `JEOS`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum JEOSR {
#[doc = "Injected sequence is not complete"]
NOTCOMPLETE,
#[doc = "Injected sequence complete"]
COMPLETE,
}
impl JEOSR {
#[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 {
JEOSR::NOTCOMPLETE => false,
JEOSR::COMPLETE => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> JEOSR {
match value {
false => JEOSR::NOTCOMPLETE,
true => JEOSR::COMPLETE,
}
}
#[doc = "Checks if the value of the field is `NOTCOMPLETE`"]
#[inline(always)]
pub fn is_not_complete(&self) -> bool {
*self == JEOSR::NOTCOMPLETE
}
#[doc = "Checks if the value of the field is `COMPLETE`"]
#[inline(always)]
pub fn is_complete(&self) -> bool {
*self == JEOSR::COMPLETE
}
}
#[doc = "Values that can be written to the field `JEOS`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum JEOSW {
#[doc = "Clear Injected sequence complete flag"]
CLEAR,
}
impl JEOSW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
JEOSW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _JEOSW<'a> {
w: &'a mut W,
}
impl<'a> _JEOSW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: JEOSW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clear Injected sequence complete flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(JEOSW::CLEAR)
}
#[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 `JEOC`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum JEOCR {
#[doc = "Injected conversion is not complete"]
NOTCOMPLETE,
#[doc = "Injected conversion complete"]
COMPLETE,
}
impl JEOCR {
#[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 {
JEOCR::NOTCOMPLETE => false,
JEOCR::COMPLETE => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> JEOCR {
match value {
false => JEOCR::NOTCOMPLETE,
true => JEOCR::COMPLETE,
}
}
#[doc = "Checks if the value of the field is `NOTCOMPLETE`"]
#[inline(always)]
pub fn is_not_complete(&self) -> bool {
*self == JEOCR::NOTCOMPLETE
}
#[doc = "Checks if the value of the field is `COMPLETE`"]
#[inline(always)]
pub fn is_complete(&self) -> bool {
*self == JEOCR::COMPLETE
}
}
#[doc = "Values that can be written to the field `JEOC`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum JEOCW {
#[doc = "Clear injected conversion complete flag"]
CLEAR,
}
impl JEOCW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
JEOCW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _JEOCW<'a> {
w: &'a mut W,
}
impl<'a> _JEOCW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: JEOCW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clear injected conversion complete flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(JEOCW::CLEAR)
}
#[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 `OVR`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OVRR {
#[doc = "No overrun occurred"]
NOOVERRUN,
#[doc = "Overrun occurred"]
OVERRUN,
}
impl OVRR {
#[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 {
OVRR::NOOVERRUN => false,
OVRR::OVERRUN => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> OVRR {
match value {
false => OVRR::NOOVERRUN,
true => OVRR::OVERRUN,
}
}
#[doc = "Checks if the value of the field is `NOOVERRUN`"]
#[inline(always)]
pub fn is_no_overrun(&self) -> bool {
*self == OVRR::NOOVERRUN
}
#[doc = "Checks if the value of the field is `OVERRUN`"]
#[inline(always)]
pub fn is_overrun(&self) -> bool {
*self == OVRR::OVERRUN
}
}
#[doc = "Values that can be written to the field `OVR`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OVRW {
#[doc = "Clear overrun occurred flag"]
CLEAR,
}
impl OVRW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
OVRW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _OVRW<'a> {
w: &'a mut W,
}
impl<'a> _OVRW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: OVRW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clear overrun occurred flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(OVRW::CLEAR)
}
#[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 `EOS`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EOSR {
#[doc = "Regular sequence is not complete"]
NOTCOMPLETE,
#[doc = "Regular sequence complete"]
COMPLETE,
}
impl EOSR {
#[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 {
EOSR::NOTCOMPLETE => false,
EOSR::COMPLETE => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> EOSR {
match value {
false => EOSR::NOTCOMPLETE,
true => EOSR::COMPLETE,
}
}
#[doc = "Checks if the value of the field is `NOTCOMPLETE`"]
#[inline(always)]
pub fn is_not_complete(&self) -> bool {
*self == EOSR::NOTCOMPLETE
}
#[doc = "Checks if the value of the field is `COMPLETE`"]
#[inline(always)]
pub fn is_complete(&self) -> bool {
*self == EOSR::COMPLETE
}
}
#[doc = "Values that can be written to the field `EOS`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EOSW {
#[doc = "Clear regular sequence complete flag"]
CLEAR,
}
impl EOSW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
EOSW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _EOSW<'a> {
w: &'a mut W,
}
impl<'a> _EOSW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: EOSW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clear regular sequence complete flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(EOSW::CLEAR)
}
#[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 `EOC`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EOCR {
#[doc = "Regular conversion is not complete"]
NOTCOMPLETE,
#[doc = "Regular conversion complete"]
COMPLETE,
}
impl EOCR {
#[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 {
EOCR::NOTCOMPLETE => false,
EOCR::COMPLETE => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> EOCR {
match value {
false => EOCR::NOTCOMPLETE,
true => EOCR::COMPLETE,
}
}
#[doc = "Checks if the value of the field is `NOTCOMPLETE`"]
#[inline(always)]
pub fn is_not_complete(&self) -> bool {
*self == EOCR::NOTCOMPLETE
}
#[doc = "Checks if the value of the field is `COMPLETE`"]
#[inline(always)]
pub fn is_complete(&self) -> bool {
*self == EOCR::COMPLETE
}
}
#[doc = "Values that can be written to the field `EOC`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EOCW {
#[doc = "Clear regular conversion complete flag"]
CLEAR,
}
impl EOCW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
EOCW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _EOCW<'a> {
w: &'a mut W,
}
impl<'a> _EOCW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: EOCW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clear regular conversion complete flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(EOCW::CLEAR)
}
#[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 `EOSMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EOSMPR {
#[doc = "End of sampling phase no yet reached"]
NOTENDED,
#[doc = "End of sampling phase reached"]
ENDED,
}
impl EOSMPR {
#[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 {
EOSMPR::NOTENDED => false,
EOSMPR::ENDED => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> EOSMPR {
match value {
false => EOSMPR::NOTENDED,
true => EOSMPR::ENDED,
}
}
#[doc = "Checks if the value of the field is `NOTENDED`"]
#[inline(always)]
pub fn is_not_ended(&self) -> bool {
*self == EOSMPR::NOTENDED
}
#[doc = "Checks if the value of the field is `ENDED`"]
#[inline(always)]
pub fn is_ended(&self) -> bool {
*self == EOSMPR::ENDED
}
}
#[doc = "Values that can be written to the field `EOSMP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EOSMPW {
#[doc = "Clear end of sampling phase reached flag"]
CLEAR,
}
impl EOSMPW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
EOSMPW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _EOSMPW<'a> {
w: &'a mut W,
}
impl<'a> _EOSMPW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: EOSMPW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clear end of sampling phase reached flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(EOSMPW::CLEAR)
}
#[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 `ADRDY`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADRDYR {
#[doc = "ADC is not ready to start conversion"]
NOTREADY,
#[doc = "ADC is ready to start conversion"]
READY,
}
impl ADRDYR {
#[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 {
ADRDYR::NOTREADY => false,
ADRDYR::READY => true,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: bool) -> ADRDYR {
match value {
false => ADRDYR::NOTREADY,
true => ADRDYR::READY,
}
}
#[doc = "Checks if the value of the field is `NOTREADY`"]
#[inline(always)]
pub fn is_not_ready(&self) -> bool {
*self == ADRDYR::NOTREADY
}
#[doc = "Checks if the value of the field is `READY`"]
#[inline(always)]
pub fn is_ready(&self) -> bool {
*self == ADRDYR::READY
}
}
#[doc = "Values that can be written to the field `ADRDY`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADRDYW {
#[doc = "Clear ADC is ready to start conversion flag"]
CLEAR,
}
impl ADRDYW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
ADRDYW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _ADRDYW<'a> {
w: &'a mut W,
}
impl<'a> _ADRDYW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ADRDYW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clear ADC is ready to start conversion flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(ADRDYW::CLEAR)
}
#[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 flag"]
#[inline(always)]
pub fn jqovf(&self) -> JQOVFR {
JQOVFR::_from(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 9 - ADC analog watchdog 3 flag"]
#[inline(always)]
pub fn awd3(&self) -> AWD3R {
AWD3R::_from(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 8 - ADC analog watchdog 2 flag"]
#[inline(always)]
pub fn awd2(&self) -> AWD2R {
AWD2R::_from(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 7 - ADC analog watchdog 1 flag"]
#[inline(always)]
pub fn awd1(&self) -> AWD1R {
AWD1R::_from(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 6 - ADC group injected end of sequence conversions flag"]
#[inline(always)]
pub fn jeos(&self) -> JEOSR {
JEOSR::_from(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 5 - ADC group injected end of unitary conversion flag"]
#[inline(always)]
pub fn jeoc(&self) -> JEOCR {
JEOCR::_from(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 4 - ADC group regular overrun flag"]
#[inline(always)]
pub fn ovr(&self) -> OVRR {
OVRR::_from(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3 - ADC group regular end of sequence conversions flag"]
#[inline(always)]
pub fn eos(&self) -> EOSR {
EOSR::_from(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 2 - ADC group regular end of unitary conversion flag"]
#[inline(always)]
pub fn eoc(&self) -> EOCR {
EOCR::_from(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - ADC group regular end of sampling flag"]
#[inline(always)]
pub fn eosmp(&self) -> EOSMPR {
EOSMPR::_from(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - ADC ready flag"]
#[inline(always)]
pub fn adrdy(&self) -> ADRDYR {
ADRDYR::_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 flag"]
#[inline(always)]
pub fn jqovf(&mut self) -> _JQOVFW {
_JQOVFW { w: self }
}
#[doc = "Bit 9 - ADC analog watchdog 3 flag"]
#[inline(always)]
pub fn awd3(&mut self) -> _AWD3W {
_AWD3W { w: self }
}
#[doc = "Bit 8 - ADC analog watchdog 2 flag"]
#[inline(always)]
pub fn awd2(&mut self) -> _AWD2W {
_AWD2W { w: self }
}
#[doc = "Bit 7 - ADC analog watchdog 1 flag"]
#[inline(always)]
pub fn awd1(&mut self) -> _AWD1W {
_AWD1W { w: self }
}
#[doc = "Bit 6 - ADC group injected end of sequence conversions flag"]
#[inline(always)]
pub fn jeos(&mut self) -> _JEOSW {
_JEOSW { w: self }
}
#[doc = "Bit 5 - ADC group injected end of unitary conversion flag"]
#[inline(always)]
pub fn jeoc(&mut self) -> _JEOCW {
_JEOCW { w: self }
}
#[doc = "Bit 4 - ADC group regular overrun flag"]
#[inline(always)]
pub fn ovr(&mut self) -> _OVRW {
_OVRW { w: self }
}
#[doc = "Bit 3 - ADC group regular end of sequence conversions flag"]
#[inline(always)]
pub fn eos(&mut self) -> _EOSW {
_EOSW { w: self }
}
#[doc = "Bit 2 - ADC group regular end of unitary conversion flag"]
#[inline(always)]
pub fn eoc(&mut self) -> _EOCW {
_EOCW { w: self }
}
#[doc = "Bit 1 - ADC group regular end of sampling flag"]
#[inline(always)]
pub fn eosmp(&mut self) -> _EOSMPW {
_EOSMPW { w: self }
}
#[doc = "Bit 0 - ADC ready flag"]
#[inline(always)]
pub fn adrdy(&mut self) -> _ADRDYW {
_ADRDYW { w: self }
}
}