SELKIELogger  1.0.0
serial.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Swansea University
3  *
4  * This file is part of the SELKIELogger suite of tools.
5  *
6  * SELKIELogger is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the Free
8  * Software Foundation, either version 3 of the License, or (at your option)
9  * any later version.
10  *
11  * SELKIELogger is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14  * more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this SELKIELogger product.
18  * If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef SELKIELoggerBase_Serial
22 #define SELKIELoggerBase_Serial
23 
34 int openSerialConnection(const char *port, const int baudRate);
35 
37 int baud_to_flag(const int rate);
38 
40 int flag_to_baud(const int flag);
42 #endif
int openSerialConnection(const char *port, const int baudRate)
Open a serial connection at a given baud rate.
Definition: serial.c:44
int baud_to_flag(const int rate)
Convert a numerical baud rate to termios flag.
Definition: serial.c:100
int flag_to_baud(const int flag)
Convert a termios baud rate flag to a numerical value.
Definition: serial.c:166