Skip to main content

AdcChannel

Trait AdcChannel 

Source
pub trait AdcChannel: 'static {
    type AdcUnit: AdcUnit;

    // Required method
    fn channel() -> adc_channel_t;

    // Provided method
    fn unit() -> adc_unit_t { ... }
}
Expand description

A trait designating the ADC channel

An associated type provided by ADC pins

Required Associated Types§

Source

type AdcUnit: AdcUnit

The ADC unit this channel is associated with.

Required Methods§

Source

fn channel() -> adc_channel_t

Return the ESP-IDF ADC channel identifier.

Provided Methods§

Source

fn unit() -> adc_unit_t

Return the ESP-IDF ADC unit identifier.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§