CELIS/HARDWARE/DEV_HAL/kC_Features.h

158 lines
3.2 KiB
C
Raw Normal View History

2024-08-09 06:24:48 +00:00
#ifndef __KC_FEATURES_H__
#define __KC_FEATURES_H__
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "sys.h"
#include "CDZ_State.h"
#include "KC.h"
#ifndef __STATIC_INLIN
#define __STATIC_INLIN static __inline
#endif
void OPEN_AC_RELAY(void);
void CLOSE_AC_RELAY(void);
void KC_ACtEXT_Open(void);
void KC_ACtEXT_Close(void);
void OPEN_12VPowerRealy(void);
void CLOSE_12VPowerRealy(void);
void Signal_Filtering(void);
//ֱ<><D6B1><EFBFBD>̵<EFBFBD><CCB5><EFBFBD>
__STATIC_INLIN bool OPEN_DC_RELAY(void)
{
DCU_SendState.DC_Relay_State = 1;
printf("OPEN_DCRealy\r\n");
return KC_Set_GPIO(&GetDEVICE_Name(KC1));
}
__STATIC_INLIN bool CLOSE_DC_RELAY(void)
{
DCU_SendState.DC_Relay_State = 0;
printf("CLOSE_DCRealy\r\n");
return KC_ReSet_GPIO(&GetDEVICE_Name(KC1));
}
//<2F><>ѹģ<D1B9><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD><CCB5><EFBFBD>
__STATIC_INLIN bool OPEN_HV_RELAY(void)
{
return KC_Set_GPIO(&GetDEVICE_Name(KC2));
}
__STATIC_INLIN bool CLOSE_HV_RELAY(void)
{
return KC_ReSet_GPIO(&GetDEVICE_Name(KC2));
}
//CC1-CP<43>̵<EFBFBD><CCB5><EFBFBD>
__STATIC_INLIN bool OPEN_CC1_CP_RELAY(void)
{
DCU_SendState.CP_CC1_State = 1;
return KC_Set_GPIO(&GetDEVICE_Name(KC3));
}
__STATIC_INLIN bool CLOSE_CC1_CP_RELAY(void)
{
DCU_SendState.CP_CC1_State = 0;
return KC_ReSet_GPIO(&GetDEVICE_Name(KC3));
}
//<2F><><EFBFBD><EFBFBD>оƬ<D0BE>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
__STATIC_INLIN bool OPEN_32_L0_RELAY(void)
{
return KC_Set_GPIO(&GetDEVICE_Name(KC4));
}
__STATIC_INLIN bool CLOSE_32_L0_RELAY(void)
{
return KC_ReSet_GPIO(&GetDEVICE_Name(KC4));
}
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѹ
__STATIC_INLIN bool OPEN_AUXI_BOOT(void)
{
return KC_Set_GPIO(&GetDEVICE_Name(KC5));
}
__STATIC_INLIN bool CLOSE_AUXI_BOOT(void)
{
return KC_ReSet_GPIO(&GetDEVICE_Name(KC5));
}
//CC2-CC<43>̵<EFBFBD><CCB5><EFBFBD>
__STATIC_INLIN bool OPEN_CC2_CC_RELAY(void)
{
DCU_SendState.CC_CC2_State = 1;
return KC_Set_GPIO(&GetDEVICE_Name(KC8));
}
__STATIC_INLIN bool CLOSE_CC2_CC_RELAY(void)
{
DCU_SendState.CC_CC2_State = 0;
return KC_ReSet_GPIO(&GetDEVICE_Name(KC8));
}
//ǹ<><C7B9><EFBFBD><EFBFBD>
__STATIC_INLIN bool OPEN_GUN_TEMP_RELAY(void)
{
DCU_SendState.L_Relay_State = 1;
return KC_Set_GPIO(&GetDEVICE_Name(KC9));
}
__STATIC_INLIN bool CLOSE_GUN_TEMP_RELAY(void)
{
DCU_SendState.L_Relay_State = 0;
return KC_ReSet_GPIO(&GetDEVICE_Name(KC9));
}
//<2F><>Դ<EFBFBD><D4B4>3.3V,<2C><>,<2C><><EFBFBD><EFBFBD>
__STATIC_INLIN bool OPEN_PW3_3V(void)
{
return KC_Set_GPIO(&GetDEVICE_Name(PW3_3V));
}
__STATIC_INLIN bool CLOSE_PW3_3V(void)
{
return KC_ReSet_GPIO(&GetDEVICE_Name(PW3_3V));
}
//5V<35><56>Դ<EFBFBD><D4B4>
__STATIC_INLIN bool OPEN_PW5V(void)
{
return KC_Set_GPIO(&GetDEVICE_Name(PW5V));
}
__STATIC_INLIN bool CLOSE_PW5V(void)
{
return KC_ReSet_GPIO(&GetDEVICE_Name(PW5V));
}
//<2F><><EFBFBD><EFBFBD>ָʾ<D6B8><CABE>
__STATIC_INLIN bool OPEN_MCU_RUN(void)
{
return KC_Set_GPIO(&GetDEVICE_Name(MCU_RUN));
}
__STATIC_INLIN bool CLOSE_MCU_RUN(void)
{
return KC_ReSet_GPIO(&GetDEVICE_Name(MCU_RUN));
}
//<2F><>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
__STATIC_INLIN enum KC_state READ_HV_DSG_CHECJ(void)
{
return KC_Read_GPIO(&GetDEVICE_Name(HV_DSG_CHECJ));
}
__STATIC_INLIN enum KC_state READ_HV_DSG_CHECJ_2(void)
{
return KC_Read_GPIO(&GetDEVICE_Name(HV_DSG_CHECJ_2));
}
//<2F><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD><D8BC>ź<EFBFBD>
__STATIC_INLIN enum KC_state READ_AC_YX1(void)
{
return KC_Read_GPIO(&GetDEVICE_Name(YX1));
}
//ֱ<><D6B1><EFBFBD>ؼ<EFBFBD><D8BC>ź<EFBFBD>
__STATIC_INLIN enum KC_state READ_DC_YX2(void)
{
return KC_Read_GPIO(&GetDEVICE_Name(YX2));
}
#endif