2000-07-18 20:55:08 +00:00
|
|
|
/*
|
|
|
|
* hamlib - (C) Frank Singleton 2000 (vk3fcs@ix.netcom.com)
|
|
|
|
*
|
|
|
|
* ft747.h - (C) Frank Singleton 2000 (vk3fcs@ix.netcom.com)
|
|
|
|
* This shared library provides an API for communicating
|
|
|
|
* via serial interface to an FT-747GX using the "CAT" interface
|
|
|
|
* box (FIF-232C) or similar
|
|
|
|
*
|
|
|
|
*
|
2000-09-04 03:58:06 +00:00
|
|
|
* $Id: ft747.h,v 1.6 2000-09-04 03:58:06 javabear Exp $
|
2000-08-19 04:07:00 +00:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
2000-07-18 20:55:08 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Allow TX commands to be disabled
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2000-07-27 00:42:09 +00:00
|
|
|
#undef TX_ENABLED
|
2000-07-18 20:55:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* MODES - when setting modes via cmd_mode_set() */
|
|
|
|
|
2000-07-29 00:52:28 +00:00
|
|
|
#define MODE_SET_LSB 0x00
|
|
|
|
#define MODE_SET_USB 0x01
|
|
|
|
#define MODE_SET_CWW 0x02
|
|
|
|
#define MODE_SET_CWN 0x03
|
|
|
|
#define MODE_SET_AMW 0x04
|
|
|
|
#define MODE_SET_AMN 0x05
|
|
|
|
#define MODE_SET_FMW 0x06
|
|
|
|
#define MODE_SET_FMN 0x07
|
2000-07-18 20:55:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Status Flags
|
|
|
|
*/
|
|
|
|
|
2000-07-29 00:52:28 +00:00
|
|
|
#define SF_DLOCK 0x01
|
|
|
|
#define SF_SPLIT 0x02
|
|
|
|
#define SF_CLAR 0x04
|
|
|
|
#define SF_VFOAB 0x08
|
|
|
|
#define SF_VFOMR 0x10
|
|
|
|
#define SF_RXTX 0x20
|
|
|
|
#define SF_RESV 0x40
|
|
|
|
#define SF_PRI 0x80
|
2000-07-18 20:55:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Mode Bitmap. Bits 5 and 6 unused
|
|
|
|
* When reading modes
|
|
|
|
*/
|
|
|
|
|
2000-07-29 00:52:28 +00:00
|
|
|
#define MODE_FM 0x01
|
|
|
|
#define MODE_AM 0x02
|
|
|
|
#define MODE_CW 0x04
|
|
|
|
|
|
|
|
#define MODE_USB 0x08
|
|
|
|
#define MODE_LSB 0x10
|
|
|
|
#define MODE_NAR 0x80
|
2000-07-18 20:55:08 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Map band data value to band.
|
|
|
|
*
|
|
|
|
* Band "n" is from band_data[n] to band_data[n+1]
|
|
|
|
*/
|
|
|
|
|
|
|
|
const float band_data[11] = { 0.0, 0.1, 2.5, 4.0, 7.5, 10.5, 14.5, 18.5, 21.5, 25.0, 30.0 };
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Visible functions in shared lib.
|
|
|
|
*
|
|
|
|
*/
|
2000-07-27 00:42:09 +00:00
|
|
|
int rig_open(char *serial_port); /* return fd or -1 on error */
|
|
|
|
int rig_close(int fd); /* close port using fd */
|
2000-09-04 03:58:06 +00:00
|
|
|
struct rig_caps *rig_get_caps(); /* return ptr to capabilities */
|
2000-07-18 20:55:08 +00:00
|
|
|
|
2000-07-28 03:09:08 +00:00
|
|
|
/*
|
|
|
|
* set commands
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
void cmd_set_split_yes(int fd);
|
|
|
|
void cmd_set_split_no(int fd);
|
|
|
|
void cmd_set_recall_memory(int fd, int mem);
|
|
|
|
void cmd_set_vfo_to_memory(int fd, int mem);
|
|
|
|
void cmd_set_dlock_off(int fd);
|
|
|
|
void cmd_set_dlock_on(int fd);
|
|
|
|
void cmd_set_select_vfo_a(int fd);
|
|
|
|
void cmd_set_select_vfo_b(int fd);
|
|
|
|
void cmd_set_memory_to_vfo(int fd, int mem);
|
|
|
|
void cmd_set_up500k(int fd);
|
|
|
|
void cmd_set_down500k(int fd);
|
|
|
|
void cmd_set_clarify_off(int fd);
|
|
|
|
void cmd_set_clarify_on(int fd);
|
|
|
|
void cmd_set_freq(int fd, unsigned int freq);
|
|
|
|
void cmd_set_mode(int fd, int mode);
|
|
|
|
void cmd_set_pacing(int fd, int delay);
|
|
|
|
void cmd_set_ptt_off(int fd);
|
|
|
|
void cmd_set_ptt_on(int fd); /* careful.. */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* get commands
|
|
|
|
*/
|
|
|
|
|
|
|
|
void cmd_get_update_store(int fd, unsigned char *buffer); /* data external */
|
2000-07-18 20:55:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
|