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

📄 dm643.h

📁 基于ccs2(6000)开发环境,通过这个程序可以修改板上EEPROM 的MAC 地址.
💻 H
字号:
/* ======================================================================== */
/* NAME                                                                     */
/*  dm643.h 										            			*/
/*                                                                          */
/*	DESCRIPTION																*/
/* 	This file contains DM643 board initialization and FPGA register access	*/
/*  functions.     															*/
/*																			*/
/* ------------------------------------------------------------------------ */
/*        Copyright (c) 2005 Wintech Digital System Technology Corp.        */
/*                         All Rights Reserved.                             */
/* ======================================================================== */
#ifndef DM643_
#define DM643_

#ifdef __cplusplus
extern "C" {
#endif

#include <csl.h>
#include <csl_i2c.h>
#include <csl_gpio.h>

/*
 *  Note:  Bit definitions for each register field
 *         needs to be supplied here for the CPLD
 *	       and other board periperals.
 */

/* Compatability definitions */
#define NULL                 0

#define MAPEN   0x01b4c010
#define MAPDIR  0x01b4c014
#define MAPDOUT 0x01b4c018
#define MAPDIN  0x01b4c01c

/* CPLD address definitions */
#define DM643_CPLD_BASE       0xa0000000
#define DM643_SYNC_BASE       0xb0000000
//#define DM643_FPGAFLASH_BASE  0x90040000
//#define DM643_FPGASDRAM_BASE  0x80000000

/* CPLD Register Indices */
#define DM643_OSDCTRL      0x10
#define DM643_THRESHLSB    0x11
#define DM643_THRESHMSB    0x12
#define DM643_ISR          0x13
#define DM643_IER          0x14
#define DM643_GPIODIR      0x15
#define DM643_GPIOSTAT     0x16
#define DM643_LED          0x17
#define DM643_FLASHPAGE    0x18
#define DM643_REVISION     0x1F

/* FPGA definitions 
#define DM643_FPGALEN      0x393d8
*/
/* I2C handle */
extern I2C_Handle DM643_I2C_hI2C;

/* GPIO handle */
extern GPIO_Handle DM643_GPIO_hGPIO;

/* Initialize all board APIs */
void DM643_init();

/* Read an 8-bit value from a CPLD register */
Uint8 DM643_rget(Int16 regnum);

/* Write an 8-bit value to a CPLD register */
void DM643_rset(Int16 regnum, Uint8 regval);

/* Spin in a delay loop for delay iterations */
void DM643_wait(Uint32 delay);

/* Spin in a delay loop for delay microseconds */
void DM643_waitusec(Uint32 delay);

/* Send a configuration file to the FPGA */
//void DM643_loadFpga(Uint32 fpgaaddr);

#ifdef __cplusplus
}
#endif

#endif
/* ======================================================================== */
/*  End of file:  dm643.h       		                                    */
/* ------------------------------------------------------------------------ */
/*             Copyright (c) 2005 Wintech Digital System Technology Corp.   */
/*                         All Rights Reserved.                             */
/* ======================================================================== */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -