Hamlib  1.2.15
parallel.h
00001 /*
00002  *  Hamlib Interface - parallel communication header
00003  *  Copyright (c) 2000-2003 by Frank Singleton
00004  *  Copyright (c) 2000-2010 by Stephane Fillod
00005  *
00006  *
00007  *   This library is free software; you can redistribute it and/or
00008  *   modify it under the terms of the GNU Lesser General Public
00009  *   License as published by the Free Software Foundation; either
00010  *   version 2.1 of the License, or (at your option) any later version.
00011  *
00012  *   This library is distributed in the hope that it will be useful,
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  *   Lesser General Public License for more details.
00016  *
00017  *   You should have received a copy of the GNU Lesser General Public
00018  *   License along with this library; if not, write to the Free Software
00019  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00020  *
00021  */
00022 
00023 #ifndef _PARALLEL_H
00024 #define _PARALLEL_H 1
00025 
00026 #include <hamlib/rig.h>
00027 #include "iofunc.h"
00028 
00029 #ifdef HAVE_LINUX_PARPORT_H
00030 #include <linux/parport.h>
00031 #endif
00032 
00033 #ifndef PARPORT_CONTROL_STROBE
00034 #define PARPORT_CONTROL_STROBE    0x1
00035 #endif
00036 #ifndef PARPORT_CONTROL_AUTOFD
00037 #define PARPORT_CONTROL_AUTOFD    0x2
00038 #endif
00039 #ifndef PARPORT_CONTROL_INIT
00040 #define PARPORT_CONTROL_INIT      0x4
00041 #endif
00042 #ifndef PARPORT_CONTROL_SELECT
00043 #define PARPORT_CONTROL_SELECT    0x8
00044 #endif
00045 
00046 #ifndef PARPORT_STATUS_ERROR
00047 #define PARPORT_STATUS_ERROR      0x8
00048 #endif
00049 #ifndef PARPORT_STATUS_SELECT
00050 #define PARPORT_STATUS_SELECT     0x10
00051 #endif
00052 #ifndef PARPORT_STATUS_PAPEROUT
00053 #define PARPORT_STATUS_PAPEROUT   0x20
00054 #endif
00055 #ifndef PARPORT_STATUS_ACK
00056 #define PARPORT_STATUS_ACK        0x40
00057 #endif
00058 #ifndef PARPORT_STATUS_BUSY
00059 #define PARPORT_STATUS_BUSY       0x80
00060 #endif
00061 
00062 __BEGIN_DECLS
00063 
00064 /* Hamlib internal use, see rig.c */
00065 int par_open(hamlib_port_t *p);
00066 int par_close(hamlib_port_t *p);
00067 int par_ptt_set(hamlib_port_t *p, ptt_t pttx);
00068 int par_ptt_get(hamlib_port_t *p, ptt_t *pttx);
00069 int par_dcd_get(hamlib_port_t *p, dcd_t *dcdx);
00070 
00071 extern HAMLIB_EXPORT(int) par_write_data(hamlib_port_t *p, unsigned char data);
00072 extern HAMLIB_EXPORT(int) par_write_control(hamlib_port_t *p, unsigned char control);
00073 extern HAMLIB_EXPORT(int) par_read_data(hamlib_port_t *p, unsigned char *data);
00074 extern HAMLIB_EXPORT(int) par_read_control(hamlib_port_t *p, unsigned char *control);
00075 extern HAMLIB_EXPORT(int) par_read_status(hamlib_port_t *p, unsigned char *status);
00076 extern HAMLIB_EXPORT(int) par_lock(hamlib_port_t *p);
00077 extern HAMLIB_EXPORT(int) par_unlock(hamlib_port_t *p);
00078 
00079 __END_DECLS
00080 
00081 #endif /* _PARALLEL_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated by doxygen 1.7.6.1

Hamlib documentation for version 1.2.15 -- Thu Feb 2 2012 21:37:27
Project page: http://www.hamlib.org