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
handle.hpp
Go to the documentation of this file.
1/**
2 * @file handle.hpp
3 * @brief ADC handle type for hardware abstraction
4 * @ingroup hal
5 *
6 * Canonical definition of AdcHandle - the primary way to reference
7 * ADC channels in SBL. Used by drivers, generated hardware configs, and
8 * user code.
9 */
10
11#ifndef SBL_HW_HAL_ADC_HANDLE_HPP_
12#define SBL_HW_HAL_ADC_HANDLE_HPP_
13
14#include <cstdint>
15
16namespace sbl {
17
18/**
19 * @brief ADC channel handle
20 *
21 * Represents an ADC input as resolved from hardware manifests.
22 * Used to pass channel configuration to driver functions.
23 *
24 * Example: ADC1 channel 17 is AdcHandle{1, 17}.
25 */
26struct AdcHandle {
27 uint32_t adc; /**< ADC peripheral number (1-indexed on STM32) */
28 uint32_t channel; /**< Channel within the ADC peripheral */
29};
30
31} // namespace sbl
32
33#endif // SBL_HW_HAL_ADC_HANDLE_HPP_
Root namespace for all Sound Byte Libs code.
ADC channel handle.
Definition handle.hpp:26
uint32_t channel
Definition handle.hpp:28
uint32_t adc
Definition handle.hpp:27