/*********************************************************
 *
 * This source code is part of the Carnegie Mellon Robot
 * Navigation Toolkit (CARMEN)
 *
 * CARMEN Copyright (c) 2002 Michael Montemerlo, Nicholas
 * Roy, and Sebastian Thrun
 *
 * CARMEN 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.
 *
 * CARMEN 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 CARMEN; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place, 
 * Suite 330, Boston, MA  02111-1307 USA
 *
 ********************************************************/


/** @addtogroup global libserial **/
// @{

/** \file serial.h
 * \brief Serial library.
 *
 * Serial library.
 **/


#ifndef CARMEN_SERIAL_H
#define CARMEN_SERIAL_H

#ifdef __cplusplus
extern "C" {
#endif

int carmen_serial_connect(int *dev_fd, char *dev_name);

void carmen_serial_configure(int dev_fd, int baudrate, char *parity);

long carmen_serial_numChars(int dev_fd);

int carmen_serial_ClearInputBuffer(int dev_fd);

int carmen_serial_writen(int dev_fd, unsigned char *buf, int nChars);

int carmen_serial_readn(int dev_fd, unsigned char *buf, int nChars);

#ifdef __cplusplus
}
#endif

#endif
// @}
