Tipro API
Communicate with Tipro devices
Handset.h
Go to the documentation of this file.
1 
17 #ifndef _TIPRO_TIPROHIDAPI_HANDSET_H_
18 #define _TIPRO_TIPROHIDAPI_HANDSET_H_
19 
20 #include "TiproHidDevice.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 /****************************************************************************/
27 /* HANDSET DEFINES */
28 /****************************************************************************/
29 
30 // microphone level (attenuation)
31 #define HXX_MIC_ATT_0 0x00
32 #define HXX_MIC_ATT_1 0x01
33 #define HXX_MIC_ATT_2 0x02
34 #define HXX_MIC_ATT_3 0x03
35 #define HXX_MIC_ATT_4 0x04
36 #define HXX_MIC_ATT_5 0x05
37 #define HXX_MIC_ATT_6 0x06
38 #define HXX_MIC_ATT_7 0x07
39 #define HXX_MIC_ATT_8 0x08
40 #define HXX_MIC_ATT_9 0x09
41 #define HXX_MIC_ATT_10 0x0A
42 #define HXX_MIC_ATT_11 0x0B
43 #define HXX_MIC_ATT_12 0x0C
44 #define HXX_MIC_ATT_13 0x0D
45 #define HXX_MIC_ATT_14 0x0E
47 // paramters limited to usefull range
48 #define HXX_MIC_ATT_MIN HXX_MIC_ATT_0
49 #define HXX_MIC_ATT_MAX HXX_MIC_ATT_14
50 
51 // microphone compression settings
52 #define HXX_MIC_COMPRESSION_OFF 0x10
53 #define HXX_MIC_COMPRESSION_ON 0x11
55 #define HXX_MIC_COMPRESSION_MIN HXX_MIC_COMPRESSION_OFF
56 #define HXX_MIC_COMPRESSION_MAX HXX_MIC_COMPRESSION_ON
57 
58 // microphone noise threshold
59 #define HXX_MIC_THRESHOLD_HIGH 0x10
60 #define HXX_MIC_THRESHOLD_MID 0x11
61 #define HXX_MIC_THRESHOLD_LOW 0x12
62 #define HXX_MIC_THRESHOLD_LOWER 0x13
63 #define HXX_MIC_THRESHOLD_VERY_LOW 0x14
64 #define HXX_MIC_THRESHOLD_ILLEGAL 0xFF
65 
66 #define HXX_MIC_THRESHOLD_MIN HXX_MIC_THRESHOLD_HIGH
67 #define HXX_MIC_THRESHOLD_MAX HXX_MIC_THRESHOLD_VERY_LOW
68 
69 
70 // speaker
71 #define HXX_SPEAKER_LEVEL_P2 0x00
72 #define HXX_SPEAKER_LEVEL_P1 0x01
73 #define HXX_SPEAKER_LEVEL_0 0x02
74 #define HXX_SPEAKER_LEVEL_M1 0x03
75 #define HXX_SPEAKER_LEVEL_M2 0x04
76 #define HXX_SPEAKER_LEVEL_M3 0x05
77 #define HXX_SPEAKER_LEVEL_M4 0x06
78 #define HXX_SPEAKER_LEVEL_M5 0x07
79 #define HXX_SPEAKER_LEVEL_M6 0x08
80 #define HXX_SPEAKER_LEVEL_M7 0x09
81 #define HXX_SPEAKER_LEVEL_M8 0x0A
82 #define HXX_SPEAKER_LEVEL_ILLEGAL 0xFF
83 
84 #define HXX_SPEAKER_LEVEL_MIN HXX_SPEAKER_LEVEL_P2
85 #define HXX_SPEAKER_LEVEL_MAX HXX_SPEAKER_LEVEL_M8
86 
87 /* Special features not available in API */
88 #define HXX_SPEAKER_MUTE 0xF3
89 #define HXX_SPEAKER_RESTORE 0xF4
90 
91 
92 /****************************************************************************/
93 /* Handset functions */
94 /****************************************************************************/
95 
103 int TiproHandsetSetMicrophoneCompression (TiproHidDevice *device, int nHandsetNum, int nCompression);
104 
112 int TiproHandsetSetMicrophoneThreshold (TiproHidDevice *device, int nHandsetNum, int nThreshold);
113 
121 int TiproHandsetSetMicrophoneLevel (TiproHidDevice *device, int nHandsetNum, int nLevel);
122 
130 int TiproHandsetGetMicrophoneCompression (TiproHidDevice *device, int nHandsetNum, int *nCompression);
131 
139 int TiproHandsetGetMicrophoneThreshold (TiproHidDevice *device, int nHandsetNum, int *nThreshold);
140 
148 int TiproHandsetGetMicrophoneLevel (TiproHidDevice *device, int nHandsetNum, int *nLevel);
149 
157 int TiproHandsetSetSpeakerLevel(TiproHidDevice *device, int nHandsetNum, int nLevel);
158 
166 int TiproHandsetGetSpeakerLevel(TiproHidDevice *device, int nHandsetNum, int *nLevel);
167 
168 #ifdef __cplusplus
169 }
170 #endif
171 
172 #endif
Represents Tipro device.
int TiproHandsetSetMicrophoneLevel(TiproHidDevice *device, int nHandsetNum, int nLevel)
Sets level of the microphone signal.
int TiproHandsetGetMicrophoneCompression(TiproHidDevice *device, int nHandsetNum, int *nCompression)
Returns compression for the microphone signal.
int TiproHandsetSetSpeakerLevel(TiproHidDevice *device, int nHandsetNum, int nLevel)
Sets the level of the handset speaker.
int TiproHandsetGetMicrophoneLevel(TiproHidDevice *device, int nHandsetNum, int *nLevel)
Returns compression for the microphone signal.
int TiproHandsetSetMicrophoneCompression(TiproHidDevice *device, int nHandsetNum, int nCompression)
Set compression for the microphone signal.
int TiproHandsetSetMicrophoneThreshold(TiproHidDevice *device, int nHandsetNum, int nThreshold)
Sets threshold level for the microphone signal.
int TiproHandsetGetSpeakerLevel(TiproHidDevice *device, int nHandsetNum, int *nLevel)
Returns the level of the handset speaker.
Definition: TiproHidDevice.h:32
int TiproHandsetGetMicrophoneThreshold(TiproHidDevice *device, int nHandsetNum, int *nThreshold)
Returns threshold for the microphone signal.