|
Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Definition at line 25 of file electrical.hpp.
#include <electrical.hpp>
Public Member Functions | |
| constexpr float | counts_max () const |
| constexpr float | counts_per_volt () const |
| constexpr uint16_t | encode (float volts) const |
| Code for a voltage at the jack, clamped to the converter's rails. | |
| constexpr float | decode (uint16_t counts) const |
| Voltage at the jack for a code. | |
| constexpr uint16_t | midpoint () const |
| Code that reads as 0 V — the bipolar midpoint. Clamps if 0 V is out of range. | |
Public Attributes | |
| float | lo_v |
| Voltage at code 0 (or at full scale, if inverted) | |
| float | hi_v |
| Voltage at full scale (or at code 0, if inverted) | |
| uint8_t | bits |
| Converter resolution. | |
| bool | inverted |
| +V at the jack reads as a lower code | |
|
inlineconstexpr |
Definition at line 31 of file electrical.hpp.
References bits.
Referenced by counts_per_volt(), decode(), encode(), and sbl::components::cv::CvConditioning::from().
|
inlineconstexpr |
Definition at line 35 of file electrical.hpp.
References counts_max(), hi_v, and lo_v.
Referenced by sbl::components::cv::CvConditioning::from().
|
inlineconstexpr |
Code for a voltage at the jack, clamped to the converter's rails.
Definition at line 40 of file electrical.hpp.
References counts_max(), hi_v, inverted, and lo_v.
Referenced by midpoint().
|
inlineconstexpr |
Voltage at the jack for a code.
Definition at line 49 of file electrical.hpp.
References counts_max(), hi_v, inverted, and lo_v.
|
inlineconstexpr |
Code that reads as 0 V — the bipolar midpoint. Clamps if 0 V is out of range.
Definition at line 56 of file electrical.hpp.
References encode().
Referenced by sbl::components::cv::CvConditioning::from().
| float sbl::hal::adc::Electrical::lo_v |
Voltage at code 0 (or at full scale, if inverted)
Definition at line 26 of file electrical.hpp.
Referenced by counts_per_volt(), decode(), and encode().
| float sbl::hal::adc::Electrical::hi_v |
Voltage at full scale (or at code 0, if inverted)
Definition at line 27 of file electrical.hpp.
Referenced by counts_per_volt(), decode(), and encode().
| uint8_t sbl::hal::adc::Electrical::bits |
| bool sbl::hal::adc::Electrical::inverted |
+V at the jack reads as a lower code
Definition at line 29 of file electrical.hpp.
Referenced by decode(), encode(), and sbl::components::cv::CvConditioning::from().