CELIS/HARDWARE/DEV_HAL/kC_Features.c

75 lines
1.5 KiB
C
Raw Normal View History

#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 ȫ<><C8AB>");
}
void KC_ACtEXT_Close(void)
{
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_ON));
KC_ReSet_GPIO(&GetDEVICE_Name(ELS_OFF));
printf("AC ȫ<><C8AB>");
}
void CLOSE_AC_RELAY()
{
OPEN_12VPowerRealy();
// KCAC_OFF_GPIO();//<2F><><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD><CCB5><EFBFBD><EFBFBD>Ͽ<EFBFBD>
// 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();//<2F><><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD><CCB5><EFBFBD><EFBFBD>պ<EFBFBD>
// Delay_MS(500);
// KCAC_ReSet_GPIO();
DCU_SendState.AC_Relay_State = 0;
printf("OPEN_12VPowerRealy\r\n");
}
//<2F><><EFBFBD><EFBFBD> <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>· 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));
}