使用TI DSP 2407A 进行开发的源代码
源代码在线查看: dsp240x_device.h
//###########################################################################
//
// FILE: DSP281x_Device.h
//
// TITLE: DSP281x Device Definitions.
//
//###########################################################################
//
// Ver | dd mmm yyyy | Who | Description of changes
// =====|=============|======|===============================================
// 1.00| 11 Sep 2003 | L.H. | Changes since previous version (v.58 Alpha)
// | | | Added symbols created by the linker
// | | | cmd file for relocating code.
// | | | Added float to the datatype typedefs
// | | | Added #if DSP28_DATA_TYPES wrapper around the
// | | | typedefs
// | | | Added DSP28_BIOS and DSP28_NONBIOS switches
// | | | to include or not include the default ISR's
// | | | Moved files and info specific to the DSP28 examples
// | | | to DSP28_common\include\DSP28_Examples.h
// | | | Changed F2812 -> DSP28_F2812
// | | | Changed F2810 -> DSP28_F2810
//###########################################################################
#ifndef DSP240x_DEVICE_H
#define DSP240x_DEVICE_H
#ifdef __cplusplus
extern "C" {
#endif
//---------------------------------------------------------------------------
// Common CPU Definitions:
//
#include "io.h" // System Control/Power Modes
#include "sys.h" // SCI Registers
#include "interrupt.h" // General Purpose I/O Registers
#include "regs240x.h"
#include "PWM.h"
#include "AD.h"
#include "sci2407.h"
/*
#include "DSP240x_SysCtrl.h" // System Control/Power Modes
#include "DSP240x_Sci.h" // SCI Registers
#include "DSP240x_Gpio.h" // General Purpose I/O Registers
#include "DSP240x_Ev.h" // Event Manager Registers
#include "DSP240x_Adc.h" // ADC Registers
*/
//extern cregister volatile unsigned int IFR;
//extern cregister volatile unsigned int IER;
#define EINT asm(" clrc INTM")
#define DINT asm(" setc INTM")
#define BIT0 0x0001
#define BIT1 0x0002
#define BIT2 0x0004
#define BIT3 0x0008
#define BIT4 0x0010
#define BIT5 0x0020
#define BIT6 0x0040
#define BIT7 0x0080
#define BIT8 0x0100
#define BIT9 0x0200
#define BIT10 0x0400
#define BIT11 0x0800
#define BIT12 0x1000
#define BIT13 0x2000
#define BIT14 0x4000
#define BIT15 0x8000
//---------------------------------------------------------------------------
// For Portability, User Is Recommended To Use Following Data Type Size
// Definitions For 16-bit and 32-Bit Signed/Unsigned Integers:
//
#ifndef DSP_DATA_TYPES
#define DSP_DATA_TYPES
typedef int int16;
typedef long int32;
typedef unsigned int Uint16;
typedef unsigned long Uint32;
typedef float float32;
typedef long double float64;
#endif
//---------------------------------------------------------------------------
// Include All Peripheral Header Files:
//
/*
#define DATA_SECTION(Regs,Index) \
Regs = (volatile Uint16 *) Index
extern volatile struct ADC_REGS * AdcRegs;
extern volatile struct EVA_REGS * EvaRegs;
extern volatile struct EVB_REGS * EvbRegs;
extern volatile struct GPIO_REGS * GpioRegs;
extern volatile struct SCI_REGS * SciRegs;
extern volatile struct SYS_CTRL_REGS * SysCtrlRegs;
extern volatile struct SYS_INT_REGS * SysIntRegs;
#define ADC_Index ((volatile struct ADC_REGS *) 0x70A0)
#define EVA_Index ((volatile struct EVA_REGS *) 0x7400)
#define EVB_Index ((volatile struct EVA_REGS *) 0x7500)
#define SCI_Index ((volatile struct SCI_REGS *) 0x7050)
#define GPIO_Index ((volatile struct GPIO_REGS *) 0x7090)
#define SYS_CTRL_Index ((volatile struct SYS_CTRL_REGS *) 0x7010)
#define SYS_INT_Index ((volatile struct SYS_INT_REGS *)0x0004)
*/
extern void KickDog(void);
extern void DisableDog(void);
ioport unsigned char port000c;
#ifdef __cplusplus
}
#endif /* extern "C" */
#endif // end of DSP281x_DEVICE_H definition
//===========================================================================
// No more.
//===========================================================================