mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-12 19:45:22 +02:00
Bug 480602 - Add delay to serial port close.
The FTDI drivers are slow at closing and don't wait for the close to happen. Adds a one second delay. Also upgrades the project files for VS 2015. Change-Id: Iccb77f3c9f4b5dc73a9529c1d0eab940391ce95d
This commit is contained in:
parent
4d22181892
commit
2838a8621a
7 changed files with 13 additions and 5 deletions
|
@ -4,3 +4,4 @@
|
|||
/serial.opensdf
|
||||
/serial.sdf
|
||||
/serial.v12.suo
|
||||
/.vs/
|
||||
|
|
|
@ -89,7 +89,10 @@ JNIEXPORT jlong JNICALL FUNC(open0)(JNIEnv *env, jobject jobj, jstring portName,
|
|||
extern "C"
|
||||
JNIEXPORT void JNICALL FUNC(close0)(JNIEnv *env, jobject jobj, jlong handle)
|
||||
{
|
||||
CancelIoEx((HANDLE)handle, NULL);
|
||||
CloseHandle((HANDLE)handle);
|
||||
// Some drivers need us to delay a bit to make sure ports closed
|
||||
Sleep(1000);
|
||||
}
|
||||
|
||||
extern "C"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
|
@ -27,26 +27,26 @@
|
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
/serial.exp
|
||||
/serial.lib
|
||||
/serial.pdb
|
||||
/serial.iobj
|
||||
/serial.ipdb
|
||||
|
|
Binary file not shown.
|
@ -1,3 +1,5 @@
|
|||
/serial.exp
|
||||
/serial.lib
|
||||
/serial.pdb
|
||||
/serial.iobj
|
||||
/serial.ipdb
|
||||
|
|
Binary file not shown.
Loading…
Add table
Reference in a new issue