Headers Index Help Within this page: Functions Constants Variables
This collection of functions contain system-dependent code used by the SerialPort package.
SerialPort - serial connections for Java
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.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Copyright (C) 2005 Martin C Gregorie
Contact Martin Gregorie at martin@gregorie.org
#include "sysdependent.h"
int decode_baud_rate(int baud);
Return the termios code for the baud rate. baud contains the baud rate as a numeric value. It returns the baud rate code required by termios code or -1 if the baud rate was invalid.
In: sysdependent.c
Return to the top
#include "sysdependent.h"
int set_termio(int fd, int baud, int dbits, char parity, int sbits, int debug);
Configure a serial port to use the requested values. The port must be open before this function is called. Set the port referenced by fd to operate at baud rate with dbits data bits (5-8), parity (N, E, O) and sbits stop bits (1,2).
Returns -1 on error and zero on success. Use set_termio_error() to retrieve the error description.
The internals of this function are highly system dependent. This is the Linux version.
In: sysdependent.c
Return to the top
#include "sysdependent.h"
char *set_termio_error();
Returns the description for the last error detected by set_termio().
In: sysdependent.c
Return to the top
Public constants were not declared.
Public variables were not declared.
Return to the top