libosmocore  0.9.3
Osmocom core library
include/osmocom/core/serial.h
Go to the documentation of this file.
00001 /*
00002  * serial.h
00003  *
00004  * Copyright (C) 2011  Sylvain Munaut <tnt@246tNt.com>
00005  *
00006  * All Rights Reserved
00007  *
00008  * This program is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License along
00019  * with this program; if not, write to the Free Software Foundation, Inc.,
00020  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00021  */
00022 
00031 #pragma once
00032 
00033 #include <termios.h>
00034 
00035 int osmo_serial_init(const char *dev, speed_t baudrate);
00036 int osmo_serial_set_baudrate(int fd, speed_t baudrate);
00037 int osmo_serial_set_custom_baudrate(int fd, int baudrate);
00038 int osmo_serial_clear_custom_baudrate(int fd);
00039