|
@@ -18,15 +18,23 @@
|
|
|
void GetDIOState(void)
|
|
|
{
|
|
|
//配置高有效,底层悬空为0,触发为1,应用层输出悬空为0,触发为1
|
|
|
- DINDrv_SetChanThres(_DIN_INDEX_X10, 0, 40950U);
|
|
|
- DINDrv_SetChanThres(_DIN_INDEX_X17, 0, 40950U);
|
|
|
- DINDrv_SetChanThres(_DIN_INDEX_X18, 0, 40950U);
|
|
|
- DINDrv_SetChanThres(_DIN_INDEX_X13, 0, 40950U);
|
|
|
- DINDrv_SetChanThres(_DIN_INDEX_X9, 0, 40950U);
|
|
|
- DINDrv_SetChanThres(_DIN_INDEX_X5, 0, 40950U);
|
|
|
- DINDrv_SetChanThres(_DIN_INDEX_X11, 0, 40950U);
|
|
|
- DINDrv_SetChanThres(_DIN_INDEX_X14, 0, 40950U);
|
|
|
+// DINDrv_SetChanThres(_DIN_INDEX_X10, 1, 40950U);
|
|
|
+// DINDrv_SetChanThres(_DIN_INDEX_X17, 1, 40950U);
|
|
|
+// DINDrv_SetChanThres(_DIN_INDEX_X18, 1, 40950U);
|
|
|
+// DINDrv_SetChanThres(_DIN_INDEX_X13, 1, 40950U);
|
|
|
+// DINDrv_SetChanThres(_DIN_INDEX_X9, 1, 40950U);
|
|
|
+// DINDrv_SetChanThres(_DIN_INDEX_X5, 1, 40950U);
|
|
|
+// DINDrv_SetChanThres(_DIN_INDEX_X11, 1, 40950U);
|
|
|
+// DINDrv_SetChanThres(_DIN_INDEX_X14, 1, 40950U);
|
|
|
|
|
|
+ DINDrv_SetChanThres(_DIN_INDEX_X10, 1, (4095*3));
|
|
|
+ DINDrv_SetChanThres(_DIN_INDEX_X17, 1, (4095*3));
|
|
|
+ DINDrv_SetChanThres(_DIN_INDEX_X18, 1, (4095*3));
|
|
|
+ DINDrv_SetChanThres(_DIN_INDEX_X13, 1, (4095*3));
|
|
|
+ DINDrv_SetChanThres(_DIN_INDEX_X9, 1, (4095*3));
|
|
|
+ DINDrv_SetChanThres(_DIN_INDEX_X5, 1, (4095*3));
|
|
|
+ DINDrv_SetChanThres(_DIN_INDEX_X11, 1, (4095*3));
|
|
|
+ DINDrv_SetChanThres(_DIN_INDEX_X14, 1, (4095*3));
|
|
|
chrgModuelPwrCtlFB =DINDrv_GetChanState(_DIN_INDEX_X10);
|
|
|
paraChrgCtlFB =DINDrv_GetChanState(_DIN_INDEX_X17);
|
|
|
outToBaseCtlFB_A =DINDrv_GetChanState(_DIN_INDEX_X18);
|
|
@@ -67,6 +75,23 @@ void GetAIOValue(void)
|
|
|
}
|
|
|
void ctrlFunc(void)
|
|
|
{
|
|
|
+ static uint8 A_volDetectTmp = 0;
|
|
|
+ static uint32 xk24_outputTime = 0;
|
|
|
+ if(A_volDetect==1)
|
|
|
+ {
|
|
|
+ A_volDetectTmp = A_volDetect;
|
|
|
+ }
|
|
|
+ if(A_volDetectTmp==1 && A_volDetect==0 && xk24_outputTime<3000)
|
|
|
+ {
|
|
|
+ PSwtDrv_Interface(_PSWT_INDEX_X24, 1);
|
|
|
+ xk24_outputTime = xk24_outputTime + 10;
|
|
|
+ }
|
|
|
+ if(xk24_outputTime>=3000)
|
|
|
+ {
|
|
|
+ xk24_outputTime = 0;
|
|
|
+ PSwtDrv_Interface(_PSWT_INDEX_X24, 0);
|
|
|
+ A_volDetectTmp = 0;
|
|
|
+ }
|
|
|
if(chrgModulePwrCtrl==1)
|
|
|
{
|
|
|
PSwtDrv_Interface(_PSWT_INDEX_X36, 1);
|