Enum Event

Source
#[non_exhaustive]
pub enum Event { AdcReady, EndOfSamplingPhase, EndOfConversion, EndOfSequence, Overrun, InjectedChannelEndOfConversion, InjectedChannelEndOfSequence, AnalogWatchdog1, AnalogWatchdog2, AnalogWatchdog3, InjectedContextQueueOverfow, }
Expand description

Interrupt and status events.

All events can be cleared by Adc::clear_event or Adc::clear_events. Some events are also cleared on other conditions.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

AdcReady

This event is set by hardware after the ADC has been enabled. and when the ADC reaches a state where it is ready to accept conversion requests.

§

EndOfSamplingPhase

This event is set by hardware during the conversion of any channel (only for regular channels), at the end of the sampling phase.

§

EndOfConversion

This event is set by hardware at the end of each regular conversion of a channel when a new data is available in the data register (Adc::data_register).

§

EndOfSequence

This event is set by hardware at the end of the conversions of a regular sequence of channels.

When this event will occur, will depend on the Adc::sequence_length or config::ConversionMode.

§

Overrun

This event is set by hardware when an overrun occurs on a regular channel, meaning that a new conversion has completed while the Event::EndOfConversion flag was already set.

§Note

If OverrunMode::Preserve is configured and DMA is enabled (config::DmaMode), the DMA transfer requests are blocked until the event is cleared. (Adc::clear_event)

§

InjectedChannelEndOfConversion

This event is set by hardware at the end of each injected conversion of a channel when a new data is available in the corresponding ADCx_JDRy register.

§

InjectedChannelEndOfSequence

This event is set by hardware at the end of the conversions of all injected channels in the group.

§

AnalogWatchdog1

This event is set by hardware when the converted voltage crosses the values programmed in the fields LT1[11:0] and HT1[11:0] of ADCx_TR1 register.

§

AnalogWatchdog2

This event is set by hardware when the converted voltage crosses the values programmed in the fields LT2[7:0] and HT2[7:0] of ADCx_TR2 register.

§

AnalogWatchdog3

This event is set by hardware when the converted voltage crosses the values programmed in the fields LT3[7:0] and HT3[7:0] of ADCx_TR3 register. I

§

InjectedContextQueueOverfow

This event is set by hardware when an Overflow of the Injected Queue of Context occurs.

Trait Implementations§

Source§

impl<O: Into<EnumSet<Event>>> BitAnd<O> for Event

Source§

type Output = EnumSet<Event>

The resulting type after applying the & operator.
Source§

fn bitand(self, other: O) -> Self::Output

Performs the & operation. Read more
Source§

impl<O: Into<EnumSet<Event>>> BitOr<O> for Event

Source§

type Output = EnumSet<Event>

The resulting type after applying the | operator.
Source§

fn bitor(self, other: O) -> Self::Output

Performs the | operation. Read more
Source§

impl<O: Into<EnumSet<Event>>> BitXor<O> for Event

Source§

type Output = EnumSet<Event>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, other: O) -> Self::Output

Performs the ^ operation. Read more
Source§

impl Clone for Event

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Event

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl EnumSetTypePrivate for Event

Source§

const CONST_HELPER_INSTANCE: __EnumSetConstHelper = __EnumSetConstHelper

The instance of the ConstHelper.
Source§

const ALL_BITS: Self::Repr = {transmute(0x07ff): <adc::Event as enumset::__internal::EnumSetTypePrivate>::Repr}

A mask of bits that are valid in the bitset.
Source§

const BIT_WIDTH: u32 = 11u32

The largest bit used in the bitset.
Source§

const VARIANT_COUNT: u32 = 11u32

The number of variants in the bitset.
Source§

type ConstHelper = __EnumSetConstHelper

A helper type used to implement the enum_set! macro among other things.
Source§

type Repr = u16

The underlying type used to store the bitset.
Source§

fn enum_into_u32(self) -> u32

Converts an enum of this type into its bit position.
Source§

unsafe fn enum_from_u32(val: u32) -> Self

Converts a bit position into an enum value.
Source§

impl Not for Event

Source§

type Output = EnumSet<Event>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl PartialEq<EnumSet<Event>> for Event

Source§

fn eq(&self, other: &EnumSet<Event>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for Event

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<O: Into<EnumSet<Event>>> Sub<O> for Event

Source§

type Output = EnumSet<Event>

The resulting type after applying the - operator.
Source§

fn sub(self, other: O) -> Self::Output

Performs the - operation. Read more
Source§

impl Copy for Event

Source§

impl EnumSetType for Event

Source§

impl Eq for Event

Auto Trait Implementations§

§

impl Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnwindSafe for Event

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.