00001 #include "syslib.h" 00002 00003 /*===========================================================================* 00004 * sys_in * 00005 *===========================================================================*/ 00006 PUBLIC int sys_in(port, value, type) 00007 int port; /* port address to read from */ 00008 unsigned long *value; /* pointer where to store value */ 00009 int type; /* byte, word, long */ 00010 { 00011 message m_io; 00012 int result; 00013 00014 m_io.DIO_TYPE = type; 00015 m_io.DIO_REQUEST = DIO_INPUT; 00016 m_io.DIO_PORT = port; 00017 00018 result = _taskcall(SYSTASK, SYS_DEVIO, &m_io); 00019 *value = m_io.DIO_VALUE; 00020 return(result); 00021 } 00022
1.4.6