Lionel Sambuc 433d6423c3 New sources layout
Change-Id: Ic716f336b7071063997cf5b4dae6d50e0b4631e9
2014-07-31 16:00:30 +02:00

22 lines
649 B
C

#include "syslib.h"
/*===========================================================================*
* sys_in *
*===========================================================================*/
int sys_in(port, value, type)
int port; /* port address to read from */
u32_t *value; /* pointer where to store value */
int type; /* byte, word, long */
{
message m_io;
int result;
m_io.m_lsys_krn_sys_devio.request = _DIO_INPUT | type;
m_io.m_lsys_krn_sys_devio.port = port;
result = _kernel_call(SYS_DEVIO, &m_io);
*value = m_io.m_krn_lsys_sys_devio.value;
return(result);
}