CELIS/HARDWARE/DEV_HAL/kC_Features.c
lidun 7a7daad23a
完成UDS升级
Signed-off-by: lidun <1084178170@qq.com>
2024-01-30 11:31:27 +08:00

75 lines
1.5 KiB
C

#include "kC_Features.h"
void KCAC_ON_GPIO(void)
{
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_OFF));
KC_Set_GPIO(&GetDEVICE_Name(ELS_ON));
}
void KCAC_OFF_GPIO(void)
{
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_ON));
KC_Set_GPIO(&GetDEVICE_Name(ELS_OFF));
}
void KCAC_ReSet_GPIO(void)
{
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_ON));
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_OFF));
}
void KC_ACtEXT_Open(void)
{
KC_Set_GPIO(&GetDEVICE_Name(ELS_ON));
KC_Set_GPIO(&GetDEVICE_Name(ELS_OFF));
printf("AC 全高");
}
void KC_ACtEXT_Close(void)
{
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_ON));
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_OFF));
printf("AC 全低");
}
void CLOSE_AC_RELAY()
{
OPEN_12VPowerRealy();
// KCAC_OFF_GPIO();//交流继电器断开
// Delay_MS(500);
// KCAC_ReSet_GPIO();
DCU_SendState.AC_Relay_State = 1;
printf("CLOSE_12VPowerRealy\r\n");
}
void OPEN_AC_RELAY()
{
CLOSE_12VPowerRealy();
// KCAC_ON_GPIO();//交流继电器闭合
// Delay_MS(500);
// KCAC_ReSet_GPIO();
DCU_SendState.AC_Relay_State = 0;
printf("OPEN_12VPowerRealy\r\n");
}
//测试 临时驱动回路 2024-01-21
void OPEN_12VPowerRealy(void)
{
KC_Set_GPIO(&GetDEVICE_Name(ELS_ON));
Delay_MS(1);
KC_Set_GPIO(&GetDEVICE_Name(ELS_OFF));
Delay_MS(500);
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_OFF));
}
void CLOSE_12VPowerRealy(void)
{
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_ON));
Delay_MS(1);
KC_Set_GPIO(&GetDEVICE_Name(ELS_OFF));
Delay_MS(500);
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_OFF));
}