IEC 61131-3 C Tools User Manual


Add to my manuals
501 Pages

advertisement

IEC 61131-3 C Tools User Manual | Manualzz

IEC 61131-3 C Tools Function Specifications

get_port

Get Serial Port Configuration

Syntax

#include <ctools.h> struct pconfig *get_port(FILE *stream, struct pconfig *settings);

Description

The get_port function gets the serial port configuration for the stream. If stream does not point to a valid serial port the function has no effect.

The get_port function copies the serial port settings into the structure pointed to by settings and returns a pointer to the structure.

Notes

Refer to the Overview of Functions section for detailed information on serial ports.

Refer to the Structure and Types section for a description of the fields in the

pconfig structure.

See Also

set_port

Example

}

#include <ctools.h> void main(void)

{ struct pconfig settings; get_port(com1, &settings); printf("Baud rate: %d\r\n", settings.baud); printf("Duplex: %d\r\n", settings.duplex);

Document (Version 2.50) 5/12/2011 201 201

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

advertisement

Table of contents