| Line | |
|---|
| 1 | #include "syslib.h"
|
|---|
| 2 |
|
|---|
| 3 | /*===========================================================================*
|
|---|
| 4 | * sys_sdevio *
|
|---|
| 5 | *===========================================================================*/
|
|---|
| 6 | PUBLIC int sys_sdevio(req, port, type, proc_nr, buffer, count)
|
|---|
| 7 | int req; /* request: DIO_INPUT/ DIO_OUTPUT */
|
|---|
| 8 | long port; /* port address to read from */
|
|---|
| 9 | int type; /* byte, word, long */
|
|---|
| 10 | int proc_nr; /* process where buffer is */
|
|---|
| 11 | void *buffer; /* pointer to buffer */
|
|---|
| 12 | int count; /* number of elements */
|
|---|
| 13 | {
|
|---|
| 14 | message m_io;
|
|---|
| 15 | int result;
|
|---|
| 16 |
|
|---|
| 17 | m_io.DIO_REQUEST = req;
|
|---|
| 18 | m_io.DIO_TYPE = type;
|
|---|
| 19 | m_io.DIO_PORT = port;
|
|---|
| 20 | m_io.DIO_VEC_ENDPT = proc_nr;
|
|---|
| 21 | m_io.DIO_VEC_ADDR = buffer;
|
|---|
| 22 | m_io.DIO_VEC_SIZE = count;
|
|---|
| 23 |
|
|---|
| 24 | return(_taskcall(SYSTASK, SYS_SDEVIO, &m_io));
|
|---|
| 25 | }
|
|---|
| 26 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.