Svcsetopenblock() - VeriFone MX800 series Programmer's Manual

Hide thumbs Also See for MX800 series:
Table of Contents

Advertisement

S
F
ERVICE
UNCTIONS

svcSetOpenBlock()

svcSetOpenBlock()
162
M
X
800 S
P
ERIES
ROGRAMMERS
The svcSetOpenBlock() function accepts a pointer to an Open Block structure
that has been populated by the application to the desired port settings. This
function then takes the open block settings and properly maps them to Linux serial
port settings and sets the port to these values. The port to be set is described by
the fd parameter. The function will automatically configure the port according to
the open block structure values passed in. If the open block format variable is set
to Fmt_auto, then the port is automatically configured to use RTS/CTS flow
control and will also hold the RTS line asserted. All ports configured with
Fmt_auto will hold the RTS line asserted regardless if the Fmt_RTS value is
specified or not. This is required for all ports to transmit and receive data correctly.
The application is not required to specifically set Fmt_RTS if Fmt_auto is
specified. However, if this function is not used to configure a COM port on the
x
M
800 series terminal and the application wants to enable flow control, it is the
responsibility of the application to issue the proper Linux calls to set flow control
AND assert RTS in order for COM port communication to function properly. If RTS
is not asserted when flow control is desired, the port will not work. If flow control is
not desired, but RTS asserted is, then Fmt_RTS should only be specified. It is
highly recommended that applications use this function to configure a COM port to
desired settings.
Prototype
short svcSetOpenBlock(int fd, struct Opn_Blk *pOpenBlock)
Parameters
File descriptor returned when opening a serial port with either
fd
open() or ecrOpen().
Pointer to Open Block structure that has been populated with
*pOpenBlock
desired settings.
Return Values
The function returns 0 on success or a negative errno value if unsuccessful.
G
UIDE

Advertisement

Table of Contents
loading

Table of Contents