Firmware
0.9.0
Toggle main menu visibility
Loading...
Searching...
No Matches
convert.hpp
Go to the documentation of this file.
1
// Copyright (C) 2025 Vincent Hamp
2
//
3
// This program is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, either version 3 of the License, or
6
// (at your option) any later version.
7
//
8
// This program is distributed in the hope that it will be useful,
9
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
// GNU General Public License for more details.
12
//
13
// You should have received a copy of the GNU General Public License
14
// along with this program. If not, see <https://www.gnu.org/licenses/>.
15
21
22
#pragma once
23
24
#include <esp_adc/adc_cali.h>
25
26
namespace
drv::anlg
{
27
28
VccVoltage
measurement2mV
(
VccVoltageMeasurement
meas);
29
VccVoltageMeasurement
mV2measurement
(
VccVoltage
mV);
30
SupplyVoltage
measurement2mV
(
SupplyVoltageMeasurement
meas);
31
SupplyVoltageMeasurement
mV2measurement
(
SupplyVoltage
mV);
32
Current
measurement2mA
(
CurrentMeasurement
meas);
33
CurrentMeasurement
mA2measurement
(
Current
mA);
34
35
inline
adc_cali_handle_t
cali_handle
{};
36
37
}
// namespace drv::anlg
drv::anlg
Definition
config.hpp:189
drv::anlg::cali_handle
adc_cali_handle_t cali_handle
Definition
convert.hpp:35
drv::anlg::mV2measurement
VccVoltageMeasurement mV2measurement(VccVoltage mV)
Convert VccVoltage to VccVoltageMeasurement.
Definition
convert.cpp:71
drv::anlg::Current
ztl::implicit_wrapper< CurrentMeasurement::value_type, struct CurrentTag > Current
Definition
config.hpp:278
drv::anlg::VccVoltageMeasurement
ztl::implicit_wrapper< ztl::smallest_signed_t< 0, max_measurement >, struct VccVoltageMeasurementTag > VccVoltageMeasurement
Definition
config.hpp:254
drv::anlg::measurement2mA
Current measurement2mA(CurrentMeasurement meas)
Convert CurrentMeasurement to Current.
Definition
convert.cpp:97
drv::anlg::mA2measurement
CurrentMeasurement mA2measurement(Current mA)
Convert Current to CurrentMeasurement.
Definition
convert.cpp:105
drv::anlg::CurrentMeasurement
ztl::implicit_wrapper< ztl::smallest_signed_t< 0, max_measurement >, struct CurrentMeasurementTag > CurrentMeasurement
Definition
config.hpp:273
drv::anlg::VccVoltage
ztl::implicit_wrapper< VccVoltageMeasurement::value_type, struct VccVoltageTag > VccVoltage
Definition
config.hpp:259
drv::anlg::measurement2mV
VccVoltage measurement2mV(VccVoltageMeasurement meas)
Convert VccVoltageMeasurement to VccVoltage.
Definition
convert.cpp:63
drv::anlg::SupplyVoltageMeasurement
ztl::implicit_wrapper< ztl::smallest_signed_t< 0, max_measurement >, struct SupplyVoltageMeasurementTag > SupplyVoltageMeasurement
Definition
config.hpp:263
drv::anlg::SupplyVoltage
ztl::implicit_wrapper< SupplyVoltageMeasurement::value_type, struct SupplyVoltageTag > SupplyVoltage
Definition
config.hpp:268
src
drv
anlg
convert.hpp
Firmware 0.9.0