DEVHIO_sio_read Function

Syntax

#include <kmc/hio/devhio_sio.h>

int DEVHIO_sio_read(
     int ch,
     void * buf,
     int length,
     int attr
);

Arguments

Name Description
in ch Channel number (from 0 to DEVHIO_COMM_MAX_CHANNEL-1).
out buf Receive buffer.
in length Length of the data to receive.
in attr Specifying DEVHIO_SIO_ATTR_NONE causes the function to block until either the specified amount of data is received or the device disconnects.
Specifying DEVHIO_SIO_ATTR_NOWAIT causes the operation to return immediately without blocking.

Return Values

Negative value: Error.
Zero or greater: Received data.

Description

Receives data via serial communication.

Revision History

2010/08/16
Initial version.

CONFIDENTIAL