source: trunk/minix/lib/syslib/sys_in.c@ 10

Last change on this file since 10 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 636 bytes
RevLine 
[9]1#include "syslib.h"
2
3/*===========================================================================*
4 * sys_in *
5 *===========================================================================*/
6PUBLIC int sys_in(port, value, type)
7int port; /* port address to read from */
8unsigned long *value; /* pointer where to store value */
9int type; /* byte, word, long */
10{
11 message m_io;
12 int result;
13
14 m_io.DIO_TYPE = type;
15 m_io.DIO_REQUEST = DIO_INPUT;
16 m_io.DIO_PORT = port;
17
18 result = _taskcall(SYSTASK, SYS_DEVIO, &m_io);
19 *value = m_io.DIO_VALUE;
20 return(result);
21}
22
Note: See TracBrowser for help on using the repository browser.