gsmopen: windows now works

This commit is contained in:
Giovanni Maruzzelli 2012-04-02 19:01:45 +02:00
parent d9338ee28c
commit eaa37c3e41
5 changed files with 12 additions and 12 deletions

View File

@ -642,7 +642,7 @@ int alarm_event(private_t * tech_pvt, int alarm_code, const char *alarm_message)
int dump_event_full(private_t * tech_pvt, int is_alarm, int alarm_code, const char *alarm_message);
int gsmopen_serial_init_audio_port(private_t * tech_pvt, speed_t controldevice_audio_speed);
int gsmopen_serial_init_audio_port(private_t * tech_pvt, int controldevice_audio_speed);
int serial_audio_init(private_t * tech_pvt);
int serial_audio_shutdown(private_t * tech_pvt);

View File

@ -55,12 +55,12 @@ int gettimeofday(struct timeval *tv, struct sk_timezone *tz)
/***************/
#endif /* WIN32 */
int gsmopen_serial_init(private_t * tech_pvt, speed_t controldevice_speed)
int gsmopen_serial_init(private_t * tech_pvt, int controldevice_speed)
{
tech_pvt->serialPort_serial_control = new ctb::SerialPort();
if( tech_pvt->serialPort_serial_control->Open( "/dev/ttyUSB3", 115200, "8N1", ctb::SerialPort::NoFlowControl ) >= 0 ) {
if( tech_pvt->serialPort_serial_control->Open( "COM9", 115200, "8N1", ctb::SerialPort::NoFlowControl ) >= 0 ) {
ERRORA("port SUCCESS open\n", GSMOPEN_P_LOG);
} else {
ERRORA("port NOT open\n", GSMOPEN_P_LOG);
@ -3574,11 +3574,11 @@ int gsmopen_serial_getstatus_AT(private_t * tech_pvt)
}
int gsmopen_serial_init_audio_port(private_t * tech_pvt, speed_t controldevice_audio_speed)
int gsmopen_serial_init_audio_port(private_t * tech_pvt, int controldevice_audio_speed)
{
tech_pvt->serialPort_serial_audio = new ctb::SerialPort();
if( tech_pvt->serialPort_serial_audio->Open( "/dev/ttyUSB2", 115200, "8N1", ctb::SerialPort::NoFlowControl ) >= 0 ) {
if( tech_pvt->serialPort_serial_audio->Open( "COM8", 115200, "8N1", ctb::SerialPort::NoFlowControl ) >= 0 ) {
ERRORA("port SUCCESS open\n", GSMOPEN_P_LOG);
} else {
ERRORA("port NOT open\n", GSMOPEN_P_LOG);

View File

@ -44,7 +44,7 @@ INSTALLDIR = $(WXWIN)
### Variables: ###
CTB_LIB_CXXFLAGS = /MT$(____DEBUG_4) /DWIN32 $(____DEBUG) $(____DEBUG_2) \
CTB_LIB_CXXFLAGS = /MD$(____DEBUG_4) /DWIN32 $(____DEBUG) $(____DEBUG_2) \
$(______DEBUG) /Fd..\lib\ctb$(LIBFLAG)$(GPIBFLAG)-0.16.pdb \
$(__OPTIMIZE_FLAG) /I..\include /GR /EHsc $(CPPFLAGS) $(CXXFLAGS)
CTB_LIB_OBJECTS = \
@ -56,7 +56,7 @@ CTB_LIB_OBJECTS = \
$(OUTPUT)\ctb_lib_serport.obj \
$(OUTPUT)\ctb_lib_timer.obj \
$(____GPIBSRC_FILENAMES_OBJECTS)
CTB_DLL_CXXFLAGS = /MT$(____DEBUG_4) /DWIN32 $(____DEBUG) $(____DEBUG_2) \
CTB_DLL_CXXFLAGS = /MD$(____DEBUG_4) /DWIN32 $(____DEBUG) $(____DEBUG_2) \
$(______DEBUG) /Fd..\lib\ctb$(LIBFLAG)$(GPIBFLAG)-0.16.pdb \
$(__OPTIMIZE_FLAG) /I..\include /GR /EHsc $(CPPFLAGS) $(CXXFLAGS)
CTB_DLL_OBJECTS = \
@ -68,7 +68,7 @@ CTB_DLL_OBJECTS = \
$(OUTPUT)\ctb_dll_serport.obj \
$(OUTPUT)\ctb_dll_timer.obj \
$(____GPIBSRC_FILENAMES_1_OBJECTS)
CTBTEST_CXXFLAGS = /MT$(____DEBUG_4) /DWIN32 $(____DEBUG) $(____DEBUG_2) \
CTBTEST_CXXFLAGS = /MD$(____DEBUG_4) /DWIN32 $(____DEBUG) $(____DEBUG_2) \
$(______DEBUG) /Fd$(OUTPUT)\ctbtest.pdb /DGPIB=$(GPIB) $(__OPTIMIZE_FLAG) \
/I..\include /GR /EHsc $(CPPFLAGS) $(CXXFLAGS)
CTBTEST_OBJECTS = \

View File

@ -39,7 +39,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;gsmlib\gsmlib-1.10-patched-12ubuntu1&quot;;&quot;$(InputDir)..\..\..\..\libs\spandsp\src\msvc&quot;;&quot;$(InputDir)..\..\..\..\libs\spandsp\src&quot;;&quot;$(InputDir)..\..\..\..\libs\tiff-3.8.2\libtiff&quot;"
AdditionalIncludeDirectories="&quot;libctb-0.16\include&quot;;&quot;$(InputDir)..\..\..\..\libs\spandsp\src\msvc&quot;;&quot;$(InputDir)..\..\..\..\libs\spandsp\src&quot;;&quot;$(InputDir)..\..\..\..\libs\tiff-3.8.2\libtiff&quot;"
PreprocessorDefinitions="NO_ALSA"
UsePrecompiledHeader="0"
WarningLevel="4"
@ -56,9 +56,9 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions=" gsmlib.lib &quot;..\..\..\..\w32\library\debug\freeswitchcore.lib&quot; &quot;..\..\..\..\libs\libteletone\Debug\libteletone.lib&quot; ksuser.lib &quot;..\..\..\..\libs\win32\apr\debug\libapr-1.lib&quot;&#x0D;&#x0A;rpcrt4.lib &quot;..\..\..\..\debug\libtiff.lib&quot; &quot;..\..\..\..\libs\spandsp\src\debug\spandsp.lib&quot;"
AdditionalOptions=" ctbd-0.16.lib &quot;..\..\..\..\w32\library\debug\freeswitchcore.lib&quot; &quot;..\..\..\..\libs\libteletone\Debug\libteletone.lib&quot; ksuser.lib &quot;..\..\..\..\libs\win32\apr\debug\libapr-1.lib&quot;&#x0D;&#x0A;rpcrt4.lib &quot;..\..\..\..\debug\libtiff.lib&quot; &quot;..\..\..\..\libs\spandsp\src\debug\spandsp.lib&quot;"
LinkIncremental="1"
AdditionalLibraryDirectories="&quot;gsmlib/gsmlib-1.10-patched-12ubuntu1/win32/Debug/&quot;"
AdditionalLibraryDirectories="&quot;libctb-0.16\lib&quot;"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>

View File

@ -919,7 +919,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
*frame = &tech_pvt->read_frame;
#ifdef BIGENDIAN
if (switch_test_flag(tech_pvt, TFLAG_LINEAR)) {
switch_swap_linear((*frame)->data, (int) (*frame)->datalen / 2);
switch_swap_linear((int16_t *)(*frame)->data, (int) (*frame)->datalen / 2);
}
#endif
//WARNINGA("HERE\n", GSMOPEN_P_LOG);