00001 /****************************************************************************** 00002 * 00003 * $Id$ 00004 * 00005 * Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH 00006 * 00007 * This file is part of the IgH EtherCAT master userspace library. 00008 * 00009 * The IgH EtherCAT master userspace library is free software; you can 00010 * redistribute it and/or modify it under the terms of the GNU Lesser General 00011 * Public License as published by the Free Software Foundation; version 2.1 00012 * of the License. 00013 * 00014 * The IgH EtherCAT master userspace library is distributed in the hope that 00015 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied 00016 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU Lesser General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU Lesser General Public License 00020 * along with the IgH EtherCAT master userspace library. If not, see 00021 * <http://www.gnu.org/licenses/>. 00022 * 00023 * --- 00024 * 00025 * The license mentioned above concerns the source code only. Using the 00026 * EtherCAT technology and brand is only permitted in compliance with the 00027 * industrial property and similar rights of Beckhoff Automation GmbH. 00028 * 00029 *****************************************************************************/ 00030 00040 /*****************************************************************************/ 00041 00042 #ifndef __ECTTY_H__ 00043 #define __ECTTY_H__ 00044 00045 #include <linux/termios.h> 00046 00047 /****************************************************************************** 00048 * Data types 00049 *****************************************************************************/ 00050 00051 struct ec_tty; 00052 typedef struct ec_tty ec_tty_t; 00056 typedef struct { 00057 int (*cflag_changed)(void *, tcflag_t); 00061 } ec_tty_operations_t; 00062 00063 /****************************************************************************** 00064 * Global functions 00065 *****************************************************************************/ 00066 00074 ec_tty_t *ectty_create( 00075 const ec_tty_operations_t *ops, 00076 void *cb_data 00077 ); 00078 00079 /****************************************************************************** 00080 * TTY interface methods 00081 *****************************************************************************/ 00082 00085 void ectty_free( 00086 ec_tty_t *tty 00087 ); 00088 00096 unsigned int ectty_tx_data( 00097 ec_tty_t *tty, 00098 uint8_t *buffer, 00099 size_t size 00100 ); 00101 00104 void ectty_rx_data( 00105 ec_tty_t *tty, 00106 const uint8_t *buffer, 00107 size_t size 00108 ); 00109 00110 /*****************************************************************************/ 00111 00114 #endif
1.5.6