Hi Friends,
I am working on TMS5701224BPGE launchpad board . I want to configure USER SWITCH A as input and USER LED A as output for this I written code, but I am not getting input from key, DIN register status is always shows 0 .
void main(void)
{
/* USER CODE BEGIN (3) */
gioInit();
gioSetDirection(gioPORTB, 2);
while(1)
{
if(gioGetBit(gioPORTB, 2) == 1)
{
printf(" button is pressed \n\r");
gioSetBit(gioPORTB, 1, 1);
}
else
{
printf(" button is not pressed \n\r");
gioSetBit(gioPORTB, 1, 0);
}
}
/* USER CODE END */
}
Regards,
Arvind