libosmocore
UNKNOWN
Osmocom core library
Toggle main menu visibility
Loading...
Searching...
No Matches
serial.h
Go to the documentation of this file.
1
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
22
23
#pragma once
24
25
#include <termios.h>
26
27
int
osmo_serial_init
(
const
char
*dev, speed_t baudrate);
28
int
osmo_serial_set_baudrate
(
int
fd, speed_t baudrate);
29
int
osmo_serial_set_custom_baudrate
(
int
fd,
int
baudrate);
30
int
osmo_serial_clear_custom_baudrate
(
int
fd);
31
int
osmo_serial_speed_t
(
unsigned
int
baudrate, speed_t *speed);
32
osmo_serial_init
int osmo_serial_init(const char *dev, speed_t baudrate)
Open serial device and does base init.
Definition
serial.c:54
osmo_serial_set_custom_baudrate
int osmo_serial_set_custom_baudrate(int fd, int baudrate)
Change current baudrate to a custom one using OS specific method.
Definition
serial.c:172
osmo_serial_speed_t
int osmo_serial_speed_t(unsigned int baudrate, speed_t *speed)
Convert unsigned integer value to speed_t.
Definition
serial.c:250
osmo_serial_set_baudrate
int osmo_serial_set_baudrate(int fd, speed_t baudrate)
Change current baudrate.
Definition
serial.c:158
osmo_serial_clear_custom_baudrate
int osmo_serial_clear_custom_baudrate(int fd)
Clear any custom baudrate.
Definition
serial.c:220
include
osmocom
core
serial.h
Generated by
1.17.0