Other Parts Discussed in Thread: C2000WARE
Tool/software: Code Composer Studio
Hi,
I want to read a GPIO input (GPIO14) in order to see the button status and write in GPIO out (GPIO15) the same status, I have the initial configuration:
void Gpio_select(void)
{
EALLOW;
GpioCtrlRegs.GPAMUX1.bit.GPIO14 = 0;
GpioCtrlRegs.GPAMUX1.bit.GPIO15 = 0;
GpioCtrlRegs.GPADIR.bit.GPIO14 = 0; //input
GpioCtrlRegs.GPADIR.bit.GPIO15 = 1; //output
EDIS;
}
My questions are: (1) What I need for read the status value for input GPIO as a interruption? in the main loop if I only have:
void main(void)
{
InitSysCtrl();
Gpio_select();
DINT;
InitPieCtrl();
IER = 0x0000;
IFR = 0x0000;
InitPieVectTable();
}