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
|
|
|
|
|
2024-10-14 07:22:50 +00:00
|
|
|
|
|
|
|
|
|
|
2024-09-21 03:00:09 +00:00
|
|
|
|
//extern uint8_t g_interruptNum;
|
2024-08-29 02:50:22 +00:00
|
|
|
|
void stop_mpptWork(void);
|
|
|
|
|
void start_mpptWork(void);
|
|
|
|
|
|
2024-07-11 06:58:55 +00:00
|
|
|
|
#define runled_reloadVal 1000 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
|
|
|
|
|
#define runled_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
|
|
|
|
|
extern STR_TimeSliceOffset m_runled;
|
2024-08-29 09:24:57 +00:00
|
|
|
|
extern void Task_RunLED(void);
|
2024-07-11 06:58:55 +00:00
|
|
|
|
|
2024-08-29 02:50:22 +00:00
|
|
|
|
#define startMpptControl_reloadVal 1000 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
|
|
|
|
|
#define startMpptControl_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
|
|
|
|
|
extern STR_TimeSliceOffset m_startMpptControl;;
|
2024-08-29 09:24:57 +00:00
|
|
|
|
extern void Task_startMpptControl(void);
|
2024-08-29 02:50:22 +00:00
|
|
|
|
|
2024-09-21 03:00:09 +00:00
|
|
|
|
#define softStart_reloadVal 30 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
|
2024-08-29 02:50:22 +00:00
|
|
|
|
#define softStart_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
|
|
|
|
|
extern STR_TimeSliceOffset m_softStart;
|
|
|
|
|
extern void Task_softStart(void);
|
2024-07-11 06:58:55 +00:00
|
|
|
|
|
|
|
|
|
#define usart_reloadVal 100 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
|
2024-07-24 08:57:38 +00:00
|
|
|
|
#define usart_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
|
2024-07-11 06:58:55 +00:00
|
|
|
|
extern STR_TimeSliceOffset m_usart;
|
2024-07-24 08:57:38 +00:00
|
|
|
|
extern uint8_t RegistrationRequestFlag; /* <20><><EFBFBD>յ<EFBFBD><D5B5>㲥֡<E3B2A5><D6A1>־λ */
|
2024-07-11 06:58:55 +00:00
|
|
|
|
void Task_usart(void);
|
|
|
|
|
|
|
|
|
|
#define wdi_reloadVal 1000 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
|
|
|
|
|
#define wdi_offset 30 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
|
|
|
|
|
#define wdi_RESET (60 * 60 * 24) /* һ<>츴λһ<CEBB><D2BB> */
|
|
|
|
|
extern STR_TimeSliceOffset m_wdi;
|
2024-08-29 09:24:57 +00:00
|
|
|
|
extern void Task_wdi(void);
|
2024-07-11 06:58:55 +00:00
|
|
|
|
|
2024-08-05 02:35:10 +00:00
|
|
|
|
#define refreshRegister_reloadVal 1000 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
|
2024-09-20 07:04:41 +00:00
|
|
|
|
#define refreshRegister_offset 100 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
|
2024-07-24 08:57:38 +00:00
|
|
|
|
extern STR_TimeSliceOffset m_refreshRegister;
|
2024-08-29 02:50:22 +00:00
|
|
|
|
extern uint8_t overTemperature;
|
2024-08-29 09:24:57 +00:00
|
|
|
|
extern void Task_refreshRegister(void);
|
2024-07-24 08:57:38 +00:00
|
|
|
|
|
|
|
|
|
#define recvbroadcast_reloadVal 3000 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
|
2024-07-11 06:58:55 +00:00
|
|
|
|
#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 uint8_t g_recvBroadcastRegisterNumber; /* <20>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
extern STR_TimeSliceOffset m_recvbroadcast;
|
2024-08-29 09:24:57 +00:00
|
|
|
|
extern void Task_recvbroadcast(void);
|
|
|
|
|
|
2024-09-21 03:00:09 +00:00
|
|
|
|
#define impedanceCalculation_reloadVal 200 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
|
2024-08-29 09:24:57 +00:00
|
|
|
|
#define impedanceCalculation_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
|
|
|
|
|
extern float_t g_impedance;
|
2024-09-21 03:00:09 +00:00
|
|
|
|
extern uint8_t g_batteryState;
|
2024-09-28 08:07:51 +00:00
|
|
|
|
extern uint8_t g_impedanceStart;
|
2024-08-29 09:24:57 +00:00
|
|
|
|
extern STR_TimeSliceOffset m_impedanceCalculation;
|
|
|
|
|
extern void Task_impedanceCalculation(void);
|
2024-07-11 06:58:55 +00:00
|
|
|
|
|
2024-09-24 09:44:41 +00:00
|
|
|
|
#define outputAgain_reloadVal 1000 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD>м<EFBFBD><D0BC><EFBFBD> */
|
2024-08-29 09:24:57 +00:00
|
|
|
|
#define outputAgain_offset 0 /* <20><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD> */
|
2024-08-29 02:50:22 +00:00
|
|
|
|
extern uint8_t outputAgainFlag;
|
|
|
|
|
extern STR_TimeSliceOffset m_outputAgain;
|
2024-08-29 09:24:57 +00:00
|
|
|
|
extern void Task_outputAgain(void);
|
2024-08-29 02:50:22 +00:00
|
|
|
|
|
2024-09-28 08:07:51 +00:00
|
|
|
|
#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 uint8_t excessiveLoadFlag;
|
|
|
|
|
extern STR_TimeSliceOffset m_excessiveLoad;
|
|
|
|
|
extern void Task_excessiveLoad(void);
|
|
|
|
|
|
2024-08-29 02:50:22 +00:00
|
|
|
|
#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 m_sensorEnableBroadcast;
|
|
|
|
|
/* <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>չ㲥֡<E3B2A5><D6A1>־λ */
|
|
|
|
|
extern uint8_t run_Broadcast;
|
2024-08-29 09:24:57 +00:00
|
|
|
|
extern void Task_sensorEnableBroadcast(void);
|
2024-07-22 06:20:24 +00:00
|
|
|
|
|
2024-07-11 06:58:55 +00:00
|
|
|
|
void task_Init(void);
|
|
|
|
|
void hardware_Init(void);
|
|
|
|
|
|
|
|
|
|
#endif /* APP_INC_TASK_H_ */
|