|
Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Conditioning constants for the analog front end. More...
Conditioning constants for the analog front end.
Describes the analog front end between the jack and the ADC. The defaults describe a plain 16-bit unipolar input. from() derives the constants from a port's electrical description; other hardware sets its own values once at init.
Definition at line 67 of file cv_input.hpp.
#include <cv_input.hpp>
Static Public Member Functions | |
| static constexpr CvConditioning | from (const sbl::hal::adc::Electrical &e) |
| Derive the constants from a port's electrical description. | |
Public Attributes | |
| float | counts_max = 65535.0f |
| float | midpoint = 32768.0f |
| bool | inverted = false |
| float | counts_per_volt = 6553.5f |
|
inlinestaticconstexpr |
Derive the constants from a port's electrical description.
The description is generated by sloth into sbl::hw::electrical from the hardware manifest.
| e | The port's electrical description |
Definition at line 82 of file cv_input.hpp.
References sbl::hal::adc::Electrical::inverted, and sbl::hal::adc::Electrical::midpoint().
Referenced by sbl::control::input::CvInput::set_electrical().
| float sbl::control::input::CvConditioning::counts_max = 65535.0f |
Full-scale ADC count
Definition at line 68 of file cv_input.hpp.
| float sbl::control::input::CvConditioning::midpoint = 32768.0f |
Count at 0 V (bipolar conditioning)
Definition at line 69 of file cv_input.hpp.
| bool sbl::control::input::CvConditioning::inverted = false |
Conditioning op-amp inverts (+V -> lower count)
Definition at line 70 of file cv_input.hpp.
| float sbl::control::input::CvConditioning::counts_per_volt = 6553.5f |
Counts per volt (16-bit over +/-5 V)
Definition at line 71 of file cv_input.hpp.