DSP

【DSP】TMS320F28035 GPIO例程

2019-07-13 14:37发布

#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); } }