Tool/software: Code Composer Studio
Hello,
I want to know how to read the value on a gpio pin. I tried to assign a variable to read the gpio pin but I'm not getting any o/p.
here's my code :
#include "DSP28x_Project.h"
int a;
void main(void)
{
EALLOW;
GpioCtrlRegs.GPAMUX1.bit.GPIO14 = 0;
GpioCtrlRegs.GPADIR.bit.GPIO14 = 1;
EDIS;
a=GpioDataRegs.GPADAT.bit.GPIO14;
}
please help me with it.