40 lines
876 B
C
40 lines
876 B
C
#ifndef _ADC_MEASUREMENT_TASK_H
|
|
#define _ADC_MEASUREMENT_TASK_H
|
|
|
|
#include <appConfig.h>
|
|
#include <softTimerTask.h>
|
|
#include "systick_device.h"
|
|
#include <taskManager.h>
|
|
#include <adc_device.h>
|
|
#include "hwcfg.h"
|
|
|
|
#define INVALID_PARAM (0x7FFFU)
|
|
#define INVALID_VOLT (0x7FFFU)
|
|
#define INVALID_TEMP (-127)
|
|
|
|
/*
|
|
* Get battery voltage in mV
|
|
* @param [out] battVolt: 0-32678
|
|
* @return 0: get voltage success, other : failed
|
|
*/
|
|
int8_t MES_GetBatteryVolt(uint16_t *battVolt);
|
|
|
|
/*
|
|
* Get chip temperature in 1C
|
|
* @param [out] chipTemperature: -127-127C
|
|
* @return 0: get voltage success, other : failed
|
|
*/
|
|
int16_t MES_GetChipTemperature(int16_t *chipTemperature);
|
|
|
|
/*
|
|
* measurement Task handle
|
|
* @return none
|
|
*/
|
|
void MES_TaskHandler(void);
|
|
|
|
|
|
int16_t Get_vAmp(void);
|
|
uint16_t *MEAGet_vAmpbuff(void);
|
|
uint16_t MEA_GetVbat(void);
|
|
|
|
#endif |