| /** |
| @file |
| ql_adc.h |
| |
| @brief |
| This file provides the definitions for adc, and declares the |
| API functions. |
| |
| */ |
| /*============================================================================ |
| Copyright (c) 2017 Quectel Wireless Solution, Co., Ltd. All Rights Reserved. |
| Quectel Wireless Solution Proprietary and Confidential. |
| =============================================================================*/ |
| /*=========================================================================== |
| |
| EDIT HISTORY FOR MODULE |
| |
| This section contains comments describing changes made to the module. |
| Notice that changes are listed in reverse chronological order. |
| |
| |
| WHEN WHO WHAT, WHERE, WHY |
| ---------- ------------ ---------------------------------------------------- |
| 10/12/2021 larry Code normalization |
| =============================================================================*/ |
| |
| #ifndef _QL_ADC_H_ |
| #define _QL_ADC_H_ |
| |
| |
| #ifdef __cplusplus |
| extern "C" { |
| #endif |
| |
| /** |
| ADC channel enum |
| */ |
| typedef enum ADC_CHANNEL_ENUM{ |
| QADC_NONE = 0, /** Invalid channel*/ |
| ADC0 = 1, /** ADC0 channel */ |
| ADC1 = 2, /** ADC1 channel */ |
| ADC2 = 3, /** ADC2 channel */ |
| QADC_END /** Invalid channel*/ |
| }ADC_CHANNEL_E; |
| |
| /*======================================================================== |
| FUNCTION: ql_adc_show |
| =========================================================================*/ |
| /** @brief |
| This function retrieves the ADC voltage value with the specified |
| ADC channel. |
| Support input vol value: |
| ADC0 : 0V-VBAT_BB |
| ADC1 : 0V-VBAT_BB |
| |
| @param[in] qadc, adc channel definitions, one value of ADC_CHANNEL_E. |
| |
| @return |
| adc value(mv) on success |
| on failure, the return value is -1; |
| */ |
| /*=======================================================================*/ |
| int ql_adc_show(ADC_CHANNEL_E qadc); |
| |
| #ifdef __cplusplus |
| } |
| #endif |
| |
| |
| #endif |