Sound Byte Libs 0.5.1-340-gab5b79a
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_HW_HAL_ADC_TYPES_HPP_
11#define SBL_HW_HAL_ADC_TYPES_HPP_
12
13#include <cstdint>
14
15namespace sbl {
16namespace hal {
17namespace adc {
18
19/**
20 * @brief ADC sample time configuration
21 *
22 * Controls the sampling duration for ADC conversions.
23 * Longer sample times provide better accuracy for high-impedance sources
24 * but reduce throughput. Platform implementations map these to
25 * hardware-specific cycle counts.
26 *
27 * Typical use cases:
28 * - Fast: Low-impedance sources, high-speed scanning
29 * - Medium: General purpose, balanced accuracy/speed (default)
30 * - Slow: High-impedance sources, maximum accuracy
31 */
32enum class SampleTime : uint8_t {
33 Fast, /**< Shortest sample time, highest throughput */
34 Medium, /**< Balanced sample time (recommended default) */
35 Slow /**< Longest sample time, best for high-Z sources */
36};
37
38/**
39 * @brief ADC resolution configuration
40 *
41 * Some ADC peripherals support configurable resolution.
42 * Lower resolution provides faster conversions.
43 */
44enum class Resolution : uint8_t { Bits8 = 8, Bits10 = 10, Bits12 = 12, Bits14 = 14, Bits16 = 16 };
45
46} // namespace adc
47} // namespace hal
48} // namespace sbl
49
50#endif // SBL_HW_HAL_ADC_TYPES_HPP_
SampleTime
ADC sample time configuration.
Definition types.hpp:32
Resolution
ADC resolution configuration.
Definition types.hpp:44
Root namespace for all Sound Byte Libs code.