【DSP】TMS320F28035 GPIO例程

#include "DSP28x_Project.h"

//extern Uint16 RamfuncsLoadStart;
//extern Uint16 RamfuncsLoadEnd;
//extern Uint16 RamfuncsRunStart;

int main(void)
{
       InitSysCtrl();

       EALLOW;
       GpioCtrlRegs.GPAMUX1.bit.GPIO12 = 0;
       GpioCtrlRegs.GPADIR.bit.GPIO12 = 1;
       GpioDataRegs.GPADAT.bit.GPIO12 = 0;
       GpioCtrlRegs.GPBMUX1.bit.GPIO34 = 0;
       GpioCtrlRegs.GPBDIR.bit.GPIO34 = 1;
       GpioDataRegs.GPBDAT.bit.GPIO34 = 0;
       EDIS;

       DINT;
       InitPieCtrl();
       IER = 0x0000;
       IFR = 0x0000;
       InitPieVectTable();


//     MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);
//     InitFlash();



       while(1)
       {
           GpioDataRegs.GPADAT.bit.GPIO12 =~ GpioDataRegs.GPADAT.bit.GPIO12;
           DELAY_US(50000);
           GpioDataRegs.GPBDAT.bit.GPIO34 =~ GpioDataRegs.GPBDAT.bit.GPIO34;
           DELAY_US(50000);
       }


}

你可能感兴趣的:(嵌入式)