blob: 36136d0e2752ece39528aa81e1b860632a80a177 [file] [log] [blame]
b.liud440f9f2025-04-18 10:44:31 +08001/**
2 @file
3 ql_adc.h
4
5 @brief
6 This file provides the definitions for adc, and declares the
7 API functions.
8
9*/
10/*============================================================================
11 Copyright (c) 2017 Quectel Wireless Solution, Co., Ltd. All Rights Reserved.
12 Quectel Wireless Solution Proprietary and Confidential.
13 =============================================================================*/
14/*===========================================================================
15
16 EDIT HISTORY FOR MODULE
17
18This section contains comments describing changes made to the module.
19Notice that changes are listed in reverse chronological order.
20
21
22WHEN WHO WHAT, WHERE, WHY
23---------- ------------ ----------------------------------------------------
2410/12/2021 larry Code normalization
25=============================================================================*/
26
27#ifndef _QL_ADC_H_
28#define _QL_ADC_H_
29
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35/**
36 ADC channel enum
37*/
38typedef enum ADC_CHANNEL_ENUM{
39 QADC_NONE = 0, /** Invalid channel*/
40 ADC0 = 1, /** ADC0 channel */
41 ADC1 = 2, /** ADC1 channel */
42 ADC2 = 3, /** ADC2 channel */
43 QADC_END /** Invalid channel*/
44}ADC_CHANNEL_E;
45
46/*========================================================================
47 FUNCTION: ql_adc_show
48=========================================================================*/
49/** @brief
50 This function retrieves the ADC voltage value with the specified
51 ADC channel.
52 Support input vol value:
53 ADC0 : 0V-VBAT_BB
54 ADC1 : 0V-VBAT_BB
55
56 @param[in] qadc, adc channel definitions, one value of ADC_CHANNEL_E.
57
58 @return
59 adc value(mv) on success
60 on failure, the return value is -1;
61*/
62/*=======================================================================*/
63int ql_adc_show(ADC_CHANNEL_E qadc);
64
65#ifdef __cplusplus
66}
67#endif
68
69
70#endif