2005-04-21 16:53:53 +02:00
|
|
|
#include "syslib.h"
|
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* sys_sdevio *
|
|
|
|
*===========================================================================*/
|
2006-06-20 10:45:04 +02:00
|
|
|
PUBLIC int sys_sdevio(req, port, proc_nr, buffer, count, offset)
|
|
|
|
int req; /* request: DIO_{IN,OUT}PUT_* */
|
2005-04-21 16:53:53 +02:00
|
|
|
long port; /* port address to read from */
|
2006-06-20 10:45:04 +02:00
|
|
|
endpoint_t proc_nr; /* process where buffer is */
|
2005-04-21 16:53:53 +02:00
|
|
|
void *buffer; /* pointer to buffer */
|
|
|
|
int count; /* number of elements */
|
2006-06-20 10:45:04 +02:00
|
|
|
vir_bytes offset; /* offset from grant */
|
2005-04-21 16:53:53 +02:00
|
|
|
{
|
|
|
|
message m_io;
|
|
|
|
int result;
|
|
|
|
|
|
|
|
m_io.DIO_REQUEST = req;
|
|
|
|
m_io.DIO_PORT = port;
|
2006-03-03 10:44:55 +01:00
|
|
|
m_io.DIO_VEC_ENDPT = proc_nr;
|
2005-04-21 16:53:53 +02:00
|
|
|
m_io.DIO_VEC_ADDR = buffer;
|
|
|
|
m_io.DIO_VEC_SIZE = count;
|
2006-06-20 10:45:04 +02:00
|
|
|
m_io.DIO_OFFSET = offset;
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
return(_taskcall(SYSTASK, SYS_SDEVIO, &m_io));
|
|
|
|
}
|
|
|
|
|