File: serial.h

package info (click to toggle)
linuxptp 4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,536 kB
  • sloc: ansic: 26,119; sh: 92; makefile: 87
file content (19 lines) | stat: -rw-r--r-- 586 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/**
 * @file serial.h
 * @note Copyright (C) 2020 Richard Cochran <richardcochran@gmail.com>
 * @note SPDX-License-Identifier: GPL-2.0+
 */
#ifndef HAVE_SERIAL_H
#define HAVE_SERIAL_H

/**
 * Opens a serial port device.
 * @param name		Serial port device to open.
 * @param bps		Baud rate in bits per second.
 * @param icrnl		Pass 1 to map CR to NL on input, zero otherwise.
 * @param hwfc		Pass 1 to enable hardware flow control, zero otherwise.
 * @return		An open file descriptor on success, -1 otherwise.
 */
int serial_open(const char *name, int bps, int icrnl, int hwfc);

#endif