Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
sbl::components::cv::CvConditioning Struct Reference

Conditioning constants — one code-owned home (ADR-011 D2) More...

Detailed Description

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).

Definition at line 69 of file input.hpp.

#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)
 

Member Function Documentation

◆ from()

static constexpr CvConditioning sbl::components::cv::CvConditioning::from ( const sbl::hal::adc::Electrical &  e)
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().

Member Data Documentation

◆ counts_max

float sbl::components::cv::CvConditioning::counts_max = 65535.0f

Full-scale ADC count.

Definition at line 70 of file input.hpp.

◆ midpoint

float sbl::components::cv::CvConditioning::midpoint = 32768.0f

Count at 0 V (bipolar conditioning)

Definition at line 71 of file input.hpp.

◆ inverted

bool sbl::components::cv::CvConditioning::inverted = false

Conditioning op-amp inverts (+V → lower count)

Definition at line 72 of file input.hpp.

◆ counts_per_volt

float sbl::components::cv::CvConditioning::counts_per_volt = 6553.5f

Counts per volt (16-bit over ±5 V)

Definition at line 73 of file input.hpp.


The documentation for this struct was generated from the following file: