mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-10-02 06:40:32 +00:00
Merge pull request #4665 from dimpolo/format_adc_averaging
derive Debug and Format for Averaging
This commit is contained in:
commit
34370cc7df
@ -83,7 +83,8 @@ pub enum DacChannel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Number of samples used for averaging.
|
/// Number of samples used for averaging.
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
pub enum Averaging {
|
pub enum Averaging {
|
||||||
Disabled,
|
Disabled,
|
||||||
Samples2,
|
Samples2,
|
||||||
|
@ -138,7 +138,8 @@ impl<'a> defmt::Format for Prescaler {
|
|||||||
/// Number of samples used for averaging.
|
/// Number of samples used for averaging.
|
||||||
/// TODO: Implement hardware averaging setting.
|
/// TODO: Implement hardware averaging setting.
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
pub enum Averaging {
|
pub enum Averaging {
|
||||||
Disabled,
|
Disabled,
|
||||||
Samples2,
|
Samples2,
|
||||||
|
@ -96,6 +96,8 @@ cfg_if! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Number of samples used for averaging.
|
/// Number of samples used for averaging.
|
||||||
|
#[derive(Copy, Clone, Debug)]
|
||||||
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
pub enum Averaging {
|
pub enum Averaging {
|
||||||
Disabled,
|
Disabled,
|
||||||
Samples2,
|
Samples2,
|
||||||
|
@ -142,7 +142,8 @@ impl Prescaler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Number of samples used for averaging.
|
/// Number of samples used for averaging.
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
|
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||||
pub enum Averaging {
|
pub enum Averaging {
|
||||||
Disabled,
|
Disabled,
|
||||||
Samples2,
|
Samples2,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user