| Tipro API Communicate with Tipro devices

BF20.h
Go to the documentation of this file.
1
17 #ifndef _TIPRO_TIPROHIDAPI_BF20_H_
18 #define _TIPRO_TIPROHIDAPI_BF20_H_
19
20 #include "TiproHidDevice.h"
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 /****************************************************************************/
27 /* BF20 DEFINES */
28 /****************************************************************************/
29
30 // PCM scenario
31 #define BF20_PCM_SCENARIO_AB 0x3C
32 #define BF20_PCM_SCENARIO_LR 0x3D
33 #define BF20_PCM_SCENARIO_VOID 0x3F
34 #define BF20_PCM_SCENARIO_MASK 0x03
35
36 // microphone amplifier mode
37 #define BF20_MICAMP_MODE_LOG 0x33
38 #define BF20_MICAMP_MODE_LIN 0x37
39 #define BF20_MICAMP_MODE_VOID 0x3F
40 #define BF20_MICAMP_MODE_MASK 0x0C
41
42 // central (low frequency) speaker
43 #define BF20_LF_SPK_OFF 0x3C
44 #define BF20_LF_SPK_ON 0x3D
45 #define BF20_LF_SPK_VOID 0x3F
46 #define BF20_LF_SPK_MASK 0x03
47
48 // showing microphone signal on VU meter
49 #define BF20_VU_AB_MIC_OFF 0x33
50 #define BF20_VU_AB_MIC_ON 0x37
51 #define BF20_VU_AB_MIC_VOID 0x3F
52 #define BF20_VU_AB_MIC_MASK 0x0C
53
54 // analog line out to speakers
55 #define BF20_LINE_OUT_OFF_SPK 0x10
56 #define BF20_LINE_OUT_ON_L_SPK 0x11
57 #define BF20_LINE_OUT_ON_R_SPK 0x12
58 #define BF20_LINE_OUT_ON_LR_SPK 0x13
59 #define BF20_LINE_OUT_VOID 0x14
60 #define BF20_LINE_OUT_MASK 0x03
61
62 // microphone to analog line in
63 #define BF20_MIC_OFF_LINE_IN 0x04
64 #define BF20_MIC_ON_LINE_IN 0x0C
65 #define BF20_MIC_LINE_IN_VOID 0x14
66 #define BF20_MIC_LINE_IN_MASK 0x08
67
68 // echo canceller
69 #define BF20_EC_OFF 0x00
70 #define BF20_EC_ON_L 0x01
71 #define BF20_EC_ON_R 0x02
72 #define BF20_EC_ON_LR 0x03
73 #define BF20_EC_VOID 0x07
74 #define BF20_EC_MASK 0x03
75
76 // PTT LED controll
77 #define BF20_PTT_LED_OFF 0x00
78 #define BF20_PTT_LED_ON 0x10
79 #define BF20_PTT_LED_BLINK 0x20
81 // microphone
82 #define BF20_MIC_ACTIVE 0x00
83 #define BF20_MIC_MUTE 0x01
85 // microphone level (attenuation)
86 #define BF20_MIC_LEVEL_P3 0x10
87 #define BF20_MIC_LEVEL_P2 0x11
88 #define BF20_MIC_LEVEL_P1 0x12
89 #define BF20_MIC_LEVEL_0 0x13
90 #define BF20_MIC_LEVEL_M1 0x14
91 #define BF20_MIC_LEVEL_M2 0x15
92 #define BF20_MIC_LEVEL_M3 0x16
93 #define BF20_MIC_LEVEL_M4 0x17
94 #define BF20_MIC_LEVEL_M5 0x18
95 #define BF20_MIC_LEVEL_M6 0x19
96 #define BF20_MIC_LEVEL_M7 0x1A
97 #define BF20_MIC_LEVEL_M8 0x1B
98 #define BF20_MIC_LEVEL_M9 0x1C
99 #define BF20_MIC_LEVEL_M10 0x1D
100 #define BF20_MIC_LEVEL_M11 0x1E
102 #define BF20_MIC_LEVEL_MIN BF20_MIC_LEVEL_P3
103 #define BF20_MIC_LEVEL_MAX BF20_MIC_LEVEL_M11
104
105 // microphone optimal distance
106 #define BF20_MIC_DISTANCE_M2 0x0A
107 #define BF20_MIC_DISTANCE_M1 0x0B
108 #define BF20_MIC_DISTANCE_0 0x0C
109 #define BF20_MIC_DISTANCE_P1 0x0D
110 #define BF20_MIC_DISTANCE_P2 0x0E
111 #define BF20_MIC_DISTANCE_P3 0x0F
112 #define BF20_MIC_DISTANCE_P4 0x10
113 #define BF20_MIC_DISTANCE_P5 0x11
114 #define BF20_MIC_DISTANCE_P6 0x12
115 #define BF20_MIC_DISTANCE_P7 0x13
116 #define BF20_MIC_DISTANCE_P8 0x14
118 #define BF20_MIC_DISTANCE_VERY_SHORT BF20_MIC_DISTANCE_0
119 #define BF20_MIC_DISTANCE_SHORT BF20_MIC_DISTANCE_P2
120 #define BF20_MIC_DISTANCE_MEDIUM BF20_MIC_DISTANCE_P4
121 #define BF20_MIC_DISTANCE_LONG BF20_MIC_DISTANCE_P6
123 #define BF20_MIC_DISTANCE_MIN BF20_MIC_DISTANCE_M2
124 #define BF20_MIC_DISTANCE_MAX BF20_MIC_DISTANCE_P8
125
126 // microphone compression
127 #define BF20_MIC_COMPRESSION_OFF 0x10
128 #define BF20_MIC_COMPRESSION_ON 0x11
130 #define BF20_MIC_COMPRESSION_MIN BF22_MIC_COMPRESSION_OFF
131 #define BF20_MIC_COMPRESSION_MAX BF22_MIC_COMPRESSION_ON
132
133 // microphone noise threshold
134 #define BF20_MIC_THRESHOLD_HIGH 0x10
135 #define BF20_MIC_THRESHOLD_MID 0x11
136 #define BF20_MIC_THRESHOLD_LOW 0x12
137 #define BF20_MIC_THRESHOLD_LOWER 0x13
138 #define BF20_MIC_THRESHOLD_VERY_LOW 0x14
140 #define BF20_MIC_THRESHOLD_MIN BF22_MIC_THRESHOLD_HIGH
141 #define BF20_MIC_THRESHOLD_MAX BF22_MIC_THRESHOLD_VERY_LOW
142
143 //luminance
144 #define BF20_LUMINANCE_MIN 0x00
145 #define BF20_LUMINANCE_MAX 0x14
147 //speaker level
148 #define BF20_SPK_LEVEL_MIN 0x00
149 #define BF20_SPK_LEVEL_MAX 0x14
152 /****************************************************************************/
153 /* BF20 FUNCTIONS */
154 /****************************************************************************/
155
162 int TiproBF20SetPCMScenario(TiproHidDevice *device, int nScenario);
163
171 int TiproBF20GetPCMScenario(TiproHidDevice *device, int *nScenario, int *nInitScenario);
172
179 int TiproBF20SetMicAmpMode(TiproHidDevice *device, int nMicAmpMode);
180
188 int TiproBF20GetMicAmpMode(TiproHidDevice *device, int *nMicAmpMode, int *nInitMicAmpMode);
189
196 int TiproBF20SetLFSpeakerState(TiproHidDevice *device, int nState);
197
205 int TiproBF20GetLFSpeakerState(TiproHidDevice *device, int *nState, int *nInitState);
206
213 int TiproBF20SetMicOnVUState(TiproHidDevice *device, int nState);
214
222 int TiproBF20GetMicOnVUState(TiproHidDevice *device, int *nState, int *nInitState);
223
230 int TiproBF20SetMic2LineInState(TiproHidDevice *device, int nState);
231
239 int TiproBF20GetMic2LineInState(TiproHidDevice *device, int *nState, int *nInitState);
240
247 int TiproBF20SetLineOut2SpkMode(TiproHidDevice *device, int nMode);
248
256 int TiproBF20GetLineOut2SpkMode(TiproHidDevice *device, int *nMode, int *nInitMode);
257
264 int TiproBF20SetEchoMode(TiproHidDevice *device, int nMode);
265
273 int TiproBF20GetEchoMode(TiproHidDevice *device, int *nMode, int *nInitMode);
274
280 int TiproBF20TouchscreenDisable(TiproHidDevice *device);
281
287 int TiproBF20TouchscreenEnable(TiproHidDevice *device);
288
295 int TiproBF20SetPTTKeyLEDState(TiproHidDevice *device, int nState);
296
305 int TiproBF20SetPTTKeyLEDStateEx(TiproHidDevice *device, int nState, int nTBlinkOn, int nTBlinkOff);
306
313 int TiproBF20GetPTTKeyLEDState(TiproHidDevice *device, int *nState);
314
321 int TiproBF20MuteMicrophone(TiproHidDevice *device, int nMute);
322
329 int TiproBF20SetLeftSpeakerLevel(TiproHidDevice *device, int nLevel);
330
337 int TiproBF20GetLeftSpeakerLevel(TiproHidDevice *device, int *nLevel);
338
345 int TiproBF20SetRightSpeakerLevel(TiproHidDevice *device, int nLevel);
346
353 int TiproBF20GetRightSpeakerLevel(TiproHidDevice *device, int *nLevel);
354
362 int TiproBF20SetMicrophoneLevel(TiproHidDevice *device, int nLevel, bool bSetInit);
363
371 int TiproBF20GetMicrophoneLevel(TiproHidDevice *device, int *nLevel, int *nInitLevel);
372
380 int TiproBF20SetMicrophoneOptimalDistance(TiproHidDevice *device, int nDistance, bool bSetInit);
381
389 int TiproBF20GetMicrophoneOptimalDistance(TiproHidDevice *device, int *nDistance, int *nInitDistance);
390
398 int TiproBF20GetMicrophoneThreshold(TiproHidDevice *device, int *nThreshold, int *nInitThreshold);
399
407 int TiproBF20SetMicrophoneThreshold(TiproHidDevice *device, int nThreshold, bool bSetInit);
408
416 int TiproBF20GetMicrophoneCompression(TiproHidDevice *device, int *nCompression, int *nInitCompression);
417
425 int TiproBF20SetMicrophoneCompression(TiproHidDevice *device, int nCompression, bool bSetInit);
426
433 int TiproBF20GetLuminance(TiproHidDevice *device, int *nLuminance);
434
441 int TiproBF20SetLuminance(TiproHidDevice *device, int nLuminance);
442
449 int TiproBF20GetPTTKeyState(TiproHidDevice *device, int *nState);
450
451 #ifdef __cplusplus
452 }
453 #endif
454
455 #endif
TiproBF20SetLineOut2SpkMode
int TiproBF20SetLineOut2SpkMode(TiproHidDevice *device, int nMode)
Sets the connection mode (OFF/L/R/LR) of the motherboard LINE-OUT port to the speakers.
TiproHidDevice.h
Represents Tipro device.
TiproBF20SetMicrophoneCompression
int TiproBF20SetMicrophoneCompression(TiproHidDevice *device, int nCompression, bool bSetInit)
Sets compression for the microphone signal.
TiproBF20GetMicOnVUState
int TiproBF20GetMicOnVUState(TiproHidDevice *device, int *nState, int *nInitState)
Get microphone signal shown on VU-meter state.
TiproBF20GetPTTKeyState
int TiproBF20GetPTTKeyState(TiproHidDevice *device, int *nState)
Returns the state of the PTT key.
TiproBF20SetLeftSpeakerLevel
int TiproBF20SetLeftSpeakerLevel(TiproHidDevice *device, int nLevel)
Sets the level of the left speaker.
TiproBF20GetEchoMode
int TiproBF20GetEchoMode(TiproHidDevice *device, int *nMode, int *nInitMode)
Returns the echo canceler mode (OFF/L/R/LR)
TiproBF20GetLuminance
int TiproBF20GetLuminance(TiproHidDevice *device, int *nLuminance)
Returns luminance for both stripe and LCD backlight.
TiproBF20SetEchoMode
int TiproBF20SetEchoMode(TiproHidDevice *device, int nMode)
Sets the echo canceler mode (OFF/L/R/LR)
TiproBF20SetMicrophoneLevel
int TiproBF20SetMicrophoneLevel(TiproHidDevice *device, int nLevel, bool bSetInit)
Sets the gooseneck microphone level.
TiproBF20SetMic2LineInState
int TiproBF20SetMic2LineInState(TiproHidDevice *device, int nState)
Sets the connection state (ON/OFF) of the gooseneck microphone to the LINE-IN port on the motherboard...
TiproBF20GetRightSpeakerLevel
int TiproBF20GetRightSpeakerLevel(TiproHidDevice *device, int *nLevel)
Returns the level of the right speaker.
TiproBF20SetMicrophoneOptimalDistance
int TiproBF20SetMicrophoneOptimalDistance(TiproHidDevice *device, int nDistance, bool bSetInit)
Sets the microphone optimal distance.
TiproBF20GetMic2LineInState
int TiproBF20GetMic2LineInState(TiproHidDevice *device, int *nState, int *nInitState)
Returns the connection state (ON/OFF) of the gooseneck microphone to the LINE-IN port on the motherbo...
TiproBF20SetPCMScenario
int TiproBF20SetPCMScenario(TiproHidDevice *device, int nScenario)
Set PCM scenario.
TiproBF20SetRightSpeakerLevel
int TiproBF20SetRightSpeakerLevel(TiproHidDevice *device, int nLevel)
Sets the level of the right speaker.
TiproBF20SetMicrophoneThreshold
int TiproBF20SetMicrophoneThreshold(TiproHidDevice *device, int nThreshold, bool bSetInit)
Sets threshold for the microphone signal.
TiproBF20GetMicAmpMode
int TiproBF20GetMicAmpMode(TiproHidDevice *device, int *nMicAmpMode, int *nInitMicAmpMode)
Get Microphone amplifier mode (Linear/Logarithmic)
TiproBF20GetPTTKeyLEDState
int TiproBF20GetPTTKeyLEDState(TiproHidDevice *device, int *nState)
Returns the LED state of the illuminated PTT Key.
TiproBF20SetLuminance
int TiproBF20SetLuminance(TiproHidDevice *device, int nLuminance)
Sets luminance for both stripe and LCD backlight.
TiproBF20GetLineOut2SpkMode
int TiproBF20GetLineOut2SpkMode(TiproHidDevice *device, int *nMode, int *nInitMode)
Returns the connection mode (OFF/L/R/LR) of the motherboard LINE-OUT port to the speakers.
TiproBF20SetPTTKeyLEDState
int TiproBF20SetPTTKeyLEDState(TiproHidDevice *device, int nState)
Sets the LED state of illuminated PTT key.
TiproBF20GetMicrophoneThreshold
int TiproBF20GetMicrophoneThreshold(TiproHidDevice *device, int *nThreshold, int *nInitThreshold)
Returns threshold for the microphone signal.
TiproBF20GetMicrophoneCompression
int TiproBF20GetMicrophoneCompression(TiproHidDevice *device, int *nCompression, int *nInitCompression)
Returns compression for the microphone signal.
TiproBF20GetMicrophoneOptimalDistance
int TiproBF20GetMicrophoneOptimalDistance(TiproHidDevice *device, int *nDistance, int *nInitDistance)
Gets the microphone optimal distance.
TiproBF20SetLFSpeakerState
int TiproBF20SetLFSpeakerState(TiproHidDevice *device, int nState)
Set LF speaker state (ON/OFF)
TiproBF20SetMicAmpMode
int TiproBF20SetMicAmpMode(TiproHidDevice *device, int nMicAmpMode)
Set Microphone amplifier mode (Linear/Logarithmic)
TiproBF20TouchscreenEnable
int TiproBF20TouchscreenEnable(TiproHidDevice *device)
Enables touchscreen.
TiproBF20TouchscreenDisable
int TiproBF20TouchscreenDisable(TiproHidDevice *device)
Disables touchscreen.
TiproBF20SetPTTKeyLEDStateEx
int TiproBF20SetPTTKeyLEDStateEx(TiproHidDevice *device, int nState, int nTBlinkOn, int nTBlinkOff)
Sets the operation of the illuminated PTT key with more paramters.
TiproHidDevice
Definition: TiproHidDevice.h:32
TiproBF20SetMicOnVUState
int TiproBF20SetMicOnVUState(TiproHidDevice *device, int nState)
Sets if microphone signal is shown on the VU-meter (ON/OFF)
TiproBF20GetMicrophoneLevel
int TiproBF20GetMicrophoneLevel(TiproHidDevice *device, int *nLevel, int *nInitLevel)
Returns the googeneck microphone level.
TiproBF20GetPCMScenario
int TiproBF20GetPCMScenario(TiproHidDevice *device, int *nScenario, int *nInitScenario)
Get PCM scenario.
TiproBF20GetLeftSpeakerLevel
int TiproBF20GetLeftSpeakerLevel(TiproHidDevice *device, int *nLevel)
Returns the level of the left speaker.
TiproBF20MuteMicrophone
int TiproBF20MuteMicrophone(TiproHidDevice *device, int nMute)
Mutes/un-mutes the microphone signal.
TiproBF20GetLFSpeakerState
int TiproBF20GetLFSpeakerState(TiproHidDevice *device, int *nState, int *nInitState)
Get LF speaker state.