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.

configure on board switch(user switch A) as input

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