adc: unify adc_ll_num_t and adc_unit_t

This commit is contained in:
Armando
2022-03-08 19:26:04 +08:00
parent aab535fe4a
commit 386363cafd
39 changed files with 828 additions and 917 deletions

View 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