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.
初始化代码如下:
EALLOW;
//KEY端口配置
GpioCtrlRegs.GPAMUX2.bit.GPIO30=0;
GpioCtrlRegs.GPADIR.bit.GPIO30=0;
GpioCtrlRegs.GPAPUD.bit.GPIO30=0;
EDIS;
GpioDataRegs.GPASET.bit.GPIO30=1;
主函数如下:
#define low (GpioDataRegs.GPADAT.bit.GPIO30)
if(low==1){
turnon_lED_RED;
}
else {
turnoff_lED_RED;
}
现象就是不能进入判断,猜测原因为配置不成功