- introduced initRS232Finished and initRS232WithFlags

- allow empty terminator in readRS232TillTerm
This commit is contained in:
zolliker
2005-09-05 08:22:13 +00:00
parent 6070ad7b29
commit 69c79b207a
3 changed files with 45 additions and 7 deletions

View File

@@ -69,6 +69,8 @@ The following interface functions are provided:
int errorBufferLen);
int getRS232Timeout(prs232 self);
int initRS232(prs232 self);
int initRS232WithFlags(prs232 self, int flags);
int initRS232Finished(prs232 self);
void closeRS232(prs232 self);
prs232 createRS232(char *host, int iPort);
void KillRS232(void *pData);
@@ -103,6 +105,12 @@ directly followed by a read.
iCode.
\item[initRS232] tries to close and reopen the RS232 connection. This is
useful for the automatic fixing of communication problems encountered.
\item[initRS232WithFlags] the same as initRS232, but with flags. flags = 1:
do not block on connect (use initRS232Finished to check success).
flags=2: wait 1000 ms after last close or restart (workaround for a bug
in Lantronix terminal server). flags=3: both options. flags=0: no opitons.
\item[initRS232Finished] returns 0 when connect in progress, 1 when finished,
FAILEDCONNECT on failure.
\item[closeRS232] closes a network connection but does not delete the datastructure.
\item[createRS232] creates a new rs232 data structure with all
parameters at default values. The connection is NOT opened.