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

📄 iomv.c

📁 microwindows移植到S3C44B0的源码
💻 C
字号:
/*  * This file is subject to the terms and conditions of the GNU General Public * License.  See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 2000-2002 Silicon Graphics, Inc. All rights reserved. */#include <asm/io.h>#if 1	/* ##jh */#ifdef CONFIG_IA64_SGI_SN1#define mmiob sn1_mmiob#else#define mmiob sn2_mmiob#endifextern void mmiob(void);#endif /* ##jh */extern void * sn_io_addr(unsigned long port); /* defined in sn[12]/iomv.c *//** * sn_inb - read a byte from a port * @port: port to read from * * Reads a byte from @port and returns it to the caller. */unsigned intsn_inb (unsigned long port){	volatile unsigned char *addr = sn_io_addr(port);	unsigned char ret;	ret = *addr;	__ia64_mf_a();	return ret;}/** * sn_inw - read a word from a port * @port: port to read from * * Reads a word from @port and returns it to the caller. */unsigned intsn_inw (unsigned long port){	volatile unsigned short *addr = sn_io_addr(port);	unsigned short ret;	ret = *addr;	__ia64_mf_a();	return ret;}/** * sn_inl - read a word from a port * @port: port to read from * * Reads a word from @port and returns it to the caller. */unsigned intsn_inl (unsigned long port){	volatile unsigned int *addr = sn_io_addr(port);	unsigned int ret;	ret = *addr;	__ia64_mf_a();	return ret;}/** * sn_outb - write a byte to a port * @port: port to write to * @val: value to write * * Writes @val to @port. */voidsn_outb (unsigned char val, unsigned long port){	volatile unsigned char *addr = sn_io_addr(port);	*addr = val;	mmiob();}/** * sn_outw - write a word to a port * @port: port to write to * @val: value to write * * Writes @val to @port. */voidsn_outw (unsigned short val, unsigned long port){	volatile unsigned short *addr = sn_io_addr(port);	*addr = val;	mmiob();}/** * sn_outl - write a word to a port * @port: port to write to * @val: value to write * * Writes @val to @port. */voidsn_outl (unsigned int val, unsigned long port){	volatile unsigned int *addr = sn_io_addr(port);	*addr = val;	mmiob();}

⌨️ 快捷键说明

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