📄 dsp281x_gpio.c
字号:
//###########################################################################
//
// FILE: DSP281x_Gpio.c
//
// TITLE: DSP281x General Purpose I/O Initialization & Support Functions.
//
//###########################################################################
//
// Ver | dd mmm yyyy | Who | Description of changes
// =====|=============|======|===============================================
// 1.00| 11 Sep 2003 | L.H. | No change since previous version (v.58 Alpha)
//###########################################################################
#include "DSP281x_Device.h" // DSP281x Headerfile Include File
#include "DSP281x_Examples.h" // DSP281x Examples Include File
//---------------------------------------------------------------------------
// InitGpio:
//---------------------------------------------------------------------------
// This function initializes the Gpio to a known state.
//
void InitGpio(void)
{
// Set GPIO A port pins,configured as EVA signals
// Input Qualifier =0, none
EALLOW;
GpioMuxRegs.GPAMUX.all=0xFFFF;
GpioMuxRegs.GPADIR.all=0x0000;
GpioMuxRegs.GPAQUAL.all=0x0000; // Input qualifier disabled
// Set GPIO B port pins, configured as EVB signals
// Input Qualifier =0, none
GpioMuxRegs.GPBMUX.all=0xFFFF;
GpioMuxRegs.GPBDIR.all=0x0000;
GpioMuxRegs.GPBQUAL.all=0x0000; // Input qualifier disabled
// Set GPIO D port pins, configured as main function pins
// Input Qualifier =0, none
GpioMuxRegs.GPDMUX.all=0xFFFF;
GpioMuxRegs.GPDDIR.all=0x0000;
GpioMuxRegs.GPDQUAL.all=0x0000; // Input qualifier disabled
// Set GPIO E port pins, configured as main function pins
// Input Qualifier =0, none
GpioMuxRegs.GPEMUX.all=0xFFFF; //enable xint1 and xnmi
GpioMuxRegs.GPEDIR.all=0x0000;
GpioMuxRegs.GPEQUAL.all=0x002F; // Input qualifier enabled
// Set GPIO F port pins,
// no Qualifier
GpioMuxRegs.GPFMUX.all=0xFFFF;
GpioMuxRegs.GPFDIR.all=0x0000; //
// Set GPIO G port pins,
// no Qualifier
GpioMuxRegs.GPGMUX.all=0xFFFF;
GpioMuxRegs.GPGDIR.all=0x0000; //
EDIS;
}
//===========================================================================
// No more.
//===========================================================================
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -