新建项目

This commit is contained in:
gitea committed 2023-04-29 09:09:12 +08:00
1 parent 5e2e890cfc
commit 633d9b872b
1351 files changed
+730564

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
#include "main.h"
int DiReadChann(int chann)
{
int ret = -1;
switch(chann)
{
case 1:
{
ret = HAL_GPIO_ReadPin(DI1_GPIO_Port,DI1_Pin);
break;
}
case 2:
{
ret = HAL_GPIO_ReadPin(DI2_GPIO_Port,DI2_Pin);
break;
}
case 3:
{
ret = HAL_GPIO_ReadPin(DI3_GPIO_Port,DI4_Pin);
break;
}
case 4:
{
ret = HAL_GPIO_ReadPin(DI4_GPIO_Port,DI4_Pin);
break;
}
case 5:
{
ret = HAL_GPIO_ReadPin(DI5_GPIO_Port,DI5_Pin);
break;
}
case 6:
{
ret = HAL_GPIO_ReadPin(DI6_GPIO_Port,DI6_Pin);
break;
}
}
return ret;
}