| Tipro API Communicate with Tipro devices

BF22.h
Go to the documentation of this file.
1
17 #ifndef _TIPRO_TIPROHIDAPI_BF22_H_
18 #define _TIPRO_TIPROHIDAPI_BF22_H_
19
20 #include "TiproHidDevice.h"
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 /****************************************************************************/
27 /* BF22 DEFINES */
28 /****************************************************************************/
29
30 // PCM scenario
31 #define BF22_PCM_SCENARIO_AB 0x3C
32 #define BF22_PCM_SCENARIO_LR 0x3D
33 #define BF22_PCM_SCENARIO_VOID 0x3F
34 #define BF22_PCM_SCENARIO_MASK 0x03
35
36 // microphone amplifier mode
37 #define BF22_MICAMP_MODE_LOG 0x33
38 #define BF22_MICAMP_MODE_LIN 0x37
39 #define BF22_MICAMP_MODE_VOID 0x3F
40 #define BF22_MICAMP_MODE_MASK 0x0C
41
42 // central (low frequency) speaker
43 #define BF22_LF_SPK_OFF 0x3C
44 #define BF22_LF_SPK_ON 0x3D
45 #define BF22_LF_SPK_VOID 0x3F
46 #define BF22_LF_SPK_MASK 0x03
47
48 // showing microphone signal on VU meter
49 #define BF22_VU_AB_MIC_OFF 0x33
50 #define BF22_VU_AB_MIC_ON 0x37
51 #define BF22_VU_AB_MIC_VOID 0x3F
52 #define BF22_VU_AB_MIC_MASK 0x0C
53
54 // analog line out to speakers
55 #define BF22_LINE_OUT_OFF_SPK 0x10
56 #define BF22_LINE_OUT_ON_L_SPK 0x11
57 #define BF22_LINE_OUT_ON_R_SPK 0x12
58 #define BF22_LINE_OUT_ON_LR_SPK 0x13
59 #define BF22_LINE_OUT_VOID 0x14
60 #define BF22_LINE_OUT_MASK 0x03
61
62 // microphone to analog line in
63 #define BF22_MIC_OFF_LINE_IN 0x04
64 #define BF22_MIC_ON_LINE_IN 0x0C
65 #define BF22_MIC_LINE_IN_VOID 0x14
66 #define BF22_MIC_LINE_IN_MASK 0x08
67
68 // echo canceller
69 #define BF22_EC_OFF 0x00
70 #define BF22_EC_ON_L 0x01
71 #define BF22_EC_ON_R 0x02
72 #define BF22_EC_ON_LR 0x03
73 #define BF22_EC_VOID 0x07
74 #define BF22_EC_MASK 0x03
75
76 // PTT LED controll
77 #define BF22_PTT_LED_OFF 0x00
78 #define BF22_PTT_LED_ON 0x10
79 #define BF22_PTT_LED_BLINK 0x20
81 // microphone
82 #define BF22_MIC_ACTIVE 0x00
83 #define BF22_MIC_MUTE 0x01
85 // microphone level (attenuation)
86 #define BF22_MIC_LEVEL_P3 0x10
87 #define BF22_MIC_LEVEL_P2 0x11
88 #define BF22_MIC_LEVEL_P1 0x12
89 #define BF22_MIC_LEVEL_0 0x13
90 #define BF22_MIC_LEVEL_M1 0x14
91 #define BF22_MIC_LEVEL_M2 0x15
92 #define BF22_MIC_LEVEL_M3 0x16
93 #define BF22_MIC_LEVEL_M4 0x17
94 #define BF22_MIC_LEVEL_M5 0x18
95 #define BF22_MIC_LEVEL_M6 0x19
96 #define BF22_MIC_LEVEL_M7 0x1A
97 #define BF22_MIC_LEVEL_M8 0x1B
98 #define BF22_MIC_LEVEL_M9 0x1C
99 #define BF22_MIC_LEVEL_M10 0x1D
100 #define BF22_MIC_LEVEL_M11 0x1E
102 #define BF22_MIC_LEVEL_MIN BF22_MIC_LEVEL_P3
103 #define BF22_MIC_LEVEL_MAX BF22_MIC_LEVEL_M11
104
105 //microphone optimal distance
106 #define BF22_MIC_DISTANCE_M2 0x0A
107 #define BF22_MIC_DISTANCE_M1 0x0B
108 #define BF22_MIC_DISTANCE_0 0x0C
109 #define BF22_MIC_DISTANCE_P1 0x0D
110 #define BF22_MIC_DISTANCE_P2 0x0E
111 #define BF22_MIC_DISTANCE_P3 0x0F
112 #define BF22_MIC_DISTANCE_P4 0x10
113 #define BF22_MIC_DISTANCE_P5 0x11
114 #define BF22_MIC_DISTANCE_P6 0x12
115 #define BF22_MIC_DISTANCE_P7 0x13
116 #define BF22_MIC_DISTANCE_P8 0x14
118 #define BF22_MIC_DISTANCE_VERY_SHORT BF22_MIC_DISTANCE_0
119 #define BF22_MIC_DISTANCE_SHORT BF22_MIC_DISTANCE_P2
120 #define BF22_MIC_DISTANCE_MEDIUM BF22_MIC_DISTANCE_P4
121 #define BF22_MIC_DISTANCE_LONG BF22_MIC_DISTANCE_P6
123 #define BF22_MIC_DISTANCE_MIN BF22_MIC_DISTANCE_M2
124 #define BF22_MIC_DISTANCE_MAX BF22_MIC_DISTANCE_P8
125
126 // microphone compression
127 #define BF22_MIC_COMPRESSION_OFF 0x10
128 #define BF22_MIC_COMPRESSION_ON 0x11
129 // limits to check
130 #define BF22_MIC_COMPRESSION_MIN BF22_MIC_COMPRESSION_OFF
131 #define BF22_MIC_COMPRESSION_MAX BF22_MIC_COMPRESSION_ON
132
133 // microphone noise threshold
134 #define BF22_MIC_THRESHOLD_HIGH 0x10
135 #define BF22_MIC_THRESHOLD_MID 0x11
136 #define BF22_MIC_THRESHOLD_LOW 0x12
137 #define BF22_MIC_THRESHOLD_LOWER 0x13
138 #define BF22_MIC_THRESHOLD_VERY_LOW 0x14
139 // limits to check
140 #define BF22_MIC_THRESHOLD_MIN BF22_MIC_THRESHOLD_HIGH
141 #define BF22_MIC_THRESHOLD_MAX BF22_MIC_THRESHOLD_VERY_LOW
142
143 //luminance
144 #define BF22_LUMINANCE_MIN 0x00
145 #define BF22_LUMINANCE_MAX 0x14
147 //speaker level
148 #define BF22_SPK_LEVEL_MIN 0x00
149 #define BF22_SPK_LEVEL_MAX 0x14
151 // line-keys LED states
152 // bit0 - m - set mask
153 // bit1 - g - green
154 // bit2 - r - red
155 // bit3 - G - blink green
156 // bit4 - R - blink red
157 // //RGrgm
158 #define BF22_LED_NOCHANGE 0x00 //00000
159 #define BF22_LED_OFF 0x01 //00001
160 #define BF22_LED_GREEN 0x03 //00011
161 #define BF22_LED_RED 0x05 //00101
162 #define BF22_LED_ORANGE 0x07 //00111
163 #define BF22_LED_BLINK_OFF_GREEN 0x09 //01001
164 #define BF22_LED_BLINK_OFF_RED 0x11 //10001
165 #define BF22_LED_BLINK_OFF_ORANGE 0x19 //11001
166 #define BF22_LED_BLINK_GREEN_OFF 0x0B //01011
167 #define BF22_LED_BLINK_GREEN_RED 0x1B //11011
168 #define BF22_LED_BLINK_GREEN_ORANGE 0x13 //10011
169 #define BF22_LED_BLINK_RED_OFF 0x15 //10101
170 #define BF22_LED_BLINK_RED_GREEN 0x1D //11101
171 #define BF22_LED_BLINK_RED_ORANGE 0x0D //01101
172 #define BF22_LED_BLINK_ORANGE_OFF 0x1F //11111
173 #define BF22_LED_BLINK_ORANGE_GREEN 0x17 //10111
174 #define BF22_LED_BLINK_ORANGE_RED 0x0F //01111
175
176 // limits to check
177 #define BF22_LED_MIN BF22_LED_NOCHANGE
178 #define BF22_LED_MAX BF22_LED_BLINK_ORANGE_OFF
179
180
181 /****************************************************************************/
182 /* BF22 FUNCTIONS */
183 /****************************************************************************/
184
191 int TiproBF22SetPCMScenario(TiproHidDevice *device, int nScenario);
192
200 int TiproBF22GetPCMScenario(TiproHidDevice *device, int *nScenario, int *nInitScenario);
201
208 int TiproBF22SetMicAmpMode(TiproHidDevice *device, int nMicAmpMode);
209
217 int TiproBF22GetMicAmpMode(TiproHidDevice *device, int *nMicAmpMode, int *nInitMicAmpMode);
218
225 int TiproBF22SetLFSpeakerState(TiproHidDevice *device, int nState);
226
234 int TiproBF22GetLFSpeakerState(TiproHidDevice *device, int *nState, int *nInitState);
235
242 int TiproBF22SetMicOnVUState(TiproHidDevice *device, int nState);
243
251 int TiproBF22GetMicOnVUState(TiproHidDevice *device, int *nState, int *nInitState);
252
259 int TiproBF22SetMic2LineInState(TiproHidDevice *device, int nState);
260
268 int TiproBF22GetMic2LineInState(TiproHidDevice *device, int *nState, int *nInitState);
269
276 int TiproBF22SetLineOut2SpkMode(TiproHidDevice *device, int nMode);
277
285 int TiproBF22GetLineOut2SpkMode(TiproHidDevice *device, int *nMode, int *nInitMode);
286
293 int TiproBF22SetEchoMode(TiproHidDevice *device, int nMode);
294
302 int TiproBF22GetEchoMode(TiproHidDevice *device, int *nMode, int *nInitMode);
303
309 int TiproBF22TouchscreenDisable(TiproHidDevice *device);
310
316 int TiproBF22TouchscreenEnable(TiproHidDevice *device);
317
324 int TiproBF22SetPTTKeyLEDState(TiproHidDevice *device, int nState);
325
334 int TiproBF22SetPTTKeyLEDStateEx(TiproHidDevice *device, int nState, int nTBlinkOn, int nTBlinkOff);
335
342 int TiproBF22GetPTTKeyLEDState(TiproHidDevice *device, int *nState);
343
350 int TiproBF22MuteMicrophone(TiproHidDevice *device, int nMute);
351
358 int TiproBF22SetLeftSpeakerLevel(TiproHidDevice *device, int nLevel);
359
366 int TiproBF22GetLeftSpeakerLevel(TiproHidDevice *device, int *nLevel);
367
374 int TiproBF22SetRightSpeakerLevel(TiproHidDevice *device, int nLevel);
375
382 int TiproBF22GetRightSpeakerLevel(TiproHidDevice *device, int *nLevel);
383
391 int TiproBF22SetMicrophoneLevel(TiproHidDevice *device, int nLevel, bool bSetInit);
392
400 int TiproBF22GetMicrophoneLevel(TiproHidDevice *device, int *nLevel, int *nInitLevel);
401
409 int TiproBF22SetMicrophoneOptimalDistance(TiproHidDevice *device, int nDistance, bool bSetInit);
410
418 int TiproBF22GetMicrophoneOptimalDistance(TiproHidDevice *device, int *nDistance, int *nInitDistance);
419
427 int TiproBF22GetMicrophoneThreshold(TiproHidDevice *device, int *nThreshold, int *nInitThreshold);
428
436 int TiproBF22SetMicrophoneThreshold(TiproHidDevice *device, int nThreshold, bool bSetInit);
437
445 int TiproBF22GetMicrophoneCompression(TiproHidDevice *device, int *nCompression, int *nInitCompression);
446
454 int TiproBF22SetMicrophoneCompression(TiproHidDevice *device, int nCompression, bool bSetInit);
455
462 int TiproBF22GetLuminance(TiproHidDevice *device, int *nLuminance);
463
470 int TiproBF22SetLuminance(TiproHidDevice *device, int nLuminance);
471
478 int TiproBF22GetPTTKeyState(TiproHidDevice *device, int *nState);
479
487 int TiproBF22SetLineKeysLedState(TiproHidDevice *device, int nKey1State, int nKey2State, int nKey3State,int nKey4State, int nKey5State, int nKey6State, int nKey7State, int nKey8State, int nKey9State, int nKey10State, int nKey11State, int nKey12State, int nKey13State, int nKey14State, int nKey15State, int nKey16State);
488
496 int TiproBF22GetLineKeysLedState(TiproHidDevice *device, int *nKey1State, int *nKey2State, int *nKey3State, int *nKey4State, int *nKey5State, int *nKey6State, int *nKey7State, int *nKey8State, int *nKey9State, int *nKey10State, int *nKey11State, int *nKey12State, int *nKey13State, int *nKey14State, int *nKey15State, int *nKey16State);
497
498 #ifdef __cplusplus
499 }
500 #endif
501
502 #endif
TiproBF22GetLeftSpeakerLevel
int TiproBF22GetLeftSpeakerLevel(TiproHidDevice *device, int *nLevel)
Returns the level of the left speaker.
TiproHidDevice.h
Represents Tipro device.
TiproBF22SetPTTKeyLEDStateEx
int TiproBF22SetPTTKeyLEDStateEx(TiproHidDevice *device, int nState, int nTBlinkOn, int nTBlinkOff)
Sets the operation of the illuminated PTT key with more paramters.
TiproBF22MuteMicrophone
int TiproBF22MuteMicrophone(TiproHidDevice *device, int nMute)
Mutes/un-mutes the microphone signal.
TiproBF22SetMicrophoneOptimalDistance
int TiproBF22SetMicrophoneOptimalDistance(TiproHidDevice *device, int nDistance, bool bSetInit)
Sets the microphone optimal distance.
TiproBF22SetPTTKeyLEDState
int TiproBF22SetPTTKeyLEDState(TiproHidDevice *device, int nState)
Sets the LED state of illuminated PTT key.
TiproBF22GetLineOut2SpkMode
int TiproBF22GetLineOut2SpkMode(TiproHidDevice *device, int *nMode, int *nInitMode)
Returns the connection mode (OFF/L/R/LR) of the motherboard LINE-OUT port to the speakers.
TiproBF22GetMicrophoneOptimalDistance
int TiproBF22GetMicrophoneOptimalDistance(TiproHidDevice *device, int *nDistance, int *nInitDistance)
Gets the microphone optimal distance.
TiproBF22GetMic2LineInState
int TiproBF22GetMic2LineInState(TiproHidDevice *device, int *nState, int *nInitState)
Returns the connection state (ON/OFF) of the gooseneck microphone to the LINE-IN port on the motherbo...
TiproBF22GetPTTKeyState
int TiproBF22GetPTTKeyState(TiproHidDevice *device, int *nState)
Returns the state of the PTT key.
TiproBF22GetEchoMode
int TiproBF22GetEchoMode(TiproHidDevice *device, int *nMode, int *nInitMode)
Returns the echo canceler mode (OFF/L/R/LR)
TiproBF22GetMicOnVUState
int TiproBF22GetMicOnVUState(TiproHidDevice *device, int *nState, int *nInitState)
Get microphone level shown on VU-meter state.
TiproBF22SetRightSpeakerLevel
int TiproBF22SetRightSpeakerLevel(TiproHidDevice *device, int nLevel)
Sets the level of the right speaker.
TiproBF22SetPCMScenario
int TiproBF22SetPCMScenario(TiproHidDevice *device, int nScenario)
Sets PCM scenario.
TiproBF22SetLFSpeakerState
int TiproBF22SetLFSpeakerState(TiproHidDevice *device, int nState)
Set LF speaker state (ON/OFF)
TiproBF22GetLineKeysLedState
int TiproBF22GetLineKeysLedState(TiproHidDevice *device, int *nKey1State, int *nKey2State, int *nKey3State, int *nKey4State, int *nKey5State, int *nKey6State, int *nKey7State, int *nKey8State, int *nKey9State, int *nKey10State, int *nKey11State, int *nKey12State, int *nKey13State, int *nKey14State, int *nKey15State, int *nKey16State)
Returns the LED state for each key LED of Line-keys.
TiproBF22SetLuminance
int TiproBF22SetLuminance(TiproHidDevice *device, int nLuminance)
Sets luminance for both stripe and LCD backlight.
TiproBF22TouchscreenDisable
int TiproBF22TouchscreenDisable(TiproHidDevice *device)
Disables touchscreen.
TiproBF22GetMicAmpMode
int TiproBF22GetMicAmpMode(TiproHidDevice *device, int *nMicAmpMode, int *nInitMicAmpMode)
Get Microphone amplifier mode (Linear/Logarithmic)
TiproBF22SetMicrophoneThreshold
int TiproBF22SetMicrophoneThreshold(TiproHidDevice *device, int nThreshold, bool bSetInit)
Sets threshold for the microphone signal.
TiproBF22SetMicAmpMode
int TiproBF22SetMicAmpMode(TiproHidDevice *device, int nMicAmpMode)
Sets Microphone amplifier mode (Linear/Logarithmic)
TiproBF22SetLineKeysLedState
int TiproBF22SetLineKeysLedState(TiproHidDevice *device, int nKey1State, int nKey2State, int nKey3State, int nKey4State, int nKey5State, int nKey6State, int nKey7State, int nKey8State, int nKey9State, int nKey10State, int nKey11State, int nKey12State, int nKey13State, int nKey14State, int nKey15State, int nKey16State)
Sets the LED state for each key LED of Line-keys.
TiproBF22GetMicrophoneLevel
int TiproBF22GetMicrophoneLevel(TiproHidDevice *device, int *nLevel, int *nInitLevel)
Returns the googeneck microphone level.
TiproBF22SetMic2LineInState
int TiproBF22SetMic2LineInState(TiproHidDevice *device, int nState)
Sets the connection state (ON/OFF) of the gooseneck microphone to the LINE-IN port on the motherboard...
TiproBF22GetRightSpeakerLevel
int TiproBF22GetRightSpeakerLevel(TiproHidDevice *device, int *nLevel)
Returns the level of the right speaker.
TiproBF22GetMicrophoneThreshold
int TiproBF22GetMicrophoneThreshold(TiproHidDevice *device, int *nThreshold, int *nInitThreshold)
Returns threshold for the microphone signal.
TiproBF22SetEchoMode
int TiproBF22SetEchoMode(TiproHidDevice *device, int nMode)
Sets the echo canceler mode (OFF/L/R/LR)
TiproBF22GetMicrophoneCompression
int TiproBF22GetMicrophoneCompression(TiproHidDevice *device, int *nCompression, int *nInitCompression)
Returns compression for the microphone signal.
TiproBF22SetLeftSpeakerLevel
int TiproBF22SetLeftSpeakerLevel(TiproHidDevice *device, int nLevel)
Sets the level of the left speaker.
TiproBF22SetMicOnVUState
int TiproBF22SetMicOnVUState(TiproHidDevice *device, int nState)
Sets if microphone level is shown on the VU-meter (ON/OFF)
TiproBF22SetMicrophoneLevel
int TiproBF22SetMicrophoneLevel(TiproHidDevice *device, int nLevel, bool bSetInit)
Sets the gooseneck microphone level.
TiproBF22GetLuminance
int TiproBF22GetLuminance(TiproHidDevice *device, int *nLuminance)
Returns luminance for both stripe and LCD backlight.
TiproHidDevice
Definition: TiproHidDevice.h:32
TiproBF22GetPCMScenario
int TiproBF22GetPCMScenario(TiproHidDevice *device, int *nScenario, int *nInitScenario)
Gets PCM scenario.
TiproBF22TouchscreenEnable
int TiproBF22TouchscreenEnable(TiproHidDevice *device)
Enables touchscreen.
TiproBF22GetLFSpeakerState
int TiproBF22GetLFSpeakerState(TiproHidDevice *device, int *nState, int *nInitState)
Get LF speaker state.
TiproBF22SetMicrophoneCompression
int TiproBF22SetMicrophoneCompression(TiproHidDevice *device, int nCompression, bool bSetInit)
Sets compression for the microphone signal.
TiproBF22GetPTTKeyLEDState
int TiproBF22GetPTTKeyLEDState(TiproHidDevice *device, int *nState)
Returns the LED state of the illuminated PTT Key.
TiproBF22SetLineOut2SpkMode
int TiproBF22SetLineOut2SpkMode(TiproHidDevice *device, int nMode)
Sets the connection mode (OFF/L/R/LR) of the motherboard LINE-OUT port to the speakers.