📄 w90n745_ebi2.h
字号:
/****************************************************************************
* *
* Copyright (c) 2006 - 2007 GTM Electronics Corp. All rights reserved. *
* *
***************************************************************************/
/****************************************************************************
*
* FILENAME
* w90n745_ebi2.h
*
* VERSION
* 1.0
*
* DESCRIPTION
* This file contains PreDefined data types for driver of ebi 2 Module
* !-xxx is USE Bank 2-!
* DATA STRUCTURES
* None
*
* FUNCTIONS
* None
*
* HISTORY
*
* 2007/12/12 Ver 1.0 Created by gtm ymy
* REMARK
* None
**************************************************************************/
#ifndef _W90N745_EBI2_H_
#define _W90N745_EBI2_H_
#include <asm/ioctl.h>
//ALL IS FIXED
/* Define constants for use external IO in service parameters. */
#define EXT0 0
#define EXT1 1
#define EXT2 2
#define EXT3 3
#define SIZE_256K 4
#define SIZE_512K 5
#define SIZE_1M 6
#define SIZE_2M 7
#define SIZE_4M 8
#define SIZE_8M 9
#define SIZE_16M 10
#define SIZE_32M 11
#define BUS_DISABLE 12
#define BUS_BIT_8 13
#define BUS_BIT_16 14
#define BUS_BIT_32 15
#define AHB_IO_BASE 0xFFF00000
#define APB_IO_BASE 0xFFF80000
//地址
//EBI Config bits FIXED
#define EXT0_BASS 0x70000000//NAND
#define EXT1_BASS 0x73000000//LCM Use it
#define EXT2_BASS 0x74000000//LED Use it
#define EXT3_BASS 0x78000000//Resersed
#define EXT0CON ((AHB_IO_BASE+0x1018)) /* External I/O 0 control register */
#define EXT1CON ((AHB_IO_BASE+0x101C)) /* External I/O 1 control register */ //LCM Use it
#define EXT2CON ((AHB_IO_BASE+0x1020)) /* External I/O 2 control register */ //Modified error(0x0020):2007-12-24
#define EXT3CON ((AHB_IO_BASE+0x1024)) /* External I/O 3 control register */
#define UINT32 unsigned int
#ifndef VPint
#define VPint *(volatile unsigned int *)
#define VPshort *(volatile unsigned short *)
#define VPchar *(volatile unsigned char *)
#endif
#define outpb(r,v) (VPchar(r)=(v))
#define inpb(r) (VPchar(r))
#define outpw(r,v) (VPint(r)=(v))
#define inpw(r) (VPint(r))
//2007-12-22 add No122
#define LED_BASE_ADDR EXT2_BASS
/*IOCTLs*/
static int ebi2ledc_init(void);
static int ebi2ledc_ioctl(struct inode *inode, struct file *filp,unsigned int cmd, unsigned long arg);
static int ebi2ledc_open(struct inode *inode,struct file *filp);static int ebi2ledc_close(struct inode *inode,struct file *filp);
static int ebi2ledc_write(struct file *filp, const char *buff, size_t count, loff_t *f_pos);
static int ebi2ledc_read(struct file *flip,char * buff,size_t count, loff_t * f_pos);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -