⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ads8364_gpio.c

📁 ADS8364是美国德州仪器公司(TI)的一款六通道、16位并行输出、同步采样的模数转换器。该芯片提供了一个灵活的高速并行接口
💻 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 + -