mppt/App/inc/task.h

121 lines
4.4 KiB
C
Raw Normal View History

2024-07-11 06:58:55 +00:00
/*
* task.h
*
* Created on: 2024<EFBFBD><EFBFBD>6<EFBFBD><EFBFBD>24<EFBFBD><EFBFBD>
* Author: psx
*/
#ifndef APP_INC_TASK_H_
#define APP_INC_TASK_H_
#include "timeSliceOffset.h"
#include "uart_dev.h"
2024-08-29 09:24:57 +00:00
#include "math.h"
2024-08-29 02:50:22 +00:00
void Init();
2024-08-29 02:50:22 +00:00
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָʾ<D6B8>ƺ<EFBFBD>ι<EFBFBD><CEB9> */
#define WdiRunled_reloadVal 1000 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
#define WdiRunled_offset 100 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
#define wdi_RESET (60 * 60 * 24) /* һ<>츴λһ<CEBB><D2BB> */
extern STR_TimeSliceOffset m_WdiRunled;
extern void Task_WdiRunled(void);
2024-07-11 06:58:55 +00:00
/* ˢ<>¼Ĵ<C2BC><C4B4><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD> */
#define refreshRegister_reloadVal 1000 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
#define refreshRegister_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
extern STR_TimeSliceOffset m_refreshRegister;
extern void Task_refreshRegister(void);
2024-08-29 02:50:22 +00:00
/* <20><>·<EFBFBD><EFBFBD><E8BFB9><EFBFBD><EFBFBD> */
#define impedanceCalculation_reloadVal 200 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
#define impedanceCalculation_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
extern STR_TimeSliceOffset g_impedanceCalculation;
extern void Task_impedanceCalculation(void);
/* <20><>·<EFBFBD><C2B7><EFBFBD><EFBFBD> */
#define outputAgain_reloadVal 1000 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
#define outputAgain_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
extern STR_TimeSliceOffset g_outputAgain;
extern void Task_outputAgain(void);
/* <20><><EFBFBD>ر<EFBFBD><D8B1><EFBFBD> */
#define excessiveLoad_reloadVal 1000 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
#define excessiveLoad_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
extern STR_TimeSliceOffset g_excessiveLoad;
extern void Task_excessiveLoad(void);
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
#define softStart_reloadVal 10 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
#define softStart_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
extern STR_TimeSliceOffset m_softStart;
extern void Task_softStart(void);
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
#define startMpptControl_reloadVal 1000 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
2024-10-26 01:07:30 +00:00
#define startMpptControl_offset 200 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
extern STR_TimeSliceOffset g_startMpptControl;
extern void Task_startMpptControl(void);
/* <20><><EFBFBD>ݼĴ<DDBC><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һЩ<D2BB>ж<EFBFBD> */
#define dataJudgment_reloadVal 1000 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
2024-10-26 01:07:30 +00:00
#define dataJudgment_offset 500 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
extern STR_TimeSliceOffset g_dataJudgment;
extern void Task_dataJudgment(void);
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݽ<EFBFBD><DDBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD> */
2024-10-26 01:07:30 +00:00
#define usartJudge_reloadVal 100 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
#define usartJudge_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
extern STR_TimeSliceOffset m_usartJudge;
extern void Task_usartJudge(void);
#define usartHandle_reloadVal 20 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
#define usartHandle_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
extern STR_TimeSliceOffset m_usartHandle;
extern void Task_usartHandle(void);
typedef void (*uartJudgeHandle)(device_handle device);
extern uartJudgeHandle uart_judge_handle;
/* <20><EFBFBD><E3B2A5>Ӧ */
#define recvbroadcast_reloadVal 3000 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
#define recvbroadcast_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
extern uint8_t recvbroadcast_flag; /* <20>Ƿ<EFBFBD><C7B7><EFBFBD>Ҫ<EFBFBD>ٴη<D9B4><CEB7>ͱ<EFBFBD>־ */
extern device_handle g_recvBroadcastDevice; /* <20><><EFBFBD>ھ<EFBFBD><DABE><EFBFBD> */
extern STR_TimeSliceOffset g_recvbroadcast;
extern void Task_recvbroadcast(void);
/* <20>ٴ<EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD>ʱ */
#define sensorEnableBroadcast_reloadVal 1000 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
#define sensorEnableBroadcast_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
extern STR_TimeSliceOffset g_sensorEnableBroadcast;
extern void Task_sensorEnableBroadcast(void);
2024-07-11 06:58:55 +00:00
2024-10-26 01:07:30 +00:00
/* <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>ȡ */
#define uartConfigFile_reloadVal 200 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
#define uartConfigFile_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
extern STR_TimeSliceOffset m_uartConfigFile;
extern void Task_uartConfigFile(void);
///* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ */
//#define overloadDelay_reloadVal 10 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
//#define overloadDelay_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
//extern STR_TimeSliceOffset g_overloadDelay;
//extern void Task_overloadDelay(void);
/* <20><>·<EFBFBD><C2B7>ѹ<EFBFBD>ɼ<EFBFBD> */
#define collectOpenCircuitVoltage_reloadVal 1000 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
#define collectOpenCircuitVoltage_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
extern STR_TimeSliceOffset g_collectOpenCircuitVoltage;
2024-11-13 08:44:13 +00:00
extern uint8_t g_collectOpenCircuitVoltageFlag;
extern void Task_collectOpenCircuitVoltage(void);
/* HY<48><59><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ<C4A3>ӳٺ<D3B3><D9BA>˳<EFBFBD> */
#define configurationModeDelayedExit_reloadVal 1000 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
#define configurationModeDelayedExit_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
extern STR_TimeSliceOffset g_configurationModeDelayedExit;
extern void Task_configurationModeDelayedExit(void);
2024-07-11 06:58:55 +00:00
#endif /* APP_INC_TASK_H_ */