Jump to content
43oh

sherifsorour

Members
  • Content Count

    1
  • Joined

  • Last visited

  1. Hello Guys, Iam starting to learn embedded systems with Tiva C board. I have issue in understanding simple code below this is part of the code input = GPIOPinRead(GPIO_PORTF_BASE, GPIO_PIN_4); GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1 , input); PIN4 connected to switch and pin connected to led. It shall take the switch value and show it on the led but it doesn't work. Someone suggested to write the same code with the below if condition and it worked but I don't understand why the above code doesn't work. if(GPIOPinRead(GPIO_PORTF_BASE, GPIO_PIN_4 ) == GPIO_PIN_4) { GPIOPin
×
×
  • Create New...