sys_in.c

来自「minix操作系统最新版本(3.1.1)的源代码」· C语言 代码 · 共 23 行

C
23
字号
#include "syslib.h"/*===========================================================================* *                                sys_in				     * *===========================================================================*/PUBLIC int sys_in(port, value, type)int port; 				/* port address to read from */unsigned long *value;			/* pointer where to store value */int type;				/* byte, word, long */{    message m_io;    int result;    m_io.DIO_TYPE = type;    m_io.DIO_REQUEST = DIO_INPUT;    m_io.DIO_PORT = port;    result = _taskcall(SYSTASK, SYS_DEVIO, &m_io);    *value = m_io.DIO_VALUE;    return(result);}

⌨️ 快捷键说明

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