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.

TM4C123G PE1口读到的状态一直都是零,即使直接与VCC连接,也是读到零。



  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;

}