#include <AdcMock.hpp>
◆ AdcMock()
zct::AdcMock::AdcMock |
( |
const char * |
name | ) |
|
◆ ~AdcMock()
zct::AdcMock::~AdcMock |
( |
| ) |
|
◆ mockSetMv()
void zct::AdcMock::mockSetMv |
( |
int32_t |
mv | ) |
|
Mock the analogue input voltage to the ADC. Calls to readMv() after this call will return this value.
- Parameters
-
mv | The mock ADC reading in mV. |
◆ readMv()
int32_t zct::AdcMock::readMv |
( |
| ) |
|
|
overridevirtual |
Perform a single ADC conversion on the channel and return the result in mV.
- Returns
- The result of the ADC conversion in mV.
Implements zct::IAdc.
◆ m_mockMv
int32_t zct::AdcMock::m_mockMv = 0 |
|
protected |
The documentation for this class was generated from the following files:
- /home/runner/work/ZephyrCppToolkit/ZephyrCppToolkit/include/ZephyrCppToolkit/Peripherals/AdcMock.hpp
- /home/runner/work/ZephyrCppToolkit/ZephyrCppToolkit/src/Peripherals/AdcMock.cpp