ProSoft Technology MVI69E-LDM User Manual

Page 83

Advertising
background image

MVI69E-LDM ♦ "C" Programmable

Contents

Linux Application Development Module

Developer's Manual

ProSoft Technology, Inc.

Page 83 of 130

August 21, 2014

MVI69_SetSerialConfig

Syntax

int MVI69_SetSerialConfig (MVI69HANDLE handle,
MVI69SPCONFIG *spconfig);

Parameters

handle

handle returned by previous call to MVI69_Open

spconfig

pointer to structure of type MVI69SPCONFIG

Description
MVI69_SetSerialConfig sets the serial port configuration. This function overrides the serial
port configuration jumper setting. The port number and configuration are specified in the
structure spconfig.

handle must be a valid handle returned from MVI69_Open.

The MVI69SPCONFIG structure is defined as follows:

typedef struct tagMVI69SPCONFIG
{
int port_num; /* Port number (1 or 2) */
int port_cfg; /* Jumper position */
} MVI69SPCONFIG;

Return Value

MVI69_SUCCESS

the configuration information was read successfully

MVI69_ERR_NOACCESS

handle does not have access

Example

MVI69HANDLE handle;
MVI69SPCONFIG spconfig;

/* Set up port 2 for RS232*/
spconfig.port_num = 2;
spconfig.port_cfg = MVI69_SERIAL_CONFIG_RS232;
MVI69_SetSerialConfig (Handle, &spconfig);

See Also
MVI69_GetSerialConfig

Advertising