SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);
GPIOPinTypeGPIOInput(GPIO_PORTF_BASE,GPIO_PIN_1);
if(GPIOPinRead(GPIO_PORTF_BASE,GPIO_PIN_1)==0)
{
a=1;
}
else
{
a=2;
}
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);
GPIOPinTypeGPIOInput(GPIO_PORTF_BASE,GPIO_PIN_1);
if(GPIOPinRead(GPIO_PORTF_BASE,GPIO_PIN_1)==0)
{
a=1;
}
else
{
a=2;
}