|
Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Conditioning constants — one code-owned home (ADR-011 D2) More...
Conditioning constants — one code-owned home (ADR-011 D2)
Describes the analog front end between the jack and the ADC. Defaults describe a plain 16-bit unipolar input; use a named preset (or set your own values once at init) when your hardware differs. This replaces the scattered app-side magic numbers that drifted apart (RPT-026).
#include <input.hpp>
Static Public Member Functions | |
| static constexpr CvConditioning | from (const sbl::hal::adc::Electrical &e) |
Public Attributes | |
| float | counts_max = 65535.0f |
| Full-scale ADC count. | |
| float | midpoint = 32768.0f |
| Count at 0 V (bipolar conditioning) | |
| bool | inverted = false |
| Conditioning op-amp inverts (+V → lower count) | |
| float | counts_per_volt = 6553.5f |
| Counts per volt (16-bit over ±5 V) | |
|
inlinestaticconstexpr |
Derive from a port's electrical description (generated by sloth into sbl::hw::electrical from the hardware manifest — the one owner of these facts).
Definition at line 77 of file input.hpp.
References sbl::hal::adc::Electrical::counts_max(), sbl::hal::adc::Electrical::counts_per_volt(), sbl::hal::adc::Electrical::inverted, and sbl::hal::adc::Electrical::midpoint().
| float sbl::components::cv::CvConditioning::counts_max = 65535.0f |
| float sbl::components::cv::CvConditioning::midpoint = 32768.0f |
| bool sbl::components::cv::CvConditioning::inverted = false |
| float sbl::components::cv::CvConditioning::counts_per_volt = 6553.5f |