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