2010-10-29 21:20:51 +00:00
|
|
|
/*
|
|
|
|
* Hamlib Elecraft backend--support extensions to Kenwood commands
|
|
|
|
* Copyright (C) 2010 by Nate Bargmann, n0nb@n0nb.us
|
|
|
|
*
|
|
|
|
* 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 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library 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
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ELECRAFT_H
|
|
|
|
#define _ELECRAFT_H 1
|
|
|
|
|
2011-02-18 02:03:49 +00:00
|
|
|
#include <hamlib/rig.h>
|
2010-10-29 21:20:51 +00:00
|
|
|
|
|
|
|
/* The Elecraft Programmer's Reference details the extension level that
|
|
|
|
* a K2 or K3 may have in effect which modify certain commands.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define EXT_LEVEL_NONE -1
|
|
|
|
|
2011-01-19 02:39:51 +00:00
|
|
|
enum elec_ext_id_e {
|
2010-10-29 21:20:51 +00:00
|
|
|
K20 = 0, /* K2 Normal mode */
|
|
|
|
K21, /* K2 Normal/rtty_off */
|
|
|
|
K22, /* K2 Extended mode */
|
|
|
|
K23, /* K2 Extended mode/rtty_off */
|
|
|
|
K30, /* K3 Normal mode */
|
2011-02-18 02:03:49 +00:00
|
|
|
K31 /* K3 Extended mode */
|
2010-10-29 21:20:51 +00:00
|
|
|
};
|
|
|
|
|
2011-01-19 02:39:51 +00:00
|
|
|
struct elec_ext_id_str {
|
|
|
|
enum elec_ext_id_e level;
|
2010-10-29 21:20:51 +00:00
|
|
|
const char *id;
|
|
|
|
};
|
|
|
|
|
2010-11-03 03:08:33 +00:00
|
|
|
/* Data sub-modes are provided from the K3 via the DT command */
|
2010-10-29 21:20:51 +00:00
|
|
|
enum k3_data_submodes_e {
|
2011-02-18 02:03:49 +00:00
|
|
|
K3_MODE_DATA_A = 0, /* DT0; */
|
|
|
|
K3_MODE_AFSK_A, /* DT1; */
|
|
|
|
K3_MODE_FSK_D, /* DT2; */
|
|
|
|
K3_MODE_PSK_D /* DT3; */
|
2010-10-29 21:20:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2011-02-18 02:03:49 +00:00
|
|
|
/* Private tokens used for ext_lvl function in Elecraft backends.
|
2011-02-01 03:18:36 +00:00
|
|
|
* Extra levels which are rig specific should be coded in
|
|
|
|
* the individual rig files and token #s >= 101.
|
|
|
|
*/
|
2011-02-18 02:03:49 +00:00
|
|
|
#define TOK_IF_FREQ TOKEN_BACKEND(101) /* K3 FI command */
|
|
|
|
#define TOK_TX_STAT TOKEN_BACKEND(102) /* K3 TQ command */
|
2011-02-01 03:18:36 +00:00
|
|
|
|
|
|
|
/* Token structure assigned to .cfgparams in rig_caps */
|
|
|
|
extern const struct confparams elecraft_ext_levels[];
|
|
|
|
|
|
|
|
|
2010-10-29 21:20:51 +00:00
|
|
|
/* Elecraft extension function declarations */
|
|
|
|
int elecraft_open(RIG *rig);
|
|
|
|
|
2011-01-31 04:03:58 +00:00
|
|
|
|
2010-10-29 21:20:51 +00:00
|
|
|
#endif /* _ELECRAFT_H */
|