|
libxr
1.0
Want to be the best embedded framework
|
数字模拟转换器(DAC)基类 More...
#include <dac.hpp>
Public Member Functions | |
| DAC ()=default | |
| 默认构造函数 | |
| virtual ErrorCode | Write (float voltage)=0 |
| 输出 DAC 电压 | |
数字模拟转换器(DAC)基类
Abstract base class for Digital-to-Analog Converter (DAC)
该类定义了 DAC 设备的基本接口,所有 DAC 设备应继承此类并实现 Write 方法。 This class defines the basic interface for a DAC device. All DAC devices should inherit from this class and implement the Write method.
|
default |
默认构造函数
Default constructor
|
pure virtual |
输出 DAC 电压
Outputs the DAC voltage
| voltage | 需要输出的模拟电压值 |
| voltage | The analog voltage value to be output |
该方法为纯虚函数,子类必须实现此方法以提供具体的 DAC 输出功能。 This is a pure virtual function. Subclasses must implement this method to provide specific DAC output functionality.
Implemented in LibXR::ESP32DAC.