HALFRED  0.4.0
Data Structures | Typedefs
IOSerialDevice internals

Documentation on internal parts of IOSerial interface - mainly for port developers. More...

Detailed Description

Documentation on internal parts of IOSerial interface - mainly for port developers.

Internally, an IOSerialDevice is a pointer to a IOSerialDeviceDesc structure, that holds pointers to functions that implement the actual IOSerialDevice functionality. The port is responsible for providing a structure for each IOSerialDevice. This can be done by either defining the structures or by providing a "creator" and "destructor" functions that create and destroy such objects at runtime.

The IOSerialDevice is built on top of IODevice, meaning that the core IO functionality (writing, reading) is serviced as an IODevice, while additional functionality (baudrate setting, RTS/CTS etc.) is serviced by the IOSerialDevice. Speaking OOP this means that the IOSerialDevice is a specialization of the IODevice, which inherits some of it's functionality.

Data Structures

struct  IOSerialDeviceDesc
 

Typedefs

typedef struct IOSerialDeviceDescIOSerialDevice
 
typedef HALRESULT(* IOSerialCtrlFunc )(IOSerialDevice)
 
typedef HALRESULT(* IOSerialSetBaudrateFunc )(IOSerialDevice, unsigned int)
 
typedef unsigned int(* IOSerialGetBaudrateFunc )(IOSerialDevice)
 
typedef unsigned int(* IOSerialSetSignalFunc )(IOSerialDevice, bool)
 
typedef bool(* IOSerialGetSignalFunc )(IOSerialDevice)
 
typedef HALRESULT(* IOSerialSetFrameFormatFunc )(IOSerialDevice serial, IOSERIAL_NumberOfDataBits data_bits, IOSERIAL_Parity parity, IOSERIAL_NumberOfStopBits stop)
 
typedef HALRESULT(* IOSerialGetFrameFormatFunc )(IOSerialDevice serial, IOSERIAL_NumberOfDataBits *data_bits, IOSERIAL_Parity *parity, IOSERIAL_NumberOfStopBits *stop)
 
typedef HALRESULT(* IOSerialSetHandshakingFunc )(IOSerialDevice serial, IOSERIAL_Handshaking handshaking)
 
typedef IOSERIAL_Handshaking(* IOSerialGetHandshakingFunc )(IOSerialDevice serial)
 

Typedef Documentation

The actual definition of an IOSerialDevice type. This is actually a pointer to a private structure IOSerialDeviceDesc.

typedef HALRESULT(* IOSerialCtrlFunc)(IOSerialDevice)

IOSerial control function type.

typedef HALRESULT(* IOSerialSetBaudrateFunc)(IOSerialDevice, unsigned int)

IOSerial set baudrate function type.

typedef unsigned int(* IOSerialGetBaudrateFunc)(IOSerialDevice)

IOSerial get baudrate function type.

typedef unsigned int(* IOSerialSetSignalFunc)(IOSerialDevice, bool)

IOSerial set signal function type.

typedef bool(* IOSerialGetSignalFunc)(IOSerialDevice)

IOSerial get signal function type.

typedef HALRESULT(* IOSerialSetFrameFormatFunc)(IOSerialDevice serial, IOSERIAL_NumberOfDataBits data_bits, IOSERIAL_Parity parity, IOSERIAL_NumberOfStopBits stop)

IOSerial set frame format function type.

typedef HALRESULT(* IOSerialGetFrameFormatFunc)(IOSerialDevice serial, IOSERIAL_NumberOfDataBits *data_bits, IOSERIAL_Parity *parity, IOSERIAL_NumberOfStopBits *stop)

IOSerial get frame format function type.

typedef HALRESULT(* IOSerialSetHandshakingFunc)(IOSerialDevice serial, IOSERIAL_Handshaking handshaking)

IOSerial set handshaking function type.

typedef IOSERIAL_Handshaking(* IOSerialGetHandshakingFunc)(IOSerialDevice serial)

IOSerial get handshaking function type.