test on the value of a vector
Hello,
I want to write a program to make his test on the value of a vector.
is that there is another simpler solution??
GPIO_DeInit(GPIOB);
GPIO_Init(GPIOB, GPIO_PIN_0, GPIO_MODE_IN_PU_NO_IT);
GPIO_Init(GPIOB, GPIO_PIN_1, GPIO_MODE_IN_PU_NO_IT);
GPIO_Init(GPIOB, GPIO_PIN_2, GPIO_MODE_IN_PU_NO_IT);
if (((GPIO_ReadInputData(GPIOB) & GPIO_PIN_0)== 0)) &(((GPIO_ReadInputData(GPIOB) & GPIO_PIN_1)== 0))&
(((GPIO_ReadInputData(GPIOB) & GPIO_PIN_2)== 1))
{
//do operation 1;
}
else
if (((GPIO_ReadInputData(GPIOB) & GPIO_PIN_1)== 0)) &(((GPIO_ReadInputData(GPIOB) & GPIO_PIN_1)== 0))&
(((GPIO_ReadInputData(GPIOB) & GPIO_PIN_2)== 1))
{
// do operation 2;
}
........
........
........
........
else
operation n;
