mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat(adc): support ADC calibration on ESP32C61
This commit is contained in:
@@ -4,10 +4,6 @@ components/esp_adc/test_apps/adc:
|
||||
disable:
|
||||
- if: SOC_ADC_SUPPORTED != 1
|
||||
- if: CONFIG_NAME == "gdma_iram_safe" and IDF_TARGET in ["esp32", "esp32s2", "esp32c2"]
|
||||
disable_test:
|
||||
- if: IDF_TARGET == "esp32c61"
|
||||
temporary: true
|
||||
reason: not runners for ESP32C61 ADC
|
||||
depends_components:
|
||||
- esp_adc
|
||||
- esp_driver_gpio
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
static const char *TAG = "adc_tsens";
|
||||
|
||||
#define EXAMPLE_ADC1_CHAN0 ADC_CHANNEL_2
|
||||
#define EXAMPLE_ADC1_CHAN1 ADC_CHANNEL_4
|
||||
#define EXAMPLE_ADC1_CHAN1 ADC_CHANNEL_3
|
||||
#define EXAMPLE_ADC_ATTEN ADC_ATTEN_DB_12
|
||||
|
||||
static int adc_raw[2][10];
|
||||
|
||||
@@ -104,10 +104,10 @@ extern "C" {
|
||||
#define ADC_TEST_HIGH_THRESH 200
|
||||
|
||||
#elif CONFIG_IDF_TARGET_ESP32C61
|
||||
#define ADC_TEST_LOW_VAL 2140
|
||||
#define ADC_TEST_LOW_VAL 0
|
||||
#define ADC_TEST_LOW_THRESH 200
|
||||
|
||||
#define ADC_TEST_HIGH_VAL 4095
|
||||
#define ADC_TEST_HIGH_VAL 3329
|
||||
#define ADC_TEST_HIGH_VAL_DMA 4095
|
||||
#define ADC_TEST_HIGH_THRESH 200
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ from pytest_embedded_idf.utils import idf_parametrize
|
||||
@pytest.mark.parametrize('config', ['iram_safe', 'release', 'pm_enable'], indirect=True)
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32c5', 'esp32p4'],
|
||||
['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c6', 'esp32h2', 'esp32c5', 'esp32p4', 'esp32c61'],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_adc(dut: Dut) -> None:
|
||||
|
||||
Reference in New Issue
Block a user