|
为什么我的gpio全赋值0或1的从GPADAT看到的结果都会不对?求指导。
#include "DSP28x_Project.h"
void main(void)
{
InitSysCtrl();
EALLOW;
GpioCtrlRegs.GPAMUX1.bit.GPIO0=0;
GpioCtrlRegs.GPADIR.bit.GPIO0=1;
GpioCtrlRegs.GPAMUX1.bit.GPIO1=0;
GpioCtrlRegs.GPADIR.bit.GPIO1=1;
GpioCtrlRegs.GPAMUX1.bit.GPIO2=0;
GpioCtrlRegs.GPADIR.bit.GPIO2=1;
GpioCtrlRegs.GPAMUX1.bit.GPIO3=0;
GpioCtrlRegs.GPADIR.bit.GPIO3=1;
GpioCtrlRegs.GPAMUX1.bit.GPIO4=0;
GpioCtrlRegs.GPADIR.bit.GPIO4=1;
GpioCtrlRegs.GPAMUX1.bit.GPIO5=0;
GpioCtrlRegs.GPADIR.bit.GPIO5=1;
EDIS;
DINT;
InitPieCtrl();
IER = 0x0000;
IFR = 0x0000;
InitPieVectTable();
GpioDataRegs.GPADAT.bit.GPIO0 = 1;
GpioDataRegs.GPADAT.bit.GPIO1 = 1;
GpioDataRegs.GPADAT.bit.GPIO2 = 1;
GpioDataRegs.GPADAT.bit.GPIO3 = 1;
GpioDataRegs.GPADAT.bit.GPIO4 = 1;
GpioDataRegs.GPADAT.bit.GPIO5 = 1;
}
|
|