2024-08-09 06:24:48 +00:00
|
|
|
|
#ifndef _SecTimer_H__
|
|
|
|
|
|
|
|
|
|
#define _SecTimer_H__
|
|
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct SecTimer{
|
|
|
|
|
uint32_t Star_time;
|
|
|
|
|
uint32_t Endtime;
|
|
|
|
|
};
|
|
|
|
|
enum SecTimer_NUM
|
|
|
|
|
{
|
|
|
|
|
Init_SecTimerNUM,
|
|
|
|
|
Hand_SecTimerNUM,/****<2A><><EFBFBD>ֳ<EFBFBD>ʱ******/
|
|
|
|
|
Ready_SecTimerNUM,
|
|
|
|
|
Start_SecTimerNUM,
|
|
|
|
|
Start1_SecTimerNUM,
|
|
|
|
|
Start2_SecTimerNUM,
|
|
|
|
|
Start3_SecTimerNUM,
|
|
|
|
|
Stop_SecTimerNUM,
|
|
|
|
|
Stop1_SecTimerNUM,
|
|
|
|
|
ACCharg_SecTimerNUM,
|
|
|
|
|
Enter_AC_SecTimerNUM,
|
|
|
|
|
Req_VoltCurr_SecTimerNUM,
|
|
|
|
|
Over_Curr_SecTimerNUM,
|
|
|
|
|
GUN_TEMP_SecTimerNUM,
|
|
|
|
|
CAN_WakeUp_Flag_SecTimerNUM,
|
|
|
|
|
Bus_Packet_Free_SecTimerNUM,
|
|
|
|
|
BusoffCnt_Free_SecTimerNUM,
|
|
|
|
|
CC2_CCFault_SecTimerNUM,
|
|
|
|
|
DTC_FalseAlarm_SecTimerNUM,
|
|
|
|
|
NO427_NOGun_10S_SecTimerNUM,
|
|
|
|
|
NO427_HaveGun_300S_SecTimerNUM,
|
|
|
|
|
Have427_NOGun_10S_SecTimerNUM,
|
|
|
|
|
Have427_HaveGun_300S_SecTimerNUM,
|
|
|
|
|
SecTimerNUM
|
|
|
|
|
};
|
|
|
|
|
extern struct SecTimer SecTimer[SecTimerNUM];
|
|
|
|
|
|
|
|
|
|
bool SecStar(struct SecTimer* obj,uint32_t longTime);
|
|
|
|
|
bool SecStop(struct SecTimer* obj);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct CAN_SendTimer
|
|
|
|
|
{
|
|
|
|
|
uint16_t Arrcount;
|
|
|
|
|
void (*can_send)(void);
|
|
|
|
|
struct CAN_SendTimer *next;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct CAN_SendMaster
|
|
|
|
|
{
|
|
|
|
|
struct CAN_SendTimer* obj;
|
|
|
|
|
struct CAN_SendTimer* headH;
|
|
|
|
|
uint8_t Master_len;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extern struct CAN_SendMaster CanMasterOBJ ;
|
|
|
|
|
void TimSend(void);
|
|
|
|
|
void InitCAN_SendMaster(void);
|
|
|
|
|
#endif
|
|
|
|
|
|