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

📄 opb_lcd_controller.h

📁 spartan3系列fpga opb模式下lcd液晶屏控制代码
💻 H
字号:
//////////////////////////////////////////////////////////////////////////////
//
// ***************************************************************************
// **                                                                       **
// ** Copyright (c) 2004 Xilinx, Inc. All Rights Reserved.                  **
// **                                                                       **
// ** You may copy and modify these files for your own internal use solely  **
// ** with Xilinx programmable logic devices and Xilinx EDK system or       **
// ** create IP modules solely for Xilinx programmable logic devices and    **
// ** Xilinx EDK system. No rights are granted to distribute any files      **
// ** unless they are distributed in Xilinx programmable logic devices.     **
// **                                                                       **
// ***************************************************************************
//
//////////////////////////////////////////////////////////////////////////////
// Filename:          D:\Data\ppc_espw_opb_mem_controller_custom_ip\drivers\opb_lcd_controller_v1_00_a\src\opb_lcd_controller.h
// Version:           1.00.a
// Description:       opb_lcd_controller Driver Header File
// Date:              Sat Aug 21 11:28:31 2004 (by Create and Import Peripheral Wizard)
//////////////////////////////////////////////////////////////////////////////

#ifndef OPB_LCD_CONTROLLER_H
#define OPB_LCD_CONTROLLER_H

/***************************** Include Files *******************************/

#include "xbasic_types.h"
#include "xio.h"

/************************** Constant Definitions ***************************/

#define OPB_LCD_CONTROLLER_USER_SLAVE_SPACE_OFFSET (0x00000000)
#define OPB_LCD_CONTROLLER_SLAVE_REG0_OFFSET (OPB_LCD_CONTROLLER_USER_SLAVE_SPACE_OFFSET + 0x00000000)


/***************** Macros (Inline Functions) Definitions *******************/

/**
 *
 * Write a value to a OPB_LCD_CONTROLLER register. A 32 bit write is performed.
 * If the component is implemented in a smaller width, only the least
 * significant data is written.
 *
 * @param   BaseAddress is the base address of the OPB_LCD_CONTROLLER device.
 * @param   RegOffset is the register offset from the base to write to.
 * @param   Data is the data written to the register.
 *
 * @return  None.
 *
 * @note    None.
 *
 * C-style signature:
 * 	void OPB_LCD_CONTROLLER_mWriteReg(Xuint32 BaseAddress, unsigned RegOffset, Xuint32 Data)
 *
 */
#define OPB_LCD_CONTROLLER_mWriteReg(BaseAddress, RegOffset, Data) \
 	XIo_Out32((BaseAddress) + (RegOffset), (Xuint32)(Data))

/**
 *
 * Read a value from a OPB_LCD_CONTROLLER register. A 32 bit read is performed.
 * If the component is implemented in a smaller width, only the least
 * significant data is read from the register. The most significant data
 * will be read as 0.
 *
 * @param   BaseAddress is the base address of the OPB_LCD_CONTROLLER device.
 * @param   RegOffset is the register offset from the base to write to.
 *
 * @return  Data is the data from the register.
 *
 * @note    None.
 *
 * C-style signature:
 * 	Xuint32 OPB_LCD_CONTROLLER_mReadReg(Xuint32 BaseAddress, unsigned RegOffset)
 *
 */
#define OPB_LCD_CONTROLLER_mReadReg(BaseAddress, RegOffset) \
 	XIo_In32((BaseAddress) + (RegOffset))

/************************** Function Prototypes ****************************/


#endif // OPB_LCD_CONTROLLER_H


/******************************************************************************
* Function name         :  lcd.h
* returns               :  
* Created by            :  Nasser Poureh 
* Date Created          :  10/25/02
* Company				:  Insight Electronics
* Description           :  lcd header file
* Notes                 :  
******************************************************************************/

extern void lcd_init(unsigned int base_addr);
extern void lcd_write(unsigned int base_addr, char *s);
extern void lcd_clear(unsigned int base_addr);
extern void lcd_line(unsigned int base_addr, int line);
extern void _wait(int loop_count);

⌨️ 快捷键说明

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