libosmocore 1.11.0.30-c17053.202507072026
Osmocom core library
Loading...
Searching...
No Matches

Utility functions to deal with serial ports. More...

#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <termios.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <osmocom/core/serial.h>

Macros

#define dbg_perror(x)   do { } while (0)
 

Functions

int osmo_serial_init (const char *dev, speed_t baudrate)
 Open serial device and does base init.
 
static int _osmo_serial_set_baudrate (int fd, speed_t baudrate)
 
int osmo_serial_set_baudrate (int fd, speed_t baudrate)
 Change current baudrate.
 
int osmo_serial_set_custom_baudrate (int fd, int baudrate)
 Change current baudrate to a custom one using OS specific method.
 
int osmo_serial_clear_custom_baudrate (int fd)
 Clear any custom baudrate.
 
int osmo_serial_speed_t (unsigned int baudrate, speed_t *speed)
 Convert unsigned integer value to speed_t.
 

Detailed Description

Utility functions to deal with serial ports.