libxr  1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
LibXR::DAC Class Referenceabstract

数字模拟转换器(DAC)基类 More...

#include <dac.hpp>

Public Member Functions

 DAC ()=default
 默认构造函数
 
virtual ErrorCode Write (float voltage)=0
 输出 DAC 电压
 

Detailed Description

数字模拟转换器(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.

Definition at line 17 of file dac.hpp.

Constructor & Destructor Documentation

◆ DAC()

LibXR::DAC::DAC ( )
default

默认构造函数

Default constructor

Member Function Documentation

◆ Write()

virtual ErrorCode LibXR::DAC::Write ( float voltage)
pure virtual

输出 DAC 电压

Outputs the DAC voltage

Parameters
voltage需要输出的模拟电压值
voltageThe analog voltage value to be output
Returns
错误码 ErrorCode

该方法为纯虚函数,子类必须实现此方法以提供具体的 DAC 输出功能。 This is a pure virtual function. Subclasses must implement this method to provide specific DAC output functionality.


The documentation for this class was generated from the following file: