Firmware  0.8.0
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
26namespace drv::anlg {
27
34
35inline adc_cali_handle_t cali_handle{};
36
37} // namespace drv::anlg
Definition config.hpp:187
adc_cali_handle_t cali_handle
Definition convert.hpp:35
VccVoltageMeasurement mV2measurement(VccVoltage mV)
Convert VccVoltage to VccVoltageMeasurement.
Definition convert.cpp:71
ztl::implicit_wrapper< CurrentMeasurement::value_type, struct CurrentTag > Current
Definition config.hpp:276
ztl::implicit_wrapper< ztl::smallest_signed_t< 0, max_measurement >, struct VccVoltageMeasurementTag > VccVoltageMeasurement
Definition config.hpp:252
Current measurement2mA(CurrentMeasurement meas)
Convert CurrentMeasurement to Current.
Definition convert.cpp:97
CurrentMeasurement mA2measurement(Current mA)
Convert Current to CurrentMeasurement.
Definition convert.cpp:105
ztl::implicit_wrapper< ztl::smallest_signed_t< 0, max_measurement >, struct CurrentMeasurementTag > CurrentMeasurement
Definition config.hpp:271
ztl::implicit_wrapper< VccVoltageMeasurement::value_type, struct VccVoltageTag > VccVoltage
Definition config.hpp:257
VccVoltage measurement2mV(VccVoltageMeasurement meas)
Convert VccVoltageMeasurement to VccVoltage.
Definition convert.cpp:63
ztl::implicit_wrapper< ztl::smallest_signed_t< 0, max_measurement >, struct SupplyVoltageMeasurementTag > SupplyVoltageMeasurement
Definition config.hpp:261
ztl::implicit_wrapper< SupplyVoltageMeasurement::value_type, struct SupplyVoltageTag > SupplyVoltage
Definition config.hpp:266