3 * $Id: tx-serial-unix.h,v 1.2 2002/01/30 09:25:15 mdw Exp $
5 * Unix/POSIX serial port transport
7 * (c) 2001 Mark Wooding
10 /*----- Licensing notice --------------------------------------------------*
12 * This file is part of Jog: Programming for a jogging machine.
14 * Jog is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * Jog is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with Jog; if not, write to the Free Software Foundation,
26 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 #ifndef TX_SERIAL_UNIX_H
30 #define TX_SERIAL_UNIX_H
36 /*----- Header files ------------------------------------------------------*/
46 /*----- Functions provided ------------------------------------------------*/
48 /* --- @txsu_shutdown@ --- *
54 * Use: Restores terminal settings on exit.
57 extern void txsu_shutdown(void);
59 extern txport
*txsu_create(const char */
*file*/
);
60 extern int txsu_configure(txport */
*txg*/
,
61 const char */
*k*/
, const char */
*v*/
);
62 extern void *txsu_fetch(void */
*txv*/
);
63 extern ssize_t
txsu_write(txport */
*txg*/
,
64 const void */
*p*/
, size_t /*sz*/);
65 extern void txsu_destroy(txport */
*txg*/
);
68 static const struct txfile txsu_fv
[] = {
73 static txport_ops txsu_ops
= {
74 TX_LIST
, "serial-unix", txsu_fv
,
75 "flow=none;baud=9600;format=8-odd-1;newline=cr",
76 txsu_create
, txsu_configure
, txsu_fetch
, txsu_write
, txsu_destroy
79 # define TX_LIST &txsu_ops
82 /*----- That's all, folks -------------------------------------------------*/