📄 dsp28_gpio.c
字号:
#include "DSP28_Device.h"
//
void InitGpio(void)
{
EALLOW;
GpioMuxRegs.GPAMUX.all=0x00ff;
GpioMuxRegs.GPADIR.all=0xFF00; // upper byte as output/low byte as input
GpioMuxRegs.GPAQUAL.all=0x0000; // Input qualifier disabled
GpioMuxRegs.GPBMUX.all=0x00FF;
GpioMuxRegs.GPBDIR.all=0xFF00;
GpioMuxRegs.GPBQUAL.all=0x0000; // Input disabled输入采样时间的限制
GpioMuxRegs.GPEMUX.bit.XNMI_XINT13_GPIOE2=0;//GPIOE2的功能位定义
GpioMuxRegs.GPEDIR.bit.GPIOE2=1;//方向定义
GpioMuxRegs.GPFMUX.bit.MDRA_GPIOF13=0;//GPIOF13功能定义
GpioMuxRegs.GPFDIR.bit.GPIOF13=0;//
EDIS;
GpioDataRegs.GPBDAT.all=0xFFFF;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -