修改驱动程序
This commit is contained in:
1 parent
063c3fcc07
commit
a69c1a58d6
39 files changed
+1627
-641
No files matched your search
+32
-32
@@ -1,41 +1,41 @@
|
||||
#include "main.h"
|
||||
|
||||
|
||||
int DiReadChann(int chann)
|
||||
int DiReadChann (int chann)
|
||||
{
|
||||
int ret = -1;
|
||||
switch(chann)
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user