IgH EtherCAT Master  1.5.2
ectty.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * $Id$
4 *
5 * Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
6 *
7 * This file is part of the IgH EtherCAT master userspace library.
8 *
9 * The IgH EtherCAT master userspace library is free software; you can
10 * redistribute it and/or modify it under the terms of the GNU Lesser General
11 * Public License as published by the Free Software Foundation; version 2.1
12 * of the License.
13 *
14 * The IgH EtherCAT master userspace library is distributed in the hope that
15 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
16 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with the IgH EtherCAT master userspace library. If not, see
21 * <http://www.gnu.org/licenses/>.
22 *
23 * ---
24 *
25 * The license mentioned above concerns the source code only. Using the
26 * EtherCAT technology and brand is only permitted in compliance with the
27 * industrial property and similar rights of Beckhoff Automation GmbH.
28 *
29 *****************************************************************************/
30
40/*****************************************************************************/
41
42#ifndef __ECTTY_H__
43#define __ECTTY_H__
44
45#include <linux/termios.h>
46
47/******************************************************************************
48 * Data types
49 *****************************************************************************/
50
51struct ec_tty;
52typedef struct ec_tty ec_tty_t;
56typedef struct {
57 int (*cflag_changed)(void *, tcflag_t);
62
63/******************************************************************************
64 * Global functions
65 *****************************************************************************/
66
75 const ec_tty_operations_t *ops,
76 void *cb_data
77 );
78
79/******************************************************************************
80 * TTY interface methods
81 *****************************************************************************/
82
86 ec_tty_t *tty
87 );
88
96unsigned int ectty_tx_data(
97 ec_tty_t *tty,
98 uint8_t *buffer,
99 size_t size
100 );
101
105 ec_tty_t *tty,
106 const uint8_t *buffer,
107 size_t size
108 );
109
110/*****************************************************************************/
111
114#endif
void ectty_free(ec_tty_t *tty)
Releases a virtual TTY interface.
unsigned int ectty_tx_data(ec_tty_t *tty, uint8_t *buffer, size_t size)
Reads data to send from the TTY interface.
void ectty_rx_data(ec_tty_t *tty, const uint8_t *buffer, size_t size)
Pushes received data to the TTY interface.
ec_tty_t * ectty_create(const ec_tty_operations_t *ops, void *cb_data)
Create a virtual TTY interface.
struct ec_tty ec_tty_t
Definition: ectty.h:52
Operations on the virtual TTY interface.
Definition: ectty.h:56