?? ads8364_gpio.c
字號:
//
// TMDX ALPHA RELEASE
// Intended for product evaluation purposes
//
//###########################################################################
//
// FILE: DSP28_Gpio.c
//
// TITLE: DSP28 General Purpose I/O Initialization & Support Functions.
//
//###########################################################################
//
// Ver | dd mmm yyyy | Who | Description of changes
// =====|=============|======|===============================================
// 0.55| 06 May 2002 | L.H. | EzDSP Alpha Release
// 0.56| 20 May 2002 | L.H. | No change
// 0.57| 27 May 2002 | L.H. | No change
// 0.58| 29 Jun 2002 | L.H. | No change
//###########################################################################
#include "DSP28_Device.h"
//---------------------------------------------------------------------------
// InitGpio:
//---------------------------------------------------------------------------
// This function initializes the Gpio to a known state.
//
void InitGpio(void)
{
EALLOW;
//Configure Port A for PWM clock and GPIO
GpioMuxRegs.GPAMUX.all=0x0003;
GpioMuxRegs.GPADIR.all=0xFFFF;
//Configure Port E for External Interrupts XINT1, XINT2
GpioMuxRegs.GPEMUX.all=0x0003;
GpioMuxRegs.GPEDIR.all=0x0003;
GpioMuxRegs.GPEQUAL.all=0x0000;
//Configure Port F for GPIO
GpioMuxRegs.GPFMUX.all=0x0000;
GpioMuxRegs.GPFDIR.all=0x0005;
EDIS;
}
void ResetADS8364(void)
{
GpioDataRegs.GPFCLEAR.all = 0x0001; // Test Clear
asm (" RPT #200 || NOP");
GpioDataRegs.GPFSET.all = 0x0001; // Test Set
}
void ToggleHOLDx(int channel)
{
GpioDataRegs.GPACLEAR.all = channel; // Test Clear
asm (" RPT #25 || NOP");
GpioDataRegs.GPASET.all = channel; // Test Set
}
//===========================================================================
// No more.
//===========================================================================
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -