dsp28_gpio.c
来自「2812开发板DAC转换程序,用于电流电压的模数转换」· C语言 代码 · 共 30 行
C
30 行
#include "DSP28_Device.h"
//---------------------------------------------------------------------------
// InitGpio:
//---------------------------------------------------------------------------
// This function initializes the Gpio to a known state.
//
void InitGpio(void)
{
// Set GPIO A port pins,AL(Bits 7:0)(input)-AH(Bits 15:8) (output) 8bits
// Input Qualifier =0, none
EALLOW;
GpioMuxRegs.GPAMUX.all=0x0000;
GpioMuxRegs.GPADIR.all=0xFF00; // upper byte as output/low byte as input
GpioMuxRegs.GPAQUAL.all=0x0000; // Input qualifier disabled
// Set GPIO B port pins, configured as EVB signals
// Input Qualifier =0, none
// Set bits to 1 to configure peripherals signals on the pins
GpioMuxRegs.GPBMUX.all=0xFFFF;
GpioMuxRegs.GPBQUAL.all=0x0000; // Input qualifier disabled
EDIS;
}
//===========================================================================
// No more.
//===========================================================================
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?