Main Page | Class List | Directories | File List | Class Members | File Members

serial.h File Reference

Communication with serial RS232 interface on Linux. More...

#include "history.h"

Go to the source code of this file.

Defines

#define __ser_core_h   1
#define ser_verbose   0
#define ser_noverbose   1

Functions

serdev * serial_open (char *dev, int stty_baud, int *err)
 initializer, has t be called before the serial port can be used
void serial_close (serdev *device)
 destrucor, has to be called after the seraial port has been used
int serial_reopen (serdev *device)
 reopens and reconigures the unix deice file representing the serial port
int serial_read (serdev *device, void(*intputproc)(const char *))
 tryes to read somethng from the serial port
int serial_read_timeout (serdev *device, int timeout, char *ergstr)
int serial_wait_lines (serdev *device, int nr, int timeout)
int serial_write (serdev *device, const char *commandstr, void(*outputproc)(const char *))
void serial_verbose (serdev *device, int nooutput)
int serial_write_byte (serdev *device, int byte)


Detailed Description

Communication with serial RS232 interface on Linux.

Copyright (C) 2001-2003 Oliver Cordes (see source file for email)

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, version 2.


Function Documentation

void serial_close serdev *  device  ) 
 

destrucor, has to be called after the seraial port has been used

Parameters:
device the serial device obect represening the serial port
Returns:
void
This function is the destrucor, it has to be called after the serial port has been used

serdev* serial_open char *  dev,
int  stty_baud,
int *  err
 

initializer, has t be called before the serial port can be used

Parameters:
dev the unix filename of the serial ort to be used
stty_baud the baud rate to be used
err and integer in which an errorcode will be written
Returns:
a pointer to an object represening the serial port
This function is the initilaizer of the serial port object

int serial_read serdev *  device,
void(*)(const char *)  inputproc
 

tryes to read somethng from the serial port

Parameters:
serdev the serial port object representing the serial port
īnputproc a function to be called if smething was read, the string read will be passed t this funtion as a parameter
Returns:
int errorcode
This function tryes to read somethng from the serial port. It is usally called within a thread context in a polling manner.

int serial_reopen serdev *  device  ) 
 

reopens and reconigures the unix deice file representing the serial port

Parameters:
device the serial device obect represening the serial port
Returns:
void
This function reopens and reconigures the unix deice file representing the serial port. It uses the confuration information store in device


Generated on Fri Dec 16 22:23:39 2005 for gboccia by  doxygen 1.4.2