我以前设计的矩阵键盘扫描用的GPIOB口,我想这些都关系不大,设置好了就可以了! #include "DSP28_Device.h"www.hellodsp.com/ V& d8 t$ M: y# x$ t void InitGpio(void) { EALLOW; GpioMuxRegs.GPAMUX.all = 0x0000; // 将GPIOA全设置为一般I/O功能(LCD数据线和控制线接口); GpioMuxRegs.GPBMUX.all = 0x0000; // 将GPIOB全设置为一般I/O功能(键盘接口); GpioMuxRegs.GPBDIR.all = 0x00ff; //将GPIOA的高8位设置成输出,低8位设置成输入模式 }
|