blob: 1640a6dae1617a31d5b83b426f5ae3e1c9b28ad8 [file] [log] [blame]
Sylvain Munautfe28ded2011-09-02 22:18:24 +02001/*
2 * serial.h
3 *
4 * Copyright (C) 2011 Sylvain Munaut <tnt@246tNt.com>
5 *
6 * All Rights Reserved
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
22
23/*! \defgroup serial Utility functions to deal with serial ports
24 * @{
25 */
26
27/*! \file serial.h
Katerina Barone-Adesic28c6a02013-02-15 13:27:59 +010028 * Osmocom serial port helpers
Sylvain Munautfe28ded2011-09-02 22:18:24 +020029 */
30
31#ifndef __OSMO_SERIAL_H__
32#define __OSMO_SERIAL_H__
33
34#include <termios.h>
35
36int osmo_serial_init(const char *dev, speed_t baudrate);
37int osmo_serial_set_baudrate(int fd, speed_t baudrate);
38int osmo_serial_set_custom_baudrate(int fd, int baudrate);
39int osmo_serial_clear_custom_baudrate(int fd);
40
Sylvain Munautdca7d2c2012-04-18 21:53:23 +020041/*! @} */
Sylvain Munautfe28ded2011-09-02 22:18:24 +020042
43#endif /* __OSMO_SERIAL_H__ */