custom message type for SYS_DEVIO

This commit is contained in:
Ben Gras
2014-07-26 13:53:55 +02:00
committed by Lionel Sambuc
parent fce93dad32
commit 3610b3b1a6
5 changed files with 57 additions and 24 deletions

View File

@@ -11,11 +11,11 @@ int type; /* byte, word, long */
message m_io;
int result;
m_io.DIO_REQUEST = _DIO_INPUT | type;
m_io.DIO_PORT = port;
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.DIO_VALUE;
*value = m_io.m_krn_lsys_sys_devio.value;
return(result);
}

View File

@@ -10,9 +10,9 @@ int type; /* byte, word, long */
{
message m_io;
m_io.DIO_REQUEST = _DIO_OUTPUT | type;
m_io.DIO_PORT = port;
m_io.DIO_VALUE = value;
m_io.m_lsys_krn_sys_devio.request = _DIO_OUTPUT | type;
m_io.m_lsys_krn_sys_devio.port = port;
m_io.m_lsys_krn_sys_devio.value = value;
return _kernel_call(SYS_DEVIO, &m_io);
}