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

📄 dm642.h

📁 这是DM642(EVM开发板)的IO控制原代码,用CCS3.3可以打开,调试通过.
💻 H
字号:
/*
 *  Copyright 2005 by SEED.
 *  All rights reserved. Property of SEED.
 */

/*
 *  ======== seeddm642.h ========
 *
 *  This file contains DPM642 board initialization functions.
 *
 *  DM642 BSL Version 1.00 - 08/02/2005
 *
 */

#ifndef DM642_
#define DM642_

#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

/* CPLD address definitions */
#define DM642_CPLD_BASE       0x90080000
/*ATA address definitions*/
#define DM642_ATACS0          0xA0000000
#define DM642_ATACS1          0xA0000080

/* CPLD Register Indices */
#define DM642_LED       	0x40   //write only
#define DM642_IOOUT0		0x48   //write only
#define DM642_IOOUT1    	0x50   //write only
#define DM642_UARTSET		0x58   //write only
#define DM642_FLASHPAGE		0x60   //write only
#define	DM642_KEY			0x68   //read only
#define	DM642_IOINPUT0		0x70   //read only
#define	DM642_IOINPUT1		0x78   //read only
#define	DM642_FLAG			0x38   //read only

/* I2C handle */
extern I2C_Handle DM642_I2C_hI2C;

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

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

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

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

void DPM642_init();


#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

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