Sound Byte Libs
0.2.0-19-g53fe051
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
src
sbl
hal
adc
types.hpp
Go to the documentation of this file.
1
/**
2
* @file types.hpp
3
* @brief ADC common types and enumerations
4
* @ingroup hal
5
*
6
* Common ADC types shared across the HAL layer.
7
* These types are used by both the HAL interface and platform implementations.
8
*/
9
10
#ifndef SBL_HAL_ADC_TYPES_HPP_
11
#define SBL_HAL_ADC_TYPES_HPP_
12
13
namespace
sbl
{
14
namespace
core {
15
namespace
hal {
16
namespace
adc {
17
18
/**
19
* @brief ADC sample time configuration
20
*
21
* Controls the sampling duration for ADC conversions.
22
* Longer sample times provide better accuracy for high-impedance sources
23
* but reduce throughput. Platform implementations map these to
24
* hardware-specific cycle counts.
25
*
26
* Typical use cases:
27
* - Fast: Low-impedance sources, high-speed scanning
28
* - Medium: General purpose, balanced accuracy/speed (default)
29
* - Slow: High-impedance sources, maximum accuracy
30
*/
31
enum class
SampleTime
{
32
Fast
,
///< Shortest sample time, highest throughput
33
Medium
,
///< Balanced sample time (recommended default)
34
Slow
///< Longest sample time, best for high-Z sources
35
};
36
37
/**
38
* @brief ADC resolution configuration
39
*
40
* Some ADC peripherals support configurable resolution.
41
* Lower resolution provides faster conversions.
42
*/
43
enum class
Resolution
{
44
Bits8
= 8,
45
Bits10
= 10,
46
Bits12
= 12,
47
Bits14
= 14,
48
Bits16
= 16
49
};
50
51
}
// namespace adc
52
}
// namespace hal
53
}
// namespace core
54
}
// namespace sbl
55
56
#endif
// SBL_HAL_ADC_TYPES_HPP_
sbl::core::hal::adc::Resolution
Resolution
ADC resolution configuration.
Definition
types.hpp:43
sbl::core::hal::adc::Resolution::Bits16
@ Bits16
sbl::core::hal::adc::Resolution::Bits12
@ Bits12
sbl::core::hal::adc::Resolution::Bits8
@ Bits8
sbl::core::hal::adc::Resolution::Bits10
@ Bits10
sbl::core::hal::adc::Resolution::Bits14
@ Bits14
sbl::core::hal::adc::SampleTime
SampleTime
ADC sample time configuration.
Definition
types.hpp:31
sbl::core::hal::adc::SampleTime::Medium
@ Medium
Balanced sample time (recommended default)
sbl::core::hal::adc::SampleTime::Fast
@ Fast
Shortest sample time, highest throughput.
sbl::core::hal::adc::SampleTime::Slow
@ Slow
Longest sample time, best for high-Z sources.
sbl
Root namespace for all Sound Byte Libs functionality.
Definition
aliases.hpp:24
Generated by
1.9.8