Hamlib
3.0
Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
src
idx_builtin.h
1
/*
2
* Hamlib Interface - setting2idx for builtin constants
3
* Copyright (c) 2002-2005 by Stephane Fillod and Frank Singleton
4
*
5
*
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
10
*
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
*
20
*/
21
22
#ifndef _IDX_BUILTIN_H
23
#define _IDX_BUILTIN_H 1
24
25
#include <
hamlib/rig.h
>
26
27
/*
28
* only for Hamlib internal use (backend caps)
29
* This is a rig_setting2idx version that works for builtin_constant,
30
* hence allowing its use in array initializers. The compiler simplifies
31
* everything at compile time.
32
*
33
* struct rig_caps foo = {
34
* .level_gran = { [LVL_PREAMP] = { .min = 0, .max = 20, .step = 10 } },
35
* }
36
*
37
* Of course, it can't work with setting2idx_builtin(RIG_LEVEL_XX|RIG_LEVEL_YY)
38
*/
39
40
#define setting2idx_builtin(s) ((s)==(1<<0)?0: \
41
(s)==(1<<1)?1: \
42
(s)==(1<<2)?2: \
43
(s)==(1<<3)?3: \
44
(s)==(1<<4)?4: \
45
(s)==(1<<5)?5: \
46
(s)==(1<<6)?6: \
47
(s)==(1<<7)?7: \
48
(s)==(1<<8)?8: \
49
(s)==(1<<9)?9: \
50
(s)==(1<<10)?10: \
51
(s)==(1<<11)?11: \
52
(s)==(1<<12)?12: \
53
(s)==(1<<13)?13: \
54
(s)==(1<<14)?14: \
55
(s)==(1<<15)?15: \
56
(s)==(1<<16)?16: \
57
(s)==(1<<17)?17: \
58
(s)==(1<<18)?18: \
59
(s)==(1<<19)?19: \
60
(s)==(1<<20)?20: \
61
(s)==(1<<21)?21: \
62
(s)==(1<<22)?22: \
63
(s)==(1<<23)?23: \
64
(s)==(1<<24)?24: \
65
(s)==(1<<25)?25: \
66
(s)==(1<<26)?26: \
67
(s)==(1<<27)?27: \
68
(s)==(1<<28)?28: \
69
(s)==(1<<29)?29: \
70
(s)==(1<<30)?30: \
71
(s)==(1<<31)?31: \
72
0 \
73
)
74
75
#define LVL_PREAMP setting2idx_builtin(RIG_LEVEL_PREAMP)
76
#define LVL_ATT setting2idx_builtin(RIG_LEVEL_ATT)
77
#define LVL_VOX setting2idx_builtin(RIG_LEVEL_VOX)
78
#define LVL_AF setting2idx_builtin(RIG_LEVEL_AF)
79
#define LVL_RF setting2idx_builtin(RIG_LEVEL_RF)
80
#define LVL_SQL setting2idx_builtin(RIG_LEVEL_SQL)
81
#define LVL_IF setting2idx_builtin(RIG_LEVEL_IF)
82
#define LVL_APF setting2idx_builtin(RIG_LEVEL_APF)
83
#define LVL_NR setting2idx_builtin(RIG_LEVEL_NR)
84
#define LVL_PBT_IN setting2idx_builtin(RIG_LEVEL_PBT_IN)
85
#define LVL_PBT_OUT setting2idx_builtin(RIG_LEVEL_PBT_OUT)
86
#define LVL_CWPITCH setting2idx_builtin(RIG_LEVEL_CWPITCH)
87
#define LVL_RFPOWER setting2idx_builtin(RIG_LEVEL_RFPOWER)
88
#define LVL_MICGAIN setting2idx_builtin(RIG_LEVEL_MICGAIN)
89
#define LVL_KEYSPD setting2idx_builtin(RIG_LEVEL_KEYSPD)
90
#define LVL_NOTCHF setting2idx_builtin(RIG_LEVEL_NOTCHF)
91
#define LVL_COMP setting2idx_builtin(RIG_LEVEL_COMP)
92
#define LVL_AGC setting2idx_builtin(RIG_LEVEL_AGC)
93
#define LVL_BKINDL setting2idx_builtin(RIG_LEVEL_BKINDL)
94
#define LVL_BALANCE setting2idx_builtin(RIG_LEVEL_BALANCE)
95
#define LVL_METER setting2idx_builtin(RIG_LEVEL_METER)
96
#define LVL_VOXGAIN setting2idx_builtin(RIG_LEVEL_VOXGAIN)
97
#define LVL_VOXDELAY setting2idx_builtin(RIG_LEVEL_VOXDELAY)
98
#define LVL_ANTIVOX setting2idx_builtin(RIG_LEVEL_ANTIVOX)
99
100
#define LVL_RAWSTR setting2idx_builtin(RIG_LEVEL_RAWSTR)
101
#define LVL_SQLSTAT setting2idx_builtin(RIG_LEVEL_SQLSTAT)
102
#define LVL_SWR setting2idx_builtin(RIG_LEVEL_SWR)
103
#define LVL_ALC setting2idx_builtin(RIG_LEVEL_ALC)
104
#define LVL_STRENGTH setting2idx_builtin(RIG_LEVEL_STRENGTH)
105
/*#define LVL_BWC setting2idx_builtin(RIG_LEVEL_BWC)*/
106
107
#define PARM_ANN setting2idx_builtin(RIG_PARM_ANN)
108
#define PARM_APO setting2idx_builtin(RIG_PARM_APO)
109
#define PARM_BACKLIGHT setting2idx_builtin(RIG_PARM_BACKLIGHT)
110
#define PARM_BEEP setting2idx_builtin(RIG_PARM_BEEP)
111
#define PARM_TIME setting2idx_builtin(RIG_PARM_TIME)
112
#define PARM_BAT setting2idx_builtin(RIG_PARM_BAT)
113
#define PARM_KEYLIGHT setting2idx_builtin(RIG_PARM_KEYLIGHT)
114
115
116
#endif
/* _IDX_BUILTIN_H */
rig.h
Hamlib rig data structures.
Generated by
1.8.9.1
Hamlib documentation for version 3.0 -- Sun Oct 4 2015 11:13:15
Project page:
http://www.hamlib.org