2002-01-16 22:56:34 +00:00
|
|
|
/*
|
|
|
|
* Hamlib Interface - io function header
|
2005-04-03 12:27:17 +00:00
|
|
|
* Copyright (c) 2000-2005 by Stephane Fillod and Frank Singleton
|
2002-01-16 22:56:34 +00:00
|
|
|
*
|
|
|
|
*
|
2011-08-22 01:07:57 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2002-01-16 22:56:34 +00:00
|
|
|
*
|
2011-08-22 01:07:57 +00:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
2002-01-16 22:56:34 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2011-08-22 01:07:57 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2002-01-16 22:56:34 +00:00
|
|
|
*
|
2011-08-22 01:07:57 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2002-01-16 22:56:34 +00:00
|
|
|
* License along with this library; if not, write to the Free Software
|
2011-08-22 01:07:57 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2002-01-16 22:56:34 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _IOFUNC_H
|
|
|
|
#define _IOFUNC_H 1
|
2020-05-05 14:38:36 +00:00
|
|
|
|
2004-08-10 21:00:13 +00:00
|
|
|
#include <sys/types.h>
|
2002-01-16 22:56:34 +00:00
|
|
|
#include <hamlib/rig.h>
|
|
|
|
|
|
|
|
|
2009-09-14 07:49:04 +00:00
|
|
|
extern HAMLIB_EXPORT(int) port_open(hamlib_port_t *p);
|
|
|
|
extern HAMLIB_EXPORT(int) port_close(hamlib_port_t *p, rig_port_t port_type);
|
|
|
|
|
2002-01-16 22:56:34 +00:00
|
|
|
|
2017-08-05 14:09:12 +00:00
|
|
|
extern HAMLIB_EXPORT(int) read_block(hamlib_port_t *p,
|
|
|
|
char *rxbuffer,
|
|
|
|
size_t count);
|
|
|
|
|
|
|
|
extern HAMLIB_EXPORT(int) write_block(hamlib_port_t *p,
|
|
|
|
const char *txbuffer,
|
|
|
|
size_t count);
|
2002-01-16 22:56:34 +00:00
|
|
|
|
2017-08-05 14:09:12 +00:00
|
|
|
extern HAMLIB_EXPORT(int) read_string(hamlib_port_t *p,
|
|
|
|
char *rxbuffer,
|
|
|
|
size_t rxmax,
|
|
|
|
const char *stopset,
|
|
|
|
int stopset_len);
|
|
|
|
|
|
|
|
#endif /* _IOFUNC_H */
|