mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-20 08:39:05 +00:00
adc: unify adc_ll_num_t and adc_unit_t
This commit is contained in:
38
components/hal/include/hal/adc_hal_common.h
Normal file
38
components/hal/include/hal/adc_hal_common.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This header file is only for hardware abstract concepts and APIs
|
||||
* used by both ADC RTC controller and Digital controller
|
||||
*/
|
||||
|
||||
/**
|
||||
* ADC work mode
|
||||
*/
|
||||
typedef enum adc_hal_work_mode_t {
|
||||
ADC_HAL_ULP_MODE,
|
||||
ADC_HAL_SINGLE_READ_MODE,
|
||||
ADC_HAL_CONTINUOUS_READ_MODE,
|
||||
ADC_HAL_PWDET_MODE
|
||||
} adc_hal_work_mode_t;
|
||||
|
||||
/**
|
||||
* Set ADC work mode
|
||||
*
|
||||
* @param unit ADC unit
|
||||
* @param work_mode see `adc_hal_work_mode_t`
|
||||
*/
|
||||
void adc_hal_set_controller(adc_unit_t unit, adc_hal_work_mode_t work_mode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user