libxr
1.0
Want to be the best embedded framework
|
Public Member Functions | |
ESP32ADC (adc_unit_t unit, adc_channel_t channel, adc_atten_t attenuation=ADC_ATTEN_DB_12, adc_bitwidth_t bitwidth=static_cast< adc_bitwidth_t >(SOC_ADC_DIGI_MIN_BITWIDTH), float reference_voltage=3.3f) | |
float | Read () override |
读取 ADC 值 | |
![]() | |
ADC ()=default | |
默认构造函数 | |
Private Member Functions | |
float | Normalize (int raw) const |
Private Attributes | |
adc_unit_t | m_unit_ |
adc_channel_t | m_channel_ |
adc_atten_t | m_attenuation_ |
adc_bitwidth_t | m_bitwidth_ |
float | m_reference_voltage_ |
uint16_t | m_max_raw_ |
adc_oneshot_unit_handle_t | m_oneshot_ = nullptr |
Definition at line 10 of file esp_adc.hpp.
|
inlineexplicit |
Definition at line 13 of file esp_adc.hpp.
|
inline |
Definition at line 37 of file esp_adc.hpp.
|
inlineprivate |
Definition at line 56 of file esp_adc.hpp.
|
inlineoverridevirtual |
读取 ADC 值
Reads the ADC value
该方法为纯虚函数,子类必须实现此方法以提供具体的 ADC 读取功能。 This is a pure virtual function. Subclasses must implement this method to provide specific ADC reading functionality.
Implements LibXR::ADC.
Definition at line 45 of file esp_adc.hpp.
|
private |
Definition at line 64 of file esp_adc.hpp.
|
private |
Definition at line 65 of file esp_adc.hpp.
|
private |
Definition at line 63 of file esp_adc.hpp.
|
private |
Definition at line 67 of file esp_adc.hpp.
|
private |
Definition at line 68 of file esp_adc.hpp.
|
private |
Definition at line 66 of file esp_adc.hpp.
|
private |
Definition at line 62 of file esp_adc.hpp.