
63 RSB-4210 User Manual
Chapter 3 Software Functionality
Returns the ldisc reference and allows the ldisc to be closed. Returning the reference
takes away your right to call the ldisc functions until you take a new reference.
ldisc = tty_ldisc_ref_wait(tty);
Performs the same function as tty_ldisc_ref except that it will wait for an ldisc change
to complete and then return a reference to the new ldisc.
While these functions are slightly slower than the old code they should have minimal
impact as most receive logic uses the flip buffers and they only need to take a refer-
ence when they push bits up through the driver.
3.11.3.3 RS422/RS485 Tips
Transmit RS422/RS458 as soon as setting GPIO 61/62 "high". Receive RS485 as
soon as setting GPIO 61/63 low.
3.11.3.4 Software Tips
This program is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
#include <stdarg.h>
#include <termio.h>
#include <sys/timeb.h>
#include <pthread.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include <errno.h>
#include <stdlib.h>
#define DEFAULT_RATE 115200;
unsigned int get_time(void)
{
struct timeb tb;
unsigned int realNow;
Caution! The ldisc->open(), ldisc->close() and driver->set_ldisc functions are
called with the ldisc unavailable. Thus tty_ldisc_ref will fail in this situa-
tion if used within these functions. Ldisc and driver code calling its own
functions must be careful in this case.
Kommentare zu diesen Handbüchern