HALFRED  0.4.0
Data Fields
IODeviceDesc Struct Reference

Detailed Description

IODevice descriptor type definition. An IODevice object is actually a pointer to such structure.

#include <hali_iodevice.h>

Data Fields

HALRESULT(* Init )(IODevice iodevice)
 
HALRESULT(* Deinit )(IODevice iodevice)
 
HALRESULT(* IOCtl )(IODevice iodevice, unsigned int request, va_list args)
 
HALRESULT(* EnableWrite )(IODevice iodevice)
 
HALRESULT(* DisableWrite )(IODevice iodevice)
 
HALRESULT(* EnableRead )(IODevice iodevice)
 
HALRESULT(* DisableRead )(IODevice iodevice)
 
size_t(* GetReadCount )(IODevice iodevice)
 
size_t(* GetWriteSpace )(IODevice iodevice)
 
size_t(* Write )(IODevice iodevice, const void *data, size_t size)
 
size_t(* Read )(IODevice iodevice, void *data, size_t size)
 

Field Documentation

HALRESULT(* IODeviceDesc::Init)(IODevice iodevice)

Initializes an IODevice, preparing it for operation. This function is directly called by IODEV_Init

Parameters
iodeviceIODevice to initialize
Returns
HALRESULT_OK on success. Other values indicate error - in such case the IODevice is not usable. (see HALRESULT).
HALRESULT(* IODeviceDesc::Deinit)(IODevice iodevice)

Deitializes an IODevice, preparing it for operation. This function is directly called by IODEV_Deinit

Parameters
iodeviceIODevice to deinitialize
Returns
HALRESULT_OK on success. Other values indicate error (see HALRESULT).
HALRESULT(* IODeviceDesc::IOCtl)(IODevice iodevice, unsigned int request, va_list args)

Low level control function that allows to pass additional, possibly non-portable requests to an IODevice. This is the actual implementation of a IODEV_IOCtl function.

Parameters
iodeviceIODevice
requestrequest code
argsvariable argument list
Returns
HALRESULT_OK on success. Other values indicate error (see HALRESULT).
HALRESULT(* IODeviceDesc::EnableWrite)(IODevice iodevice)

Enables transmit path of an IODevice.

Parameters
iodeviceIODevice
Returns
HALRESULT_OK on success. Other values indicate error (see HALRESULT).
HALRESULT(* IODeviceDesc::DisableWrite)(IODevice iodevice)

Disables transmit path of an IODevice.

Parameters
iodeviceIODevice
Returns
HALRESULT_OK on success. Other values indicate error (see HALRESULT).
HALRESULT(* IODeviceDesc::EnableRead)(IODevice iodevice)

Enables receive path of an IODevice.

Parameters
iodeviceIODevice
Returns
HALRESULT_OK on success. Other values indicate error (see HALRESULT).
HALRESULT(* IODeviceDesc::DisableRead)(IODevice iodevice)

Disables receive path of an IODevice.

Parameters
iodeviceIODevice
Returns
HALRESULT_OK on success. Other values indicate error (see HALRESULT).
size_t(* IODeviceDesc::GetReadCount)(IODevice iodevice)

Gets the number of bytes that are ready to be read from an IODevice.

Parameters
iodeviceIODevice
Returns
number of bytes that can be read
size_t(* IODeviceDesc::GetWriteSpace)(IODevice iodevice)

Gets the number of bytes that can be written to an IODevice.

Parameters
iodeviceIODevice
Returns
number of bytes that can be written
size_t(* IODeviceDesc::Write)(IODevice iodevice, const void *data, size_t size)

Writes data to an IODevice.

Parameters
iodeviceIODevice
datadata to write
sizesize in bytes
Returns
actual number of bytes written
size_t(* IODeviceDesc::Read)(IODevice iodevice, void *data, size_t size)

Reads data from an IODevice.

Parameters
iodeviceIODevice
dataplace where to store data
sizesize in bytes
Returns
actual number of bytes read

The documentation for this struct was generated from the following file: