| Tipro API Communicate with Tipro devices

BF07.h
Go to the documentation of this file.
1
17 #ifndef _TIPRO_TIPROHIDAPI_BF07_H_
18 #define _TIPRO_TIPROHIDAPI_BF07_H_
19
20 #include "TiproHidDevice.h"
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26
27 /****************************************************************************/
28 /* BF07 DEFINES */
29 /****************************************************************************/
30
31 // Handsfree speaker levels
32 #define SBX_SPK_LEVEL_MIN 0x00
33 #define SBX_SPK_LEVEL_MAX 0x14
35 // PTT LED State
36 #define BF07_PTT_LED_OFF 0x00
37 #define BF07_PTT_LED_ON 0x10
38 #define BF07_PTT_LED_BLINK 0x20
40 // Handset speaker levels
41 #define BF07_HANDSET_SPEAKER_LEVEL_P4 0x00
42 #define BF07_HANDSET_SPEAKER_LEVEL_P3 0x01
43 #define BF07_HANDSET_SPEAKER_LEVEL_P2 0x02
44 #define BF07_HANDSET_SPEAKER_LEVEL_P1 0x03
45 #define BF07_HANDSET_SPEAKER_LEVEL_0 0x03
46 #define BF07_HANDSET_SPEAKER_LEVEL_M1 0x04
47 #define BF07_HANDSET_SPEAKER_LEVEL_M2 0x05
48 #define BF07_HANDSET_SPEAKER_LEVEL_M3 0x06
49 #define BF07_HANDSET_SPEAKER_LEVEL_M4 0x07
50 #define BF07_HANDSET_SPEAKER_LEVEL_M5 0x08
51 #define BF07_HANDSET_SPEAKER_LEVEL_M6 0x09
52 #define BF07_HANDSET_SPEAKER_LEVEL_M7 0x0A
53 #define BF07_HANDSET_HEADSET_ILLEGAL 0xFF
54
55 #define BF07_HANDSET_HEADSET_MIN BF07_HANDSET_SPEAKER_LEVEL_P4
56 #define BF07_HANDSET_HEADSET_MAX BF07_HANDSET_SPEAKER_LEVEL_M7
57
58 // Alert line modes
59 #define BF07_ALERT_AS_ALERT 0x00
60 #define BF07_ALERT_AS_VOICE 0x01
61 #define BF07_ALERT_NOT_USED 0x02
62 // mode not defined
63 #define BF07_ALERT_ILLEGAL 0xFF
64
65 // Devices
66 #define BF07_DEVICE_HANDSFREE 0x00
67 #define BF07_DEVICE_HANDSET 0x01
68 #define BF07_DEVICE_HANDSFREE_HANDSET 0x04
69 #define BF07_DEVICE_ILLEGAL 0xFF
70
71 // Microphone level (attenuation)
72 #define BF07_MIC_LEVEL_P3 0x10
73 #define BF07_MIC_LEVEL_P2 0x11
74 #define BF07_MIC_LEVEL_P1 0x12
75 #define BF07_MIC_LEVEL_0 0x13
76 #define BF07_MIC_LEVEL_M1 0x14
77 #define BF07_MIC_LEVEL_M2 0x15
78 #define BF07_MIC_LEVEL_M3 0x16
79 #define BF07_MIC_LEVEL_M4 0x17
80 #define BF07_MIC_LEVEL_M5 0x18
81 #define BF07_MIC_LEVEL_M6 0x19
82 #define BF07_MIC_LEVEL_M7 0x1A
83 #define BF07_MIC_LEVEL_M8 0x1B
84 #define BF07_MIC_LEVEL_M9 0x1C
85 #define BF07_MIC_LEVEL_M10 0x1D
86 #define BF07_MIC_LEVEL_M11 0x1E
88 #define BF07_MIC_LEVEL_MIN BF07_MIC_LEVEL_P3
89 #define BF07_MIC_LEVEL_MAX BF07_MIC_LEVEL_M11
90
91 // Microphone noise threshold
92 #define BF07_MIC_THRESHOLD_HIGH 0x10
93 #define BF07_MIC_THRESHOLD_MID 0x11
94 #define BF07_MIC_THRESHOLD_LOW 0x12
95 #define BF07_MIC_THRESHOLD_LOWER 0x13
96 #define BF07_MIC_THRESHOLD_VERY_LOW 0x14
98 #define BF07_MIC_THRESHOLD_MIN BF07_MIC_THRESHOLD_HIGH
99 #define BF07_MIC_THRESHOLD_MAX BF07_MIC_THRESHOLD_VERY_LOW
100
101 // Microphone compression
102 #define BF07_MIC_COMPRESSION_OFF 0x10
103 #define BF07_MIC_COMPRESSION_ON 0x11
105 #define BF07_MIC_COMPRESSION_MIN BF07_MIC_COMPRESSION_OFF
106 #define BF07_MIC_COMPRESSION_MAX BF07_MIC_COMPRESSION_ON
107
108 // Microphone optimal distance
109 #define BF07_MIC_DISTANCE_M2 0x0A
110 #define BF07_MIC_DISTANCE_M1 0x0B
111 #define BF07_MIC_DISTANCE_0 0x0C
112 #define BF07_MIC_DISTANCE_P1 0x0D
113 #define BF07_MIC_DISTANCE_P2 0x0E
114 #define BF07_MIC_DISTANCE_P3 0x0F
115 #define BF07_MIC_DISTANCE_P4 0x10
116 #define BF07_MIC_DISTANCE_P5 0x11
117 #define BF07_MIC_DISTANCE_P6 0x12
118 #define BF07_MIC_DISTANCE_P7 0x13
119 #define BF07_MIC_DISTANCE_P8 0x14
121 #define BF07_MIC_DISTANCE_VERY_SHORT BF07_MIC_DISTANCE_0
122 #define BF07_MIC_DISTANCE_SHORT BF07_MIC_DISTANCE_P2
123 #define BF07_MIC_DISTANCE_MEDIUM BF07_MIC_DISTANCE_P4
124 #define BF07_MIC_DISTANCE_LONG BF07_MIC_DISTANCE_P6
126 #define BF07_MIC_DISTANCE_MIN BF07_MIC_DISTANCE_M2
127 #define BF07_MIC_DISTANCE_MAX BF07_MIC_DISTANCE_P8
128
129 // Echo cancellation state
130 #define BF07_EC_OFF 0x0F
131 #define BF07_EC_ON 0x1F
132 #define BF07_EC_NOT_PRESENT 0xFF
133
134 // Showing microphone signal on VU meter
135 #define BF07_VU_MIC_OFF 0x3C
136 #define BF07_VU_MIC_ON 0x3D
138 // Handset sidetone level
139 #define BF07_SIDETONE_LEVEL_M1 0x00
140 #define BF07_SIDETONE_LEVEL_M2 0x01
141 #define BF07_SIDETONE_LEVEL_M3 0x02
142 #define BF07_SIDETONE_LEVEL_M4 0x03
143 #define BF07_SIDETONE_LEVEL_M5 0x04
144 #define BF07_SIDETONE_LEVEL_M6 0x05
145 #define BF07_SIDETONE_LEVEL_M7 0x06
146 #define BF07_SIDETONE_LEVEL_M8 0x07
147 #define BF07_SIDETONE_LEVEL_M9 0x08
148 #define BF07_SIDETONE_OFF 0xFE
149 #define BF07_SIDETONE_ILLEGAL 0xFF
150 // limits to check
151 #define BF07_SIDETONE_MIN BF07_SIDETONE_LEVEL_M1
152 #define BF07_SIDETONE_MAX BF07_SIDETONE_LEVEL_M9
153
154 // Emulate keys
155 #define BF07_KEY_PTT_HANDSFREE 0x01
156 #define BF07_KEY_PTT_HANDSET 0x02
157 #define BF07_KEY_HOOK 0x03
159 // VU meter scenario
160 #define BF07_VU_SPK_L 0x33
161 #define BF07_VU_SPK_LR 0x37
164 /****************************************************************************/
165 /* BF07 FUNCTIONS */
166 /****************************************************************************/
167
174 int TiproBF07SetSpeakerLevel(TiproHidDevice *device, int nLevel);
175
182 int TiproBF07GetSpeakerLevel(TiproHidDevice *device, int *nLevel);
183
190 int TiproBF07SetPTTLEDState(TiproHidDevice *device, int nState);
191
198 int TiproBF07GetPTTLEDState(TiproHidDevice *device, int *nState);
199
206 int TiproBF07SetHandsetSpeakerLevel(TiproHidDevice *device, int nLevel);
207
214 int TiproBF07GetHandsetSpeakerLevel(TiproHidDevice *device, int *nLevel);
215
222 int TiproBF07SetAlertLine(TiproHidDevice *device, int nMode);
223
230 int TiproBF07GetAlertLine(TiproHidDevice *device, int *nMode);
231
239 int TiproBF07SetMicrophoneLevel(TiproHidDevice *device, int nLevel, int nDevice);
240
248 int TiproBF07GetMicrophoneLevel(TiproHidDevice *device, int *nLevel, int nDevice);
249
257 int TiproBF07SetMicrophoneThreshold(TiproHidDevice *device, int nThreshold, int nDevice);
258
266 int TiproBF07GetMicrophoneThreshold(TiproHidDevice *device, int *nThreshold, int nDevice);
267
275 int TiproBF07SetMicrophoneCompression(TiproHidDevice *device, int nCompression, int nDevice);
276
284 int TiproBF07GetMicrophoneCompression(TiproHidDevice *device, int *nCompression, int nDevice);
285
293 int TiproBF07SetMicrophoneOptimalDistance(TiproHidDevice *device, int nDistance, int nDevice);
294
302 int TiproBF07GetMicrophoneOptimalDistance(TiproHidDevice *device, int *nDistance, int nDevice);
303
311 int TiproBF07SetLEDBlinkSpeed(TiproHidDevice *device, int nTBlinkA, int nTBlinkB);
312
320 int TiproBF07GetLEDBlinkSpeed(TiproHidDevice *device, int *nTBlinkA, int *nTBlinkB);
321
327 int TiproBF07TouchscreenDisable(TiproHidDevice *device);
328
334 int TiproBF07TouchscreenEnable(TiproHidDevice *device);
335
341 int TiproBF07DisableEcho(TiproHidDevice *device);
342
348 int TiproBF07EnableEcho(TiproHidDevice *device);
349
356 int TiproBF07GetEchoState(TiproHidDevice *device, int *nState);
357
364 int TiproBF07SetMicOnVUState(TiproHidDevice *device, int nState);
365
372 int TiproBF07GetMicOnVUState(TiproHidDevice *device, int *nState);
373
380 int TiproBF07SetHandsetSidetoneLevel(TiproHidDevice *device, int nLevel);
381
388 int TiproBF07SetHandsetSidetone(TiproHidDevice *device, bool bOn);
389
396 int TiproBF07GetHandsetSidetoneLevel(TiproHidDevice *device, int *nLevel);
397
404 int TiproBF07EmulateKeyPress(TiproHidDevice *device, int nKey);
405
412 int TiproBF07EmulateKeyRelease(TiproHidDevice *device, int nKey);
413
414 #ifdef __cplusplus
415 }
416 #endif
417
418 #endif
TiproHidDevice.h
Represents Tipro device.
TiproBF07SetHandsetSidetone
int TiproBF07SetHandsetSidetone(TiproHidDevice *device, bool bOn)
Turn sidetone On or Off.
TiproBF07TouchscreenEnable
int TiproBF07TouchscreenEnable(TiproHidDevice *device)
Enables touchscreen.
TiproBF07GetMicOnVUState
int TiproBF07GetMicOnVUState(TiproHidDevice *device, int *nState)
Returns if microphone level is shown on the VU-meter (ON/OFF)
TiproBF07GetMicrophoneThreshold
int TiproBF07GetMicrophoneThreshold(TiproHidDevice *device, int *nThreshold, int nDevice)
Returns microphone threshold.
TiproBF07SetAlertLine
int TiproBF07SetAlertLine(TiproHidDevice *device, int nMode)
Sets the function (mode) of the alert line.
TiproBF07SetHandsetSidetoneLevel
int TiproBF07SetHandsetSidetoneLevel(TiproHidDevice *device, int nLevel)
Sets the level of the handset sidetone.
TiproBF07EmulateKeyRelease
int TiproBF07EmulateKeyRelease(TiproHidDevice *device, int nKey)
Emulates handset or handsfree PTT key release.
TiproBF07GetMicrophoneCompression
int TiproBF07GetMicrophoneCompression(TiproHidDevice *device, int *nCompression, int nDevice)
Returns microphone compression.
TiproBF07GetHandsetSpeakerLevel
int TiproBF07GetHandsetSpeakerLevel(TiproHidDevice *device, int *nLevel)
Returns the current level of the handset speaker.
TiproBF07SetMicrophoneThreshold
int TiproBF07SetMicrophoneThreshold(TiproHidDevice *device, int nThreshold, int nDevice)
Sets the microphone threshold.
TiproBF07GetPTTLEDState
int TiproBF07GetPTTLEDState(TiproHidDevice *device, int *nState)
Returns the LED state of the PTT key.
TiproBF07GetLEDBlinkSpeed
int TiproBF07GetLEDBlinkSpeed(TiproHidDevice *device, int *nTBlinkA, int *nTBlinkB)
Get LED blink timings.
TiproBF07SetHandsetSpeakerLevel
int TiproBF07SetHandsetSpeakerLevel(TiproHidDevice *device, int nLevel)
Sets the level of the handset spekaer.
TiproBF07SetSpeakerLevel
int TiproBF07SetSpeakerLevel(TiproHidDevice *device, int nLevel)
Sets the level of the speakers.
TiproBF07SetLEDBlinkSpeed
int TiproBF07SetLEDBlinkSpeed(TiproHidDevice *device, int nTBlinkA, int nTBlinkB)
Sets the LED blink timings.
TiproBF07SetMicOnVUState
int TiproBF07SetMicOnVUState(TiproHidDevice *device, int nState)
Sets if microphone level is shown on the VU-meter (ON/OFF)
TiproBF07GetMicrophoneOptimalDistance
int TiproBF07GetMicrophoneOptimalDistance(TiproHidDevice *device, int *nDistance, int nDevice)
Returns the optimal distance of the microphone.
TiproBF07TouchscreenDisable
int TiproBF07TouchscreenDisable(TiproHidDevice *device)
Disables touchscreen.
TiproBF07GetEchoState
int TiproBF07GetEchoState(TiproHidDevice *device, int *nState)
Returns echo state.
TiproBF07GetAlertLine
int TiproBF07GetAlertLine(TiproHidDevice *device, int *nMode)
Returns the function (mode) of the alert line.
TiproBF07EmulateKeyPress
int TiproBF07EmulateKeyPress(TiproHidDevice *device, int nKey)
Emulates handset or handsfree PTT key press.
TiproBF07EnableEcho
int TiproBF07EnableEcho(TiproHidDevice *device)
Enables echo canceler if present.
TiproBF07DisableEcho
int TiproBF07DisableEcho(TiproHidDevice *device)
Disables echo canceler.
TiproBF07SetMicrophoneCompression
int TiproBF07SetMicrophoneCompression(TiproHidDevice *device, int nCompression, int nDevice)
Sets the microphone compression.
TiproBF07SetMicrophoneLevel
int TiproBF07SetMicrophoneLevel(TiproHidDevice *device, int nLevel, int nDevice)
Sets the level of the microphone signal.
TiproBF07SetMicrophoneOptimalDistance
int TiproBF07SetMicrophoneOptimalDistance(TiproHidDevice *device, int nDistance, int nDevice)
Sets the optimal distance for the microphone.
TiproHidDevice
Definition: TiproHidDevice.h:32
TiproBF07GetHandsetSidetoneLevel
int TiproBF07GetHandsetSidetoneLevel(TiproHidDevice *device, int *nLevel)
Returns the current level of the handset sidetone.
TiproBF07SetPTTLEDState
int TiproBF07SetPTTLEDState(TiproHidDevice *device, int nState)
Sets the LED state of PTT key.
TiproBF07GetSpeakerLevel
int TiproBF07GetSpeakerLevel(TiproHidDevice *device, int *nLevel)
Returns the level of the speakers.
TiproBF07GetMicrophoneLevel
int TiproBF07GetMicrophoneLevel(TiproHidDevice *device, int *nLevel, int nDevice)
Returns the level of microphone signal.