K74B/87400/usr/common/measureTask.h
2024-01-25 14:22:18 +08:00

40 lines
794 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);
#endif