51 lines
1.2 KiB
C
51 lines
1.2 KiB
C
/*============================================================================
|
|
Copyright (c) 2022 Quectel Wireless Solution, Co., Ltd. All Rights Reserved.
|
|
Quectel Wireless Solution Proprietary and Confidential.
|
|
=============================================================================*/
|
|
|
|
|
|
#ifndef _QL_ADC_H
|
|
#define _QL_ADC_H
|
|
#include "quec_adc.h"
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
/******************************************************************
|
|
* Functions
|
|
******************************************************************/
|
|
int ql_adc_init(void);
|
|
|
|
int ql_adc_read(unsigned char adc_channel, unsigned short *p_batvol);
|
|
|
|
int ql_get_cur_source_vol(void);//read adc1 Voltage
|
|
|
|
void ql_adc_onff(unsigned char status);
|
|
|
|
int ql_adc_read_raw_value(unsigned char adc_channel, unsigned short *p_batvol);
|
|
|
|
/*****************************************************************
|
|
* Function: ql_get_temperature_celsius_value
|
|
*
|
|
* Description:
|
|
* gain temperature Celsius Value
|
|
*
|
|
* Parameters:
|
|
* void
|
|
*
|
|
* Return:
|
|
* temperature Celsius Value
|
|
*
|
|
*
|
|
*****************************************************************/
|
|
int ql_get_temperature_celsius_value(void);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
} /*"C" */
|
|
#endif
|
|
|
|
#endif
|
|
|