Sound Byte Libs 1ee2ca6
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
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
13namespace sbl {
14namespace core {
15namespace hal {
16namespace 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 */
31enum 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 */
43enum 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_
Resolution
ADC resolution configuration.
Definition types.hpp:43
SampleTime
ADC sample time configuration.
Definition types.hpp:31
@ Medium
Balanced sample time (recommended default)
@ Fast
Shortest sample time, highest throughput.
@ Slow
Longest sample time, best for high-Z sources.
Root namespace for all Sound Byte Libs functionality.
Definition aliases.hpp:24