commit
dd59a21ca9
53 changed files with 5772 additions and 0 deletions
@ -0,0 +1,454 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<!DOCTYPE QtCreatorProject> |
||||||
|
<!-- Written by QtCreator 11.0.1, 2024-05-19T19:02:09. --> |
||||||
|
<qtcreator> |
||||||
|
<data> |
||||||
|
<variable>EnvironmentId</variable> |
||||||
|
<value type="QByteArray">{b996d7c2-8baa-4dd5-9c90-a55ade3bd4fb}</value> |
||||||
|
</data> |
||||||
|
<data> |
||||||
|
<variable>ProjectExplorer.Project.ActiveTarget</variable> |
||||||
|
<value type="qlonglong">0</value> |
||||||
|
</data> |
||||||
|
<data> |
||||||
|
<variable>ProjectExplorer.Project.EditorSettings</variable> |
||||||
|
<valuemap type="QVariantMap"> |
||||||
|
<value type="bool" key="EditorConfiguration.AutoIndent">true</value> |
||||||
|
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> |
||||||
|
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> |
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> |
||||||
|
<value type="QString" key="language">Cpp</value> |
||||||
|
<valuemap type="QVariantMap" key="value"> |
||||||
|
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value> |
||||||
|
</valuemap> |
||||||
|
</valuemap> |
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> |
||||||
|
<value type="QString" key="language">QmlJS</value> |
||||||
|
<valuemap type="QVariantMap" key="value"> |
||||||
|
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value> |
||||||
|
</valuemap> |
||||||
|
</valuemap> |
||||||
|
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value> |
||||||
|
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value> |
||||||
|
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> |
||||||
|
<value type="int" key="EditorConfiguration.IndentSize">4</value> |
||||||
|
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> |
||||||
|
<value type="int" key="EditorConfiguration.MarginColumn">80</value> |
||||||
|
<value type="bool" key="EditorConfiguration.MouseHiding">true</value> |
||||||
|
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value> |
||||||
|
<value type="int" key="EditorConfiguration.PaddingMode">1</value> |
||||||
|
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value> |
||||||
|
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> |
||||||
|
<value type="bool" key="EditorConfiguration.ShowMargin">false</value> |
||||||
|
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> |
||||||
|
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value> |
||||||
|
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> |
||||||
|
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> |
||||||
|
<value type="int" key="EditorConfiguration.TabSize">8</value> |
||||||
|
<value type="bool" key="EditorConfiguration.UseGlobal">true</value> |
||||||
|
<value type="bool" key="EditorConfiguration.UseIndenter">false</value> |
||||||
|
<value type="int" key="EditorConfiguration.Utf8BomBehavior">0</value> |
||||||
|
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> |
||||||
|
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value> |
||||||
|
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> |
||||||
|
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value> |
||||||
|
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value> |
||||||
|
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value> |
||||||
|
<value type="bool" key="EditorConfiguration.tintMarginArea">true</value> |
||||||
|
</valuemap> |
||||||
|
</data> |
||||||
|
<data> |
||||||
|
<variable>ProjectExplorer.Project.PluginSettings</variable> |
||||||
|
<valuemap type="QVariantMap"> |
||||||
|
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks"> |
||||||
|
<value type="bool" key="AutoTest.Framework.Boost">true</value> |
||||||
|
<value type="bool" key="AutoTest.Framework.CTest">false</value> |
||||||
|
<value type="bool" key="AutoTest.Framework.Catch">true</value> |
||||||
|
<value type="bool" key="AutoTest.Framework.GTest">true</value> |
||||||
|
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value> |
||||||
|
<value type="bool" key="AutoTest.Framework.QtTest">true</value> |
||||||
|
</valuemap> |
||||||
|
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/> |
||||||
|
<value type="int" key="AutoTest.RunAfterBuild">0</value> |
||||||
|
<value type="bool" key="AutoTest.UseGlobal">true</value> |
||||||
|
<valuemap type="QVariantMap" key="ClangTools"> |
||||||
|
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value> |
||||||
|
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value> |
||||||
|
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value> |
||||||
|
<value type="int" key="ClangTools.ParallelJobs">8</value> |
||||||
|
<value type="bool" key="ClangTools.PreferConfigFile">true</value> |
||||||
|
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/> |
||||||
|
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/> |
||||||
|
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/> |
||||||
|
<value type="bool" key="ClangTools.UseGlobalSettings">true</value> |
||||||
|
</valuemap> |
||||||
|
<valuemap type="QVariantMap" key="CppEditor.QuickFix"> |
||||||
|
<value type="bool" key="UseGlobalSettings">true</value> |
||||||
|
</valuemap> |
||||||
|
</valuemap> |
||||||
|
</data> |
||||||
|
<data> |
||||||
|
<variable>ProjectExplorer.Project.Target.0</variable> |
||||||
|
<valuemap type="QVariantMap"> |
||||||
|
<value type="QString" key="DeviceType">Desktop</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.15.2 MSVC2019 64bit</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.15.2 MSVC2019 64bit</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5152.win64_msvc2019_64_kit</value> |
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value> |
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">2</value> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
||||||
|
<value type="QString" key="CMake.Build.Type">Debug</value> |
||||||
|
<value type="int" key="CMake.Configure.BaseEnvironment">2</value> |
||||||
|
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/> |
||||||
|
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja |
||||||
|
-DCMAKE_BUILD_TYPE:STRING=Debug |
||||||
|
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake |
||||||
|
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} |
||||||
|
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} |
||||||
|
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} |
||||||
|
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} |
||||||
|
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value> |
||||||
|
<value type="int" key="EnableQmlDebugging">0</value> |
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\WorkSpace\zxrcClientNew\build-zxrcClient-Desktop_Qt_5_15_2_MSVC2019_64bit-Debug</value> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
||||||
|
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"> |
||||||
|
<value type="QString">all</value> |
||||||
|
</valuelist> |
||||||
|
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value> |
||||||
|
</valuemap> |
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
||||||
|
</valuemap> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
||||||
|
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"> |
||||||
|
<value type="QString">clean</value> |
||||||
|
</valuelist> |
||||||
|
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value> |
||||||
|
</valuemap> |
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
||||||
|
</valuemap> |
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value> |
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value> |
||||||
|
</valuemap> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> |
||||||
|
<value type="QString" key="CMake.Build.Type">Release</value> |
||||||
|
<value type="int" key="CMake.Configure.BaseEnvironment">2</value> |
||||||
|
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/> |
||||||
|
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja |
||||||
|
-DCMAKE_BUILD_TYPE:STRING=Release |
||||||
|
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake |
||||||
|
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} |
||||||
|
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} |
||||||
|
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} |
||||||
|
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} |
||||||
|
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value> |
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\WorkSpace\zxrcClientNew\build-zxrcClient-Desktop_Qt_5_15_2_MSVC2019_64bit-Release</value> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
||||||
|
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"> |
||||||
|
<value type="QString">all</value> |
||||||
|
</valuelist> |
||||||
|
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value> |
||||||
|
</valuemap> |
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
||||||
|
</valuemap> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
||||||
|
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"> |
||||||
|
<value type="QString">clean</value> |
||||||
|
</valuelist> |
||||||
|
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value> |
||||||
|
</valuemap> |
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
||||||
|
</valuemap> |
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value> |
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value> |
||||||
|
</valuemap> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2"> |
||||||
|
<value type="QString" key="CMake.Build.Type">RelWithDebInfo</value> |
||||||
|
<value type="int" key="CMake.Configure.BaseEnvironment">2</value> |
||||||
|
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/> |
||||||
|
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja |
||||||
|
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo |
||||||
|
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake |
||||||
|
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} |
||||||
|
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} |
||||||
|
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} |
||||||
|
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} |
||||||
|
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value> |
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\WorkSpace\zxrcClientNew\build-zxrcClient-Desktop_Qt_5_15_2_MSVC2019_64bit-RelWithDebInfo</value> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
||||||
|
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"> |
||||||
|
<value type="QString">all</value> |
||||||
|
</valuelist> |
||||||
|
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value> |
||||||
|
</valuemap> |
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
||||||
|
</valuemap> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
||||||
|
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"> |
||||||
|
<value type="QString">clean</value> |
||||||
|
</valuelist> |
||||||
|
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value> |
||||||
|
</valuemap> |
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
||||||
|
</valuemap> |
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value> |
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release with Debug Information</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value> |
||||||
|
</valuemap> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.3"> |
||||||
|
<value type="QString" key="CMake.Build.Type">RelWithDebInfo</value> |
||||||
|
<value type="int" key="CMake.Configure.BaseEnvironment">2</value> |
||||||
|
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/> |
||||||
|
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja |
||||||
|
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo |
||||||
|
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake |
||||||
|
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} |
||||||
|
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} |
||||||
|
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} |
||||||
|
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} |
||||||
|
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value> |
||||||
|
<value type="int" key="EnableQmlDebugging">0</value> |
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\WorkSpace\zxrcClientNew\build-zxrcClient-Desktop_Qt_5_15_2_MSVC2019_64bit-Profile</value> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
||||||
|
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"> |
||||||
|
<value type="QString">all</value> |
||||||
|
</valuelist> |
||||||
|
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value> |
||||||
|
</valuemap> |
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
||||||
|
</valuemap> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
||||||
|
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"> |
||||||
|
<value type="QString">clean</value> |
||||||
|
</valuelist> |
||||||
|
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value> |
||||||
|
</valuemap> |
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
||||||
|
</valuemap> |
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value> |
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value> |
||||||
|
</valuemap> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.4"> |
||||||
|
<value type="QString" key="CMake.Build.Type">MinSizeRel</value> |
||||||
|
<value type="int" key="CMake.Configure.BaseEnvironment">2</value> |
||||||
|
<value type="bool" key="CMake.Configure.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="CMake.Configure.UserEnvironmentChanges"/> |
||||||
|
<value type="QString" key="CMake.Initial.Parameters">-DCMAKE_GENERATOR:STRING=Ninja |
||||||
|
-DCMAKE_BUILD_TYPE:STRING=MinSizeRel |
||||||
|
-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake |
||||||
|
-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} |
||||||
|
-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} |
||||||
|
-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} |
||||||
|
-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} |
||||||
|
-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG}</value> |
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:\WorkSpace\zxrcClientNew\build-zxrcClient-Desktop_Qt_5_15_2_MSVC2019_64bit-MinSizeRel</value> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
||||||
|
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"> |
||||||
|
<value type="QString">all</value> |
||||||
|
</valuelist> |
||||||
|
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value> |
||||||
|
</valuemap> |
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
||||||
|
</valuemap> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
||||||
|
<value type="QString" key="CMakeProjectManager.MakeStep.BuildPreset"></value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets"> |
||||||
|
<value type="QString">clean</value> |
||||||
|
</valuelist> |
||||||
|
<value type="bool" key="CMakeProjectManager.MakeStep.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.UserEnvironmentChanges"/> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value> |
||||||
|
</valuemap> |
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
||||||
|
</valuemap> |
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/> |
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value> |
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Minimum Size Release</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value> |
||||||
|
</valuemap> |
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">5</value> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">部署</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">部署</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> |
||||||
|
</valuemap> |
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/> |
||||||
|
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> |
||||||
|
</valuemap> |
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
||||||
|
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value> |
||||||
|
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value> |
||||||
|
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> |
||||||
|
<valuelist type="QVariantList" key="CustomOutputParsers"/> |
||||||
|
<value type="int" key="PE.EnvironmentAspect.Base">2</value> |
||||||
|
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> |
||||||
|
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">zxrcClient</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.zxrcClient</value> |
||||||
|
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">zxrcClient</value> |
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> |
||||||
|
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value> |
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> |
||||||
|
<value type="bool" key="RunConfiguration.UseTerminal">true</value> |
||||||
|
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/WorkSpace/zxrcClientNew/build-zxrcClient-Desktop_Qt_5_15_2_MSVC2019_64bit-Release</value> |
||||||
|
</valuemap> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1"> |
||||||
|
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value> |
||||||
|
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value> |
||||||
|
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> |
||||||
|
<valuelist type="QVariantList" key="CustomOutputParsers"/> |
||||||
|
<value type="int" key="PE.EnvironmentAspect.Base">2</value> |
||||||
|
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> |
||||||
|
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">zxrcClientSim</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.zxrcClientSim</value> |
||||||
|
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">zxrcClientSim</value> |
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> |
||||||
|
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value> |
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> |
||||||
|
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/WorkSpace/zxrcClientNew/build-zxrcClient-Desktop_Qt_5_15_2_MSVC2019_64bit-Release</value> |
||||||
|
</valuemap> |
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.2"> |
||||||
|
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value> |
||||||
|
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value> |
||||||
|
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> |
||||||
|
<valuelist type="QVariantList" key="CustomOutputParsers"/> |
||||||
|
<value type="int" key="PE.EnvironmentAspect.Base">2</value> |
||||||
|
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> |
||||||
|
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">zxrcClientPC</value> |
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.zxrcClientPC</value> |
||||||
|
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">zxrcClientPC</value> |
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> |
||||||
|
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value> |
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> |
||||||
|
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/WorkSpace/zxrcClientNew/build-zxrcClient-Desktop_Qt_5_15_2_MSVC2019_64bit-Release</value> |
||||||
|
</valuemap> |
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">3</value> |
||||||
|
</valuemap> |
||||||
|
</data> |
||||||
|
<data> |
||||||
|
<variable>ProjectExplorer.Project.TargetCount</variable> |
||||||
|
<value type="qlonglong">1</value> |
||||||
|
</data> |
||||||
|
<data> |
||||||
|
<variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
||||||
|
<value type="int">22</value> |
||||||
|
</data> |
||||||
|
<data> |
||||||
|
<variable>Version</variable> |
||||||
|
<value type="int">22</value> |
||||||
|
</data> |
||||||
|
</qtcreator> |
Binary file not shown.
Binary file not shown.
@ -0,0 +1,600 @@ |
|||||||
|
/*
|
||||||
|
## Cypress CyAPI C++ library header file (CyAPI.h) |
||||||
|
## ======================================================= |
||||||
|
## |
||||||
|
## Copyright Cypress Semiconductor Corporation, 2009-2018, |
||||||
|
## All Rights Reserved |
||||||
|
## UNPUBLISHED, LICENSED SOFTWARE. |
||||||
|
## |
||||||
|
## CONFIDENTIAL AND PROPRIETARY INFORMATION |
||||||
|
## WHICH IS THE PROPERTY OF CYPRESS. |
||||||
|
## |
||||||
|
## Use of this file is governed |
||||||
|
## by the license agreement included in the file |
||||||
|
## |
||||||
|
## <install>/license/license.rtf |
||||||
|
## |
||||||
|
## where <install> is the Cypress software |
||||||
|
## install root directory path. |
||||||
|
## |
||||||
|
## ======================================================= |
||||||
|
*/ |
||||||
|
|
||||||
|
#ifndef CyUSBH |
||||||
|
#define CyUSBH |
||||||
|
|
||||||
|
#include "cyusb30_def.h" |
||||||
|
|
||||||
|
/* Data straucture for the Vendor request and data */ |
||||||
|
typedef struct vendorCmdData |
||||||
|
{ |
||||||
|
UCHAR *buf; /* Pointer to the data */ |
||||||
|
UCHAR opCode; /* Vendor request code */ |
||||||
|
UINT addr; /* Read/Write address */ |
||||||
|
long size; /* Size of the read/write */ |
||||||
|
bool isRead; /* Read or write */ |
||||||
|
} vendorCmdData ; |
||||||
|
|
||||||
|
#ifndef __USB200_H__ |
||||||
|
#define __USB200_H__ |
||||||
|
#pragma pack(push,1) |
||||||
|
typedef struct _USB_DEVICE_DESCRIPTOR { |
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
USHORT bcdUSB; |
||||||
|
UCHAR bDeviceClass; |
||||||
|
UCHAR bDeviceSubClass; |
||||||
|
UCHAR bDeviceProtocol; |
||||||
|
UCHAR bMaxPacketSize0; |
||||||
|
USHORT idVendor; |
||||||
|
USHORT idProduct; |
||||||
|
USHORT bcdDevice; |
||||||
|
UCHAR iManufacturer; |
||||||
|
UCHAR iProduct; |
||||||
|
UCHAR iSerialNumber; |
||||||
|
UCHAR bNumConfigurations; |
||||||
|
} USB_DEVICE_DESCRIPTOR, *PUSB_DEVICE_DESCRIPTOR; |
||||||
|
|
||||||
|
typedef struct _USB_ENDPOINT_DESCRIPTOR { |
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
UCHAR bEndpointAddress; |
||||||
|
UCHAR bmAttributes; |
||||||
|
USHORT wMaxPacketSize; |
||||||
|
UCHAR bInterval; |
||||||
|
} USB_ENDPOINT_DESCRIPTOR, *PUSB_ENDPOINT_DESCRIPTOR; |
||||||
|
|
||||||
|
typedef struct _USB_CONFIGURATION_DESCRIPTOR { |
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
USHORT wTotalLength; |
||||||
|
UCHAR bNumInterfaces; |
||||||
|
UCHAR bConfigurationValue; |
||||||
|
UCHAR iConfiguration; |
||||||
|
UCHAR bmAttributes; |
||||||
|
UCHAR MaxPower; |
||||||
|
} USB_CONFIGURATION_DESCRIPTOR, *PUSB_CONFIGURATION_DESCRIPTOR; |
||||||
|
|
||||||
|
typedef struct _USB_INTERFACE_DESCRIPTOR { |
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
UCHAR bInterfaceNumber; |
||||||
|
UCHAR bAlternateSetting; |
||||||
|
UCHAR bNumEndpoints; |
||||||
|
UCHAR bInterfaceClass; |
||||||
|
UCHAR bInterfaceSubClass; |
||||||
|
UCHAR bInterfaceProtocol; |
||||||
|
UCHAR iInterface; |
||||||
|
} USB_INTERFACE_DESCRIPTOR, *PUSB_INTERFACE_DESCRIPTOR; |
||||||
|
|
||||||
|
typedef struct _USB_STRING_DESCRIPTOR { |
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
WCHAR bString[1]; |
||||||
|
} USB_STRING_DESCRIPTOR, *PUSB_STRING_DESCRIPTOR; |
||||||
|
|
||||||
|
typedef struct _USB_COMMON_DESCRIPTOR { |
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
} USB_COMMON_DESCRIPTOR, *PUSB_COMMON_DESCRIPTOR; |
||||||
|
#pragma pack(pop) |
||||||
|
#endif |
||||||
|
|
||||||
|
/*******************************************************************************/ |
||||||
|
class CCyIsoPktInfo { |
||||||
|
public: |
||||||
|
LONG Status; |
||||||
|
LONG Length; |
||||||
|
}; |
||||||
|
|
||||||
|
/*******************************************************************************/ |
||||||
|
|
||||||
|
|
||||||
|
/* {AE18AA60-7F6A-11d4-97DD-00010229B959} */ |
||||||
|
static GUID CYUSBDRV_GUID = {0xae18aa60, 0x7f6a, 0x11d4, 0x97, 0xdd, 0x0, 0x1, 0x2, 0x29, 0xb9, 0x59}; |
||||||
|
|
||||||
|
typedef enum {TGT_DEVICE, TGT_INTFC, TGT_ENDPT, TGT_OTHER } CTL_XFER_TGT_TYPE; |
||||||
|
typedef enum {REQ_STD, REQ_CLASS, REQ_VENDOR } CTL_XFER_REQ_TYPE; |
||||||
|
typedef enum {DIR_TO_DEVICE, DIR_FROM_DEVICE } CTL_XFER_DIR_TYPE; |
||||||
|
typedef enum {XMODE_BUFFERED, XMODE_DIRECT } XFER_MODE_TYPE; |
||||||
|
|
||||||
|
const int MAX_ENDPTS = 32; |
||||||
|
const int MAX_INTERFACES = 255; |
||||||
|
const int USB_STRING_MAXLEN = 256; |
||||||
|
|
||||||
|
#define BUFSIZE_UPORT 2048 //4096 - CDT 130492
|
||||||
|
typedef enum { RAM = 1, I2CE2PROM, SPIFLASH } FX3_FWDWNLOAD_MEDIA_TYPE ; |
||||||
|
typedef enum { SUCCESS = 0, FAILED, INVALID_MEDIA_TYPE, INVALID_FWSIGNATURE, DEVICE_CREATE_FAILED, INCORRECT_IMAGE_LENGTH, INVALID_FILE, SPILASH_ERASE_FAILED, CORRUPT_FIRMWARE_IMAGE_FILE,I2CE2PROM_UNKNOWN_I2C_SIZE } FX3_FWDWNLOAD_ERROR_CODE; |
||||||
|
|
||||||
|
#define CYWB_BL_4_BYTES_COPY(destination,source) {memcpy((void *)(destination), (void *)(source), 4);} |
||||||
|
|
||||||
|
/********************************************************************************
|
||||||
|
* |
||||||
|
* The CCyEndPoint ABSTRACT Class |
||||||
|
* |
||||||
|
********************************************************************************/ |
||||||
|
class CCyUSBEndPoint |
||||||
|
{ |
||||||
|
protected: |
||||||
|
bool WaitForIO(OVERLAPPED *ovLapStatus); |
||||||
|
|
||||||
|
virtual PUCHAR BeginDirectXfer(PUCHAR buf, LONG bufLen, OVERLAPPED *ov); |
||||||
|
virtual PUCHAR BeginBufferedXfer(PUCHAR buf, LONG bufLen, OVERLAPPED *ov); |
||||||
|
|
||||||
|
public: |
||||||
|
|
||||||
|
CCyUSBEndPoint(void); |
||||||
|
CCyUSBEndPoint(CCyUSBEndPoint& ept); |
||||||
|
CCyUSBEndPoint(HANDLE h, PUSB_ENDPOINT_DESCRIPTOR pEndPtDescriptor); |
||||||
|
CCyUSBEndPoint(HANDLE hDev, PUSB_ENDPOINT_DESCRIPTOR pEndPtDescriptor,USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR* SSEndPtDescriptor); |
||||||
|
|
||||||
|
HANDLE hDevice; |
||||||
|
|
||||||
|
/* The fields of an EndPoint Descriptor */ |
||||||
|
UCHAR DscLen; |
||||||
|
UCHAR DscType; |
||||||
|
UCHAR Address; |
||||||
|
UCHAR Attributes; |
||||||
|
USHORT MaxPktSize; |
||||||
|
USHORT PktsPerFrame; |
||||||
|
UCHAR Interval; |
||||||
|
/* This are the fields for Super speed endpoint */ |
||||||
|
UCHAR ssdscLen; |
||||||
|
UCHAR ssdscType; |
||||||
|
UCHAR ssmaxburst; /* Maximum number of packets endpoint can send in one burst */ |
||||||
|
UCHAR ssbmAttribute; /* store endpoint attribute like for bulk it will be number of streams */ |
||||||
|
USHORT ssbytesperinterval; |
||||||
|
|
||||||
|
/* Other fields */ |
||||||
|
ULONG TimeOut; |
||||||
|
ULONG UsbdStatus; |
||||||
|
ULONG NtStatus; |
||||||
|
|
||||||
|
DWORD bytesWritten; |
||||||
|
DWORD LastError; |
||||||
|
bool bIn; |
||||||
|
|
||||||
|
XFER_MODE_TYPE XferMode; |
||||||
|
|
||||||
|
bool XferData(PUCHAR buf, LONG &len, CCyIsoPktInfo* pktInfos = NULL); |
||||||
|
bool XferData(PUCHAR buf, LONG &bufLen, CCyIsoPktInfo* pktInfos, bool pktMode); |
||||||
|
virtual PUCHAR BeginDataXfer(PUCHAR buf, LONG len, OVERLAPPED *ov) = 0; |
||||||
|
virtual bool FinishDataXfer(PUCHAR buf, LONG &len, OVERLAPPED *ov, PUCHAR pXmitBuf, CCyIsoPktInfo* pktInfos = NULL); |
||||||
|
bool WaitForXfer(OVERLAPPED *ov, ULONG tOut); |
||||||
|
ULONG GetXferSize(void); |
||||||
|
void SetXferSize(ULONG xfer); |
||||||
|
|
||||||
|
bool Reset(void); |
||||||
|
bool Abort(void); |
||||||
|
}; |
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************************
|
||||||
|
* |
||||||
|
* The Control Endpoint Class |
||||||
|
* |
||||||
|
********************************************************************************/ |
||||||
|
class CCyControlEndPoint : public CCyUSBEndPoint |
||||||
|
{ |
||||||
|
public: |
||||||
|
CCyControlEndPoint(void); |
||||||
|
CCyControlEndPoint(CCyControlEndPoint& ept); |
||||||
|
CCyControlEndPoint(HANDLE h, PUSB_ENDPOINT_DESCRIPTOR pEndPtDescriptor); |
||||||
|
|
||||||
|
CTL_XFER_TGT_TYPE Target; |
||||||
|
CTL_XFER_REQ_TYPE ReqType; |
||||||
|
CTL_XFER_DIR_TYPE Direction; |
||||||
|
|
||||||
|
UCHAR ReqCode; |
||||||
|
WORD Value; |
||||||
|
WORD Index; |
||||||
|
|
||||||
|
bool Read(PUCHAR buf, LONG &len); |
||||||
|
bool Write(PUCHAR buf, LONG &len); |
||||||
|
PUCHAR BeginDataXfer(PUCHAR buf, LONG len, OVERLAPPED *ov); |
||||||
|
}; |
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************************
|
||||||
|
* |
||||||
|
* The Isoc Endpoint Class |
||||||
|
* |
||||||
|
********************************************************************************/ |
||||||
|
class CCyIsocEndPoint : public CCyUSBEndPoint |
||||||
|
{ |
||||||
|
|
||||||
|
protected: |
||||||
|
virtual PUCHAR BeginDirectXfer(PUCHAR buf, LONG bufLen, OVERLAPPED *ov); |
||||||
|
virtual PUCHAR BeginBufferedXfer(PUCHAR buf, LONG bufLen, OVERLAPPED *ov); |
||||||
|
|
||||||
|
public: |
||||||
|
CCyIsocEndPoint(void); |
||||||
|
CCyIsocEndPoint(HANDLE h, PUSB_ENDPOINT_DESCRIPTOR pEndPtDescriptor); |
||||||
|
CCyIsocEndPoint(HANDLE h, PUSB_ENDPOINT_DESCRIPTOR pEndPtDescriptor,USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR* SSEndPtDescriptor); |
||||||
|
|
||||||
|
PUCHAR BeginDataXfer(PUCHAR buf, LONG len, OVERLAPPED *ov); |
||||||
|
CCyIsoPktInfo* CreatePktInfos(LONG bufLen, int &packets); |
||||||
|
}; |
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************************
|
||||||
|
* |
||||||
|
* The Bulk Endpoint Class |
||||||
|
* |
||||||
|
********************************************************************************/ |
||||||
|
class CCyBulkEndPoint : public CCyUSBEndPoint |
||||||
|
{ |
||||||
|
public: |
||||||
|
CCyBulkEndPoint(void); |
||||||
|
CCyBulkEndPoint(HANDLE h, PUSB_ENDPOINT_DESCRIPTOR pEndPtDescriptor); |
||||||
|
CCyBulkEndPoint(HANDLE h, PUSB_ENDPOINT_DESCRIPTOR pEndPtDescriptor,USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR* SSEndPtDescriptor); |
||||||
|
|
||||||
|
PUCHAR BeginDataXfer(PUCHAR buf, LONG len, OVERLAPPED *ov); |
||||||
|
}; |
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************************
|
||||||
|
* |
||||||
|
* The Interrupt Endpoint Class |
||||||
|
* |
||||||
|
********************************************************************************/ |
||||||
|
class CCyInterruptEndPoint : public CCyUSBEndPoint |
||||||
|
{ |
||||||
|
public: |
||||||
|
CCyInterruptEndPoint(void); |
||||||
|
CCyInterruptEndPoint(HANDLE h, PUSB_ENDPOINT_DESCRIPTOR pEndPtDescriptor); |
||||||
|
CCyInterruptEndPoint(HANDLE h, PUSB_ENDPOINT_DESCRIPTOR pEndPtDescriptor,USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR* SSEndPtDescriptor); |
||||||
|
|
||||||
|
PUCHAR BeginDataXfer(PUCHAR buf, LONG len, OVERLAPPED *ov); |
||||||
|
}; |
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************************
|
||||||
|
* |
||||||
|
* The Interface Class |
||||||
|
* |
||||||
|
********************************************************************************/ |
||||||
|
class CCyUSBInterface |
||||||
|
{ |
||||||
|
public: |
||||||
|
CCyUSBEndPoint *EndPoints[MAX_ENDPTS]; /* Holds pointers to all the interface's endpoints,
|
||||||
|
plus a pointer to the Control endpoint zero */ |
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
UCHAR bInterfaceNumber; |
||||||
|
UCHAR bAlternateSetting; |
||||||
|
UCHAR bNumEndpoints; /* Not counting the control endpoint */ |
||||||
|
UCHAR bInterfaceClass; |
||||||
|
UCHAR bInterfaceSubClass; |
||||||
|
UCHAR bInterfaceProtocol; |
||||||
|
UCHAR iInterface; |
||||||
|
|
||||||
|
UCHAR bAltSettings; |
||||||
|
USHORT wTotalLength; /* Needed in case Intfc has additional (non-endpt) descriptors */ |
||||||
|
|
||||||
|
CCyUSBInterface(HANDLE handle, PUSB_INTERFACE_DESCRIPTOR pIntfcDescriptor,UCHAR usb30Dummy); |
||||||
|
CCyUSBInterface(HANDLE h, PUSB_INTERFACE_DESCRIPTOR pIntfcDescriptor); |
||||||
|
CCyUSBInterface(CCyUSBInterface& ifc); /* Copy Constructor */ |
||||||
|
~CCyUSBInterface(void); |
||||||
|
|
||||||
|
}; |
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************************
|
||||||
|
* |
||||||
|
* The Config Class |
||||||
|
* |
||||||
|
********************************************************************************/ |
||||||
|
class CCyUSBConfig |
||||||
|
{ |
||||||
|
public: |
||||||
|
CCyUSBInterface *Interfaces[MAX_INTERFACES]; |
||||||
|
|
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
USHORT wTotalLength; |
||||||
|
UCHAR bNumInterfaces; |
||||||
|
UCHAR bConfigurationValue; |
||||||
|
UCHAR iConfiguration; |
||||||
|
UCHAR bmAttributes; |
||||||
|
UCHAR MaxPower; |
||||||
|
|
||||||
|
UCHAR AltInterfaces; |
||||||
|
|
||||||
|
CCyUSBConfig(void); |
||||||
|
CCyUSBConfig(CCyUSBConfig& cfg); /* Copy Constructor */ |
||||||
|
CCyUSBConfig(HANDLE h, PUSB_CONFIGURATION_DESCRIPTOR pConfigDescr); |
||||||
|
CCyUSBConfig(HANDLE h, PUSB_CONFIGURATION_DESCRIPTOR pConfigDescr,UCHAR usb30Dummy); |
||||||
|
~CCyUSBConfig(void); |
||||||
|
}; |
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************************
|
||||||
|
* |
||||||
|
* The Bos USB20 Extesnion Class |
||||||
|
* |
||||||
|
********************************************************************************/ |
||||||
|
class CCyBosUSB20Extesnion |
||||||
|
{ |
||||||
|
public: |
||||||
|
UCHAR bLength; /* Descriptor length */ |
||||||
|
UCHAR bDescriptorType; /* Descriptor Type */ |
||||||
|
UCHAR bDevCapabilityType; /* Device capability type */ |
||||||
|
UINT bmAttribute; /* Bitmap encoding for supprted feature and Link power managment supprted if set */ |
||||||
|
|
||||||
|
CCyBosUSB20Extesnion(void); |
||||||
|
CCyBosUSB20Extesnion(HANDLE h,PUSB_BOS_USB20_DEVICE_EXTENSION BosUsb20ExtDesc); |
||||||
|
}; |
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************************
|
||||||
|
* |
||||||
|
* The Bos SuperSpeed Capability Class |
||||||
|
* |
||||||
|
********************************************************************************/ |
||||||
|
class CCyBosSuperSpeedCapability |
||||||
|
{ |
||||||
|
public: |
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
UCHAR bDevCapabilityType; |
||||||
|
UCHAR bmAttribute; |
||||||
|
USHORT SpeedsSuported; |
||||||
|
UCHAR bFunctionalitySupporte; |
||||||
|
UCHAR bU1DevExitLat; |
||||||
|
USHORT bU2DevExitLat; |
||||||
|
|
||||||
|
CCyBosSuperSpeedCapability(void); |
||||||
|
CCyBosSuperSpeedCapability(HANDLE h,PUSB_BOS_SS_DEVICE_CAPABILITY pUSB_SuperSpeedUsb); |
||||||
|
|
||||||
|
}; |
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************************
|
||||||
|
* |
||||||
|
* The Bos Container ID Class |
||||||
|
* |
||||||
|
********************************************************************************/ |
||||||
|
class CCyBosContainerID |
||||||
|
{ |
||||||
|
public: |
||||||
|
UCHAR bLength; /* Descriptor length */ |
||||||
|
UCHAR bDescriptorType; /* Descriptor Type */ |
||||||
|
UCHAR bDevCapabilityType; /* Device capability type */ |
||||||
|
UCHAR bReserved; /* no use */ |
||||||
|
UCHAR ContainerID[USB_BOS_CAPABILITY_TYPE_CONTAINER_ID_SIZE]; /* UUID */ |
||||||
|
|
||||||
|
CCyBosContainerID(void); |
||||||
|
CCyBosContainerID(HANDLE h,PUSB_BOS_CONTAINER_ID pContainerID); |
||||||
|
}; |
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************************
|
||||||
|
* |
||||||
|
* The USB BOS Class |
||||||
|
* |
||||||
|
********************************************************************************/ |
||||||
|
class CCyUSBBOS |
||||||
|
{ |
||||||
|
public: |
||||||
|
|
||||||
|
CCyBosContainerID *pContainer_ID; |
||||||
|
CCyBosUSB20Extesnion *pUSB20_DeviceExt; |
||||||
|
CCyBosSuperSpeedCapability *pSS_DeviceCap; |
||||||
|
|
||||||
|
UCHAR bLength; /* Descriptor length */ |
||||||
|
UCHAR bDescriptorType; /* Descriptor Type */ |
||||||
|
USHORT wTotalLength; /* Total length of descriptor ( icluding device capabilty */ |
||||||
|
UCHAR bNumDeviceCaps; /* Number of device capability descriptors in BOS */ |
||||||
|
|
||||||
|
CCyUSBBOS(void); |
||||||
|
CCyUSBBOS(HANDLE h,PUSB_BOS_DESCRIPTOR pBosDescrData); |
||||||
|
~CCyUSBBOS(); |
||||||
|
}; |
||||||
|
|
||||||
|
/*********************************************************************************
|
||||||
|
* |
||||||
|
* The USB Device Class - This is the main class that contains members of all the |
||||||
|
* other classes. |
||||||
|
* |
||||||
|
* To use the library, create an instance of this Class and call it's Open method. |
||||||
|
* |
||||||
|
*********************************************************************************/ |
||||||
|
class CCyUSBDevice |
||||||
|
{ |
||||||
|
/* The public members are accessible (i.e. corruptible) by the user of the library
|
||||||
|
* Algorithms of the class don't rely on any public members. Instead, they use the |
||||||
|
* private members of the class for their calculations. */ |
||||||
|
|
||||||
|
public: |
||||||
|
|
||||||
|
CCyUSBDevice(HANDLE hnd = NULL, GUID guid = CYUSBDRV_GUID, BOOL bOpen = true); |
||||||
|
~CCyUSBDevice(void); |
||||||
|
|
||||||
|
CCyUSBEndPoint **EndPoints; /* Shortcut to USBCfgs[CfgNum]->Interfaces[IntfcIndex]->Endpoints */ |
||||||
|
CCyUSBEndPoint *EndPointOf(UCHAR addr); |
||||||
|
|
||||||
|
CCyUSBBOS *UsbBos; |
||||||
|
CCyIsocEndPoint *IsocInEndPt; |
||||||
|
CCyIsocEndPoint *IsocOutEndPt; |
||||||
|
CCyBulkEndPoint *BulkInEndPt; |
||||||
|
CCyBulkEndPoint *BulkOutEndPt; |
||||||
|
CCyControlEndPoint *ControlEndPt; |
||||||
|
CCyInterruptEndPoint *InterruptInEndPt; |
||||||
|
CCyInterruptEndPoint *InterruptOutEndPt; |
||||||
|
|
||||||
|
|
||||||
|
USHORT StrLangID; |
||||||
|
ULONG LastError; |
||||||
|
ULONG UsbdStatus; |
||||||
|
ULONG NtStatus; |
||||||
|
ULONG DriverVersion; |
||||||
|
ULONG USBDIVersion; |
||||||
|
char DeviceName[USB_STRING_MAXLEN]; |
||||||
|
char FriendlyName[USB_STRING_MAXLEN]; |
||||||
|
wchar_t Manufacturer[USB_STRING_MAXLEN]; |
||||||
|
wchar_t Product[USB_STRING_MAXLEN]; |
||||||
|
wchar_t SerialNumber[USB_STRING_MAXLEN]; |
||||||
|
|
||||||
|
CHAR DevPath[USB_STRING_MAXLEN]; |
||||||
|
|
||||||
|
USHORT BcdUSB; |
||||||
|
USHORT VendorID; |
||||||
|
USHORT ProductID; |
||||||
|
UCHAR USBAddress; |
||||||
|
UCHAR DevClass; |
||||||
|
UCHAR DevSubClass; |
||||||
|
UCHAR DevProtocol; |
||||||
|
INT MaxPacketSize; |
||||||
|
USHORT BcdDevice; |
||||||
|
|
||||||
|
UCHAR ConfigValue; |
||||||
|
UCHAR ConfigAttrib; |
||||||
|
UCHAR MaxPower; |
||||||
|
|
||||||
|
UCHAR IntfcClass; |
||||||
|
UCHAR IntfcSubClass; |
||||||
|
UCHAR IntfcProtocol; |
||||||
|
bool bHighSpeed; |
||||||
|
bool bSuperSpeed; |
||||||
|
|
||||||
|
DWORD BytesXfered; |
||||||
|
|
||||||
|
UCHAR DeviceCount(void); |
||||||
|
UCHAR ConfigCount(void); |
||||||
|
UCHAR IntfcCount(void); |
||||||
|
UCHAR AltIntfcCount(void); |
||||||
|
UCHAR EndPointCount(void); |
||||||
|
|
||||||
|
void SetConfig(UCHAR cfg); |
||||||
|
UCHAR Config(void) { return CfgNum; } /* Normally 0 */ |
||||||
|
UCHAR Interface(void) { return IntfcNum; } /* Usually 0 */ |
||||||
|
|
||||||
|
/* No SetInterface method since only 1 intfc per device (per Windows) */ |
||||||
|
UCHAR AltIntfc(void); |
||||||
|
bool SetAltIntfc(UCHAR alt); |
||||||
|
|
||||||
|
GUID DriverGUID(void) { return DrvGuid; } |
||||||
|
HANDLE DeviceHandle(void) { return hDevice; } |
||||||
|
void UsbdStatusString(ULONG stat, PCHAR s); |
||||||
|
bool CreateHandle(UCHAR dev); |
||||||
|
void DestroyHandle(); |
||||||
|
|
||||||
|
bool Open(UCHAR dev); |
||||||
|
void Close(void); |
||||||
|
bool Reset(void); |
||||||
|
bool ReConnect(void); |
||||||
|
bool Suspend(void); |
||||||
|
bool Resume(void); |
||||||
|
bool IsOpen(void) { return (hDevice != INVALID_HANDLE_VALUE); } |
||||||
|
|
||||||
|
UCHAR PowerState(void); |
||||||
|
|
||||||
|
bool GetBosDescriptor(PUSB_BOS_DESCRIPTOR descr); |
||||||
|
bool GetBosUSB20DeviceExtensionDescriptor(PUSB_BOS_USB20_DEVICE_EXTENSION descr); |
||||||
|
bool GetBosContainedIDDescriptor(PUSB_BOS_CONTAINER_ID descr); |
||||||
|
bool GetBosSSCapabilityDescriptor(PUSB_BOS_SS_DEVICE_CAPABILITY descr); |
||||||
|
|
||||||
|
void GetDeviceDescriptor(PUSB_DEVICE_DESCRIPTOR descr); |
||||||
|
void GetConfigDescriptor(PUSB_CONFIGURATION_DESCRIPTOR descr); |
||||||
|
void GetIntfcDescriptor(PUSB_INTERFACE_DESCRIPTOR descr); |
||||||
|
CCyUSBConfig GetUSBConfig(int index); |
||||||
|
|
||||||
|
private: |
||||||
|
|
||||||
|
USB_DEVICE_DESCRIPTOR USBDeviceDescriptor; |
||||||
|
PUSB_CONFIGURATION_DESCRIPTOR USBConfigDescriptors[2]; |
||||||
|
PUSB_BOS_DESCRIPTOR pUsbBosDescriptor; |
||||||
|
|
||||||
|
CCyUSBConfig *USBCfgs[2]; |
||||||
|
|
||||||
|
HANDLE hWnd; |
||||||
|
HANDLE hDevice; |
||||||
|
HANDLE hDevNotification; |
||||||
|
HANDLE hHndNotification; |
||||||
|
|
||||||
|
GUID DrvGuid; |
||||||
|
|
||||||
|
UCHAR Devices; |
||||||
|
UCHAR Interfaces; |
||||||
|
UCHAR AltInterfaces; |
||||||
|
UCHAR Configs; |
||||||
|
|
||||||
|
UCHAR DevNum; |
||||||
|
UCHAR CfgNum; |
||||||
|
UCHAR IntfcNum; /* The current selected interface's bInterfaceNumber */ |
||||||
|
UCHAR IntfcIndex; /* The entry in the Config's interfaces table matching to IntfcNum and AltSetting */ |
||||||
|
|
||||||
|
bool GetInternalBosDescriptor(); |
||||||
|
void GetDevDescriptor(void); |
||||||
|
void GetCfgDescriptor(int descIndex); |
||||||
|
void GetString(wchar_t *s, UCHAR sIndex); |
||||||
|
void SetStringDescrLanguage(void); |
||||||
|
void SetAltIntfcParams(UCHAR alt); |
||||||
|
bool IoControl(ULONG cmd, PUCHAR buf, ULONG len); |
||||||
|
|
||||||
|
void SetEndPointPtrs(void); |
||||||
|
void GetDeviceName(void); |
||||||
|
void GetFriendlyName(void); |
||||||
|
void GetDriverVer(void); |
||||||
|
void GetUSBDIVer(void); |
||||||
|
void GetSpeed(void); |
||||||
|
void GetUSBAddress(void); |
||||||
|
//void CloseEndPtHandles(void);
|
||||||
|
|
||||||
|
bool RegisterForPnpEvents(HANDLE h); |
||||||
|
}; |
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************************
|
||||||
|
* |
||||||
|
* The FX3 Device Class |
||||||
|
* |
||||||
|
********************************************************************************/ |
||||||
|
class CCyFX3Device: public CCyUSBDevice |
||||||
|
{ |
||||||
|
public: |
||||||
|
CCyFX3Device(void); |
||||||
|
~CCyFX3Device(void); |
||||||
|
bool IsBootLoaderRunning(); |
||||||
|
FX3_FWDWNLOAD_ERROR_CODE DownloadFw(char *fileName, FX3_FWDWNLOAD_MEDIA_TYPE enMediaType); |
||||||
|
|
||||||
|
private: |
||||||
|
|
||||||
|
bool Ep0VendorCommand(vendorCmdData cmdData); |
||||||
|
bool SetProgramEntry(UCHAR opCode,UINT start_addr); |
||||||
|
|
||||||
|
bool DownloadBufferToDevice(UINT start_addr, USHORT count, UCHAR *data_buf, UCHAR opCode); |
||||||
|
bool UploadBufferFromDevice(UINT start_addr, USHORT count, UCHAR *data_buf, UCHAR opCode); |
||||||
|
|
||||||
|
FX3_FWDWNLOAD_ERROR_CODE DownloadFwToRam(PUCHAR buffer_p, UINT fw_size, UCHAR opCode); |
||||||
|
FX3_FWDWNLOAD_ERROR_CODE DownloadUserIMGtoI2CE2PROM(PUCHAR buffer_p, UINT fw_size, UCHAR opCode); |
||||||
|
FX3_FWDWNLOAD_ERROR_CODE DownloadUserIMGtoSPIFLASH(PUCHAR buffer_p, UINT fw_size, UCHAR opCode); |
||||||
|
|
||||||
|
FX3_FWDWNLOAD_ERROR_CODE EraseSectorOfSPIFlash(UINT SectorNumber, UCHAR opCode); |
||||||
|
bool WriteToSPIFlash(PUCHAR Buf, UINT buflen, UINT ByteAddress, UCHAR opCode); |
||||||
|
}; |
||||||
|
|
||||||
|
/********************************************************************************/ |
||||||
|
|
||||||
|
#endif |
@ -0,0 +1,90 @@ |
|||||||
|
/*
|
||||||
|
## Cypress CyAPI C++ library USB3.0 defination header file (CyUSB30_def.h) |
||||||
|
## ======================================================= |
||||||
|
## |
||||||
|
## Copyright Cypress Semiconductor Corporation, 2009-2018, |
||||||
|
## All Rights Reserved |
||||||
|
## UNPUBLISHED, LICENSED SOFTWARE. |
||||||
|
## |
||||||
|
## CONFIDENTIAL AND PROPRIETARY INFORMATION |
||||||
|
## WHICH IS THE PROPERTY OF CYPRESS. |
||||||
|
## |
||||||
|
## Use of this file is governed |
||||||
|
## by the license agreement included in the file |
||||||
|
## |
||||||
|
## <install>/license/license.rtf |
||||||
|
## |
||||||
|
## where <install> is the Cypress software |
||||||
|
## install root directory path. |
||||||
|
## |
||||||
|
## ======================================================= |
||||||
|
*/ |
||||||
|
#ifndef _CYUSB30_H |
||||||
|
#define _CYUSB30_H |
||||||
|
|
||||||
|
//#pragma pack(1)
|
||||||
|
#pragma pack(push, 1) |
||||||
|
// USB3.0 specific constant defination
|
||||||
|
#define BCDUSBJJMASK 0xFF00 //(0xJJMN JJ - Major version,M Minor version, N sub-minor vesion)
|
||||||
|
#define USB30MAJORVER 0x0300 |
||||||
|
#define USB20MAJORVER 0x0200 |
||||||
|
|
||||||
|
#define USB_BOS_DESCRIPTOR_TYPE 0x0F |
||||||
|
#define USB_DEVICE_CAPABILITY 0x10 |
||||||
|
#define USB_SUPERSPEED_ENDPOINT_COMPANION 0x30 |
||||||
|
#define USB_BOS_CAPABILITY_TYPE_Wireless_USB 0x01 |
||||||
|
#define USB_BOS_CAPABILITY_TYPE_USB20_EXT 0x02 |
||||||
|
#define USB_BOS_CAPABILITY_TYPE_SUPERSPEED_USB 0x03 |
||||||
|
#define USB_BOS_CAPABILITY_TYPE_CONTAINER_ID 0x04 |
||||||
|
#define USB_BOS_CAPABILITY_TYPE_CONTAINER_ID_SIZE 0x10 |
||||||
|
|
||||||
|
#define USB_BOS_DEVICE_CAPABILITY_TYPE_INDEX 0x2 |
||||||
|
//constant defination
|
||||||
|
typedef struct _USB_BOS_DESCRIPTOR |
||||||
|
{ |
||||||
|
UCHAR bLength;/* Descriptor length*/ |
||||||
|
UCHAR bDescriptorType;/* Descriptor Type */ |
||||||
|
USHORT wTotalLength;/* Total length of descriptor ( icluding device capability*/ |
||||||
|
UCHAR bNumDeviceCaps;/* Number of device capability descriptors in BOS */ |
||||||
|
}USB_BOS_DESCRIPTOR,*PUSB_BOS_DESCRIPTOR; |
||||||
|
|
||||||
|
typedef struct _USB_BOS_USB20_DEVICE_EXTENSION |
||||||
|
{ |
||||||
|
UCHAR bLength;/* Descriptor length*/ |
||||||
|
UCHAR bDescriptorType;/* Descriptor Type */ |
||||||
|
UCHAR bDevCapabilityType;/* Device capability type*/ |
||||||
|
UINT bmAttribute;// Bitmap encoding for supprted feature and Link power managment supprted if set
|
||||||
|
}USB_BOS_USB20_DEVICE_EXTENSION,*PUSB_BOS_USB20_DEVICE_EXTENSION; |
||||||
|
|
||||||
|
typedef struct _USB_BOS_SS_DEVICE_CAPABILITY |
||||||
|
{ |
||||||
|
UCHAR bLength;/* Descriptor length*/ |
||||||
|
UCHAR bDescriptorType;/* Descriptor Type */ |
||||||
|
UCHAR bDevCapabilityType;/* Device capability type*/ |
||||||
|
UCHAR bmAttribute;// Bitmap encoding for supprted feature and Link power managment supprted if set
|
||||||
|
USHORT wSpeedsSuported;//low speed supported if set,full speed supported if set,high speed supported if set,super speed supported if set,15:4 nt used
|
||||||
|
UCHAR bFunctionalitySupporte; |
||||||
|
UCHAR bU1DevExitLat;//U1 device exit latency
|
||||||
|
USHORT bU2DevExitLat;//U2 device exit latency
|
||||||
|
}USB_BOS_SS_DEVICE_CAPABILITY,*PUSB_BOS_SS_DEVICE_CAPABILITY; |
||||||
|
|
||||||
|
typedef struct _USB_BOS_CONTAINER_ID |
||||||
|
{ |
||||||
|
UCHAR bLength;/* Descriptor length*/ |
||||||
|
UCHAR bDescriptorType;/* Descriptor Type */ |
||||||
|
UCHAR bDevCapabilityType;/* Device capability type*/ |
||||||
|
UCHAR bReserved; // no use
|
||||||
|
UCHAR ContainerID[USB_BOS_CAPABILITY_TYPE_CONTAINER_ID_SIZE];/* UUID */ |
||||||
|
}USB_BOS_CONTAINER_ID,*PUSB_BOS_CONTAINER_ID; |
||||||
|
|
||||||
|
typedef struct _USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR |
||||||
|
{ |
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
UCHAR bMaxBurst; |
||||||
|
UCHAR bmAttributes; |
||||||
|
USHORT bBytesPerInterval; |
||||||
|
}USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR,*PUSB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR; |
||||||
|
#pragma pack(pop) |
||||||
|
#endif /*_CYUSB30_H*/ |
||||||
|
|
@ -0,0 +1,46 @@ |
|||||||
|
|
||||||
|
// Note: see usbdi.h in the DDK for the USBD_STATUS source definitions
|
||||||
|
typedef LONG USBD_STATUS; |
||||||
|
#define USBD_STATUS(Status) ((ULONG)(Status) & 0x0FFFFFFFL) |
||||||
|
#define USBD_STATE(Status) ((ULONG)(Status) & 0xF0000000L) |
||||||
|
|
||||||
|
// HC status codes (Note: both error and stall bit are set)
|
||||||
|
#define USBD_STATUS_SUCCESS ((USBD_STATUS)0x00000000L) |
||||||
|
#define USBD_STATUS_PENDING ((USBD_STATUS)0x40000000L) |
||||||
|
#define USBD_STATUS_HALTED ((USBD_STATUS)0xC0000000L) |
||||||
|
#define USBD_STATUS_ERROR ((USBD_STATUS)0x80000000L) |
||||||
|
|
||||||
|
#define USBD_STATUS_CRC ((USBD_STATUS)0xC0000001L) |
||||||
|
#define USBD_STATUS_BTSTUFF ((USBD_STATUS)0xC0000002L) |
||||||
|
#define USBD_STATUS_DATA_TOGGLE_MISMATCH ((USBD_STATUS)0xC0000003L) |
||||||
|
#define USBD_STATUS_STALL_PID ((USBD_STATUS)0xC0000004L) |
||||||
|
#define USBD_STATUS_DEV_NOT_RESPONDING ((USBD_STATUS)0xC0000005L) |
||||||
|
#define USBD_STATUS_PID_CHECK_FAILURE ((USBD_STATUS)0xC0000006L) |
||||||
|
#define USBD_STATUS_UNEXPECTED_PID ((USBD_STATUS)0xC0000007L) |
||||||
|
#define USBD_STATUS_DATA_OVERRUN ((USBD_STATUS)0xC0000008L) |
||||||
|
#define USBD_STATUS_DATA_UNDERRUN ((USBD_STATUS)0xC0000009L) |
||||||
|
#define USBD_STATUS_RESERVED1 ((USBD_STATUS)0xC000000AL) |
||||||
|
#define USBD_STATUS_RESERVED2 ((USBD_STATUS)0xC000000BL) |
||||||
|
#define USBD_STATUS_BUFFER_OVERRUN ((USBD_STATUS)0xC000000CL) |
||||||
|
#define USBD_STATUS_BUFFER_UNDERRUN ((USBD_STATUS)0xC000000DL) |
||||||
|
#define USBD_STATUS_NOT_ACCESSED ((USBD_STATUS)0xC000000FL) |
||||||
|
#define USBD_STATUS_FIFO ((USBD_STATUS)0xC0000010L) |
||||||
|
|
||||||
|
#define USBD_STATUS_ENDPOINT_HALTED ((USBD_STATUS)0xC0000030L) |
||||||
|
#define USBD_STATUS_NO_MEMORY ((USBD_STATUS)0x80000100L) |
||||||
|
#define USBD_STATUS_INVALID_URB_FUNCTION ((USBD_STATUS)0x80000200L) |
||||||
|
#define USBD_STATUS_INVALID_PARAMETER ((USBD_STATUS)0x80000300L) |
||||||
|
#define USBD_STATUS_ERROR_BUSY ((USBD_STATUS)0x80000400L) |
||||||
|
#define USBD_STATUS_REQUEST_FAILED ((USBD_STATUS)0x80000500L) |
||||||
|
#define USBD_STATUS_INVALID_PIPE_HANDLE ((USBD_STATUS)0x80000600L) |
||||||
|
#define USBD_STATUS_NO_BANDWIDTH ((USBD_STATUS)0x80000700L) |
||||||
|
#define USBD_STATUS_INTERNAL_HC_ERROR ((USBD_STATUS)0x80000800L) |
||||||
|
#define USBD_STATUS_ERROR_SHORT_TRANSFER ((USBD_STATUS)0x80000900L) |
||||||
|
#define USBD_STATUS_BAD_START_FRAME ((USBD_STATUS)0xC0000A00L) |
||||||
|
#define USBD_STATUS_ISOCH_REQUEST_FAILED ((USBD_STATUS)0xC0000B00L) |
||||||
|
#define USBD_STATUS_FRAME_CONTROL_OWNED ((USBD_STATUS)0xC0000C00L) |
||||||
|
#define USBD_STATUS_FRAME_CONTROL_NOT_OWNED ((USBD_STATUS)0xC0000D00L) |
||||||
|
#define USBD_STATUS_CANCELED ((USBD_STATUS)0x00010000L) |
||||||
|
#define USBD_STATUS_CANCELING ((USBD_STATUS)0x00020000L) |
||||||
|
|
||||||
|
|
@ -0,0 +1,26 @@ |
|||||||
|
/*
|
||||||
|
## Cypress CyAPI C++ library version number header file (VersionNo.h) |
||||||
|
## ======================================================= |
||||||
|
## |
||||||
|
## Copyright Cypress Semiconductor Corporation, 2009-2018, |
||||||
|
## All Rights Reserved |
||||||
|
## UNPUBLISHED, LICENSED SOFTWARE. |
||||||
|
## |
||||||
|
## CONFIDENTIAL AND PROPRIETARY INFORMATION |
||||||
|
## WHICH IS THE PROPERTY OF CYPRESS. |
||||||
|
## |
||||||
|
## Use of this file is governed |
||||||
|
## by the license agreement included in the file |
||||||
|
## |
||||||
|
## <install>/license/license.rtf |
||||||
|
## |
||||||
|
## where <install> is the Cypress software |
||||||
|
## install root directory path. |
||||||
|
## |
||||||
|
## ======================================================= |
||||||
|
*/ |
||||||
|
#define FILEVER 1,2,3,0 |
||||||
|
#define PRODUCTVER 1,2,3,0 |
||||||
|
#define STRFILEVER "1, 2, 3, 0" |
||||||
|
#define STRPRODUCTVER "1, 2, 3, 0" |
||||||
|
#define STRFILEVER_ASSENBLY "1.2.3.0" |
@ -0,0 +1,213 @@ |
|||||||
|
/*
|
||||||
|
## Cypress CyAPI C++ library IOCTL defination header file (cyioctl.h) |
||||||
|
## ======================================================= |
||||||
|
## |
||||||
|
## Copyright Cypress Semiconductor Corporation, 2009-2012, |
||||||
|
## All Rights Reserved |
||||||
|
## UNPUBLISHED, LICENSED SOFTWARE. |
||||||
|
## |
||||||
|
## CONFIDENTIAL AND PROPRIETARY INFORMATION |
||||||
|
## WHICH IS THE PROPERTY OF CYPRESS. |
||||||
|
## |
||||||
|
## Use of this file is governed |
||||||
|
## by the license agreement included in the file |
||||||
|
## |
||||||
|
## <install>/license/license.rtf |
||||||
|
## |
||||||
|
## where <install> is the Cypress software |
||||||
|
## install root directory path. |
||||||
|
## |
||||||
|
## ======================================================= |
||||||
|
*/ |
||||||
|
#ifndef __IOCTL_H__ |
||||||
|
#define __IOCTL_H__ |
||||||
|
|
||||||
|
|
||||||
|
#ifndef DRIVER |
||||||
|
|
||||||
|
#ifndef CTL_CODE |
||||||
|
#include <devioctl.h> |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef BM_REQUEST_TYPE |
||||||
|
#include "usb200.h" |
||||||
|
#endif |
||||||
|
|
||||||
|
#include <PSHPACK1.H> |
||||||
|
|
||||||
|
#define DIR_HOST_TO_DEVICE 0 |
||||||
|
#define DIR_DEVICE_TO_HOST 1 |
||||||
|
|
||||||
|
#define DEVICE_SPEED_UNKNOWN 0x00000000 |
||||||
|
#define DEVICE_SPEED_LOW_FULL 0x00000001 |
||||||
|
#define DEVICE_SPEED_HIGH 0x00000002 |
||||||
|
#define DEVICE_SPEED_SUPER 0x00000004 |
||||||
|
|
||||||
|
typedef struct _WORD_SPLIT { |
||||||
|
UCHAR lowByte; |
||||||
|
UCHAR hiByte; |
||||||
|
} WORD_SPLIT, *PWORD_SPLIT; |
||||||
|
|
||||||
|
typedef struct _BM_REQ_TYPE { |
||||||
|
UCHAR Recipient:2; |
||||||
|
UCHAR Reserved:3; |
||||||
|
UCHAR Type:2; |
||||||
|
UCHAR Direction:1; |
||||||
|
} BM_REQ_TYPE, *PBM_REQ_TYPE; |
||||||
|
|
||||||
|
typedef struct _SETUP_PACKET { |
||||||
|
|
||||||
|
union { |
||||||
|
BM_REQ_TYPE bmReqType; |
||||||
|
UCHAR bmRequest; |
||||||
|
}; |
||||||
|
|
||||||
|
UCHAR bRequest; |
||||||
|
|
||||||
|
union { |
||||||
|
WORD_SPLIT wVal; |
||||||
|
USHORT wValue; |
||||||
|
}; |
||||||
|
|
||||||
|
union { |
||||||
|
WORD_SPLIT wIndx; |
||||||
|
USHORT wIndex; |
||||||
|
}; |
||||||
|
|
||||||
|
union { |
||||||
|
WORD_SPLIT wLen; |
||||||
|
USHORT wLength; |
||||||
|
}; |
||||||
|
|
||||||
|
ULONG ulTimeOut; |
||||||
|
|
||||||
|
} SETUP_PACKET, *PSETUP_PACKET; |
||||||
|
|
||||||
|
#define USB_ISO_ID 0x4945 |
||||||
|
#define USB_ISO_CMD_ASAP 0x8000 |
||||||
|
#define USB_ISO_CMD_CURRENT_FRAME 0x8001 |
||||||
|
#define USB_ISO_CMD_SET_FRAME 0x8002 |
||||||
|
|
||||||
|
typedef struct _ISO_ADV_PARAMS { |
||||||
|
|
||||||
|
USHORT isoId; |
||||||
|
USHORT isoCmd; |
||||||
|
|
||||||
|
ULONG ulParam1; |
||||||
|
ULONG ulParam2; |
||||||
|
|
||||||
|
} ISO_ADV_PARAMS, *PISO_ADV_PARAMS; |
||||||
|
|
||||||
|
typedef struct _ISO_PACKET_INFO { |
||||||
|
ULONG Status; |
||||||
|
ULONG Length; |
||||||
|
} ISO_PACKET_INFO, *PISO_PACKET_INFO; |
||||||
|
|
||||||
|
|
||||||
|
typedef struct _SINGLE_TRANSFER { |
||||||
|
union { |
||||||
|
SETUP_PACKET SetupPacket; |
||||||
|
ISO_ADV_PARAMS IsoParams; |
||||||
|
}; |
||||||
|
|
||||||
|
UCHAR reserved; |
||||||
|
|
||||||
|
UCHAR ucEndpointAddress; |
||||||
|
ULONG NtStatus; |
||||||
|
ULONG UsbdStatus; |
||||||
|
ULONG IsoPacketOffset; |
||||||
|
ULONG IsoPacketLength; |
||||||
|
ULONG BufferOffset; |
||||||
|
ULONG BufferLength; |
||||||
|
} SINGLE_TRANSFER, *PSINGLE_TRANSFER; |
||||||
|
|
||||||
|
#endif // #ifndef DRIVER
|
||||||
|
|
||||||
|
typedef struct _SET_TRANSFER_SIZE_INFO { |
||||||
|
UCHAR EndpointAddress; |
||||||
|
ULONG TransferSize; |
||||||
|
} SET_TRANSFER_SIZE_INFO, *PSET_TRANSFER_SIZE_INFO; |
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Macro to extract function out of the device io control code
|
||||||
|
//
|
||||||
|
#ifdef WIN_98_DDK |
||||||
|
#define DEVICE_TYPE_FROM_CTL_CODE(ctrlCode) (((ULONG)(ctrlCode & 0xffff0000)) >> 16) |
||||||
|
#endif |
||||||
|
#define FUNCTION_FROM_CTL_CODE(ctrlCode) (((ULONG)(ctrlCode & 0x00003FFC)) >> 2) |
||||||
|
#define ACCESS_FROM_CTL_CODE(ctrlCode) (((ULONG)(ctrlCode & 0x000C0000)) >> 14) |
||||||
|
//#define METHOD_FROM_CTL_CODE(ctrlCode) (((ULONG)(ctrlCode & 0x00000003)))
|
||||||
|
|
||||||
|
|
||||||
|
#define IOCTL_ADAPT_INDEX 0x0000 |
||||||
|
|
||||||
|
// Get the driver version
|
||||||
|
#define IOCTL_ADAPT_GET_DRIVER_VERSION CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Get the current USBDI version
|
||||||
|
#define IOCTL_ADAPT_GET_USBDI_VERSION CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+1, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Get the current device alt interface settings from driver
|
||||||
|
#define IOCTL_ADAPT_GET_ALT_INTERFACE_SETTING CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+2, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Set the device interface and alt interface setting
|
||||||
|
#define IOCTL_ADAPT_SELECT_INTERFACE CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+3, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Get device address from driver
|
||||||
|
#define IOCTL_ADAPT_GET_ADDRESS CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+4, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Get number of endpoints for current interface and alt interface setting from driver
|
||||||
|
#define IOCTL_ADAPT_GET_NUMBER_ENDPOINTS CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+5, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Get the current device power state
|
||||||
|
#define IOCTL_ADAPT_GET_DEVICE_POWER_STATE CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+6, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Set the device power state
|
||||||
|
#define IOCTL_ADAPT_SET_DEVICE_POWER_STATE CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+7, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Send a raw packet to endpoint 0
|
||||||
|
#define IOCTL_ADAPT_SEND_EP0_CONTROL_TRANSFER CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+8, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Send/receive data to/from nonep0
|
||||||
|
#define IOCTL_ADAPT_SEND_NON_EP0_TRANSFER CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+9, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Simulate a disconnect/reconnect
|
||||||
|
#define IOCTL_ADAPT_CYCLE_PORT CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+10, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Reset the pipe
|
||||||
|
#define IOCTL_ADAPT_RESET_PIPE CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+11, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Reset the device
|
||||||
|
#define IOCTL_ADAPT_RESET_PARENT_PORT CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+12, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Get the current transfer size of an endpoint (in number of bytes)
|
||||||
|
#define IOCTL_ADAPT_GET_TRANSFER_SIZE CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+13, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Set the transfer size of an endpoint (in number of bytes)
|
||||||
|
#define IOCTL_ADAPT_SET_TRANSFER_SIZE CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+14, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Return the name of the device
|
||||||
|
#define IOCTL_ADAPT_GET_DEVICE_NAME CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+15, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Return the "Friendly Name" of the device
|
||||||
|
#define IOCTL_ADAPT_GET_FRIENDLY_NAME CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+16, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Abort all outstanding transfers on the pipe
|
||||||
|
#define IOCTL_ADAPT_ABORT_PIPE CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+17, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Send/receive data to/from nonep0 w/ direct buffer acccess (no buffering)
|
||||||
|
#define IOCTL_ADAPT_SEND_NON_EP0_DIRECT CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+18, METHOD_NEITHER, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Return device speed
|
||||||
|
#define IOCTL_ADAPT_GET_DEVICE_SPEED CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+19, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
// Get the current USB frame number
|
||||||
|
#define IOCTL_ADAPT_GET_CURRENT_FRAME CTL_CODE(FILE_DEVICE_UNKNOWN, IOCTL_ADAPT_INDEX+20, METHOD_BUFFERED, FILE_ANY_ACCESS) |
||||||
|
|
||||||
|
#define NUMBER_OF_ADAPT_IOCTLS 21 // Last IOCTL_ADAPT_INDEX + 1
|
||||||
|
|
||||||
|
|
||||||
|
#include <POPPACK.H> |
||||||
|
|
||||||
|
#endif // __IOCTL_H__
|
@ -0,0 +1,270 @@ |
|||||||
|
#ifndef __USB100_H__ |
||||||
|
#define __USB100_H__ |
||||||
|
|
||||||
|
|
||||||
|
#include <PSHPACK1.H> |
||||||
|
|
||||||
|
|
||||||
|
//bmRequest.Dir
|
||||||
|
#define BMREQUEST_HOST_TO_DEVICE 0 |
||||||
|
#define BMREQUEST_DEVICE_TO_HOST 1 |
||||||
|
|
||||||
|
//bmRequest.Type
|
||||||
|
#define BMREQUEST_STANDARD 0 |
||||||
|
#define BMREQUEST_CLASS 1 |
||||||
|
#define BMREQUEST_VENDOR 2 |
||||||
|
|
||||||
|
//bmRequest.Recipient
|
||||||
|
#define BMREQUEST_TO_DEVICE 0 |
||||||
|
#define BMREQUEST_TO_INTERFACE 1 |
||||||
|
#define BMREQUEST_TO_ENDPOINT 2 |
||||||
|
#define BMREQUEST_TO_OTHER 3 |
||||||
|
|
||||||
|
|
||||||
|
#define MAXIMUM_USB_STRING_LENGTH 255 |
||||||
|
|
||||||
|
// values for the bits returned by the USB GET_STATUS command
|
||||||
|
#define USB_GETSTATUS_SELF_POWERED 0x01 |
||||||
|
#define USB_GETSTATUS_REMOTE_WAKEUP_ENABLED 0x02 |
||||||
|
|
||||||
|
|
||||||
|
#define USB_DEVICE_DESCRIPTOR_TYPE 0x01 |
||||||
|
#define USB_CONFIGURATION_DESCRIPTOR_TYPE 0x02 |
||||||
|
#define USB_STRING_DESCRIPTOR_TYPE 0x03 |
||||||
|
#define USB_INTERFACE_DESCRIPTOR_TYPE 0x04 |
||||||
|
#define USB_ENDPOINT_DESCRIPTOR_TYPE 0x05 |
||||||
|
|
||||||
|
// descriptor types defined by DWG documents
|
||||||
|
#define USB_RESERVED_DESCRIPTOR_TYPE 0x06 |
||||||
|
#define USB_CONFIG_POWER_DESCRIPTOR_TYPE 0x07 |
||||||
|
#define USB_INTERFACE_POWER_DESCRIPTOR_TYPE 0x08 |
||||||
|
|
||||||
|
#define USB_DESCRIPTOR_MAKE_TYPE_AND_INDEX(d, i) ((USHORT)((USHORT)d<<8 | i)) |
||||||
|
|
||||||
|
//
|
||||||
|
// Values for bmAttributes field of an
|
||||||
|
// endpoint descriptor
|
||||||
|
//
|
||||||
|
|
||||||
|
#define USB_ENDPOINT_TYPE_MASK 0x03 |
||||||
|
|
||||||
|
#define USB_ENDPOINT_TYPE_CONTROL 0x00 |
||||||
|
#define USB_ENDPOINT_TYPE_ISOCHRONOUS 0x01 |
||||||
|
#define USB_ENDPOINT_TYPE_BULK 0x02 |
||||||
|
#define USB_ENDPOINT_TYPE_INTERRUPT 0x03 |
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// definitions for bits in the bmAttributes field of a
|
||||||
|
// configuration descriptor.
|
||||||
|
//
|
||||||
|
#define USB_CONFIG_POWERED_MASK 0xc0 |
||||||
|
|
||||||
|
#define USB_CONFIG_BUS_POWERED 0x80 |
||||||
|
#define USB_CONFIG_SELF_POWERED 0x40 |
||||||
|
#define USB_CONFIG_REMOTE_WAKEUP 0x20 |
||||||
|
|
||||||
|
//
|
||||||
|
// Endpoint direction bit, stored in address
|
||||||
|
//
|
||||||
|
|
||||||
|
#define USB_ENDPOINT_DIRECTION_MASK 0x80 |
||||||
|
|
||||||
|
// test direction bit in the bEndpointAddress field of
|
||||||
|
// an endpoint descriptor.
|
||||||
|
#define USB_ENDPOINT_DIRECTION_OUT(addr) (!((addr) & USB_ENDPOINT_DIRECTION_MASK)) |
||||||
|
#define USB_ENDPOINT_DIRECTION_IN(addr) ((addr) & USB_ENDPOINT_DIRECTION_MASK) |
||||||
|
|
||||||
|
//
|
||||||
|
// USB defined request codes
|
||||||
|
// see chapter 9 of the USB 1.0 specifcation for
|
||||||
|
// more information.
|
||||||
|
//
|
||||||
|
|
||||||
|
// These are the correct values based on the USB 1.0
|
||||||
|
// specification
|
||||||
|
|
||||||
|
#define USB_REQUEST_GET_STATUS 0x00 |
||||||
|
#define USB_REQUEST_CLEAR_FEATURE 0x01 |
||||||
|
|
||||||
|
#define USB_REQUEST_SET_FEATURE 0x03 |
||||||
|
|
||||||
|
#define USB_REQUEST_SET_ADDRESS 0x05 |
||||||
|
#define USB_REQUEST_GET_DESCRIPTOR 0x06 |
||||||
|
#define USB_REQUEST_SET_DESCRIPTOR 0x07 |
||||||
|
#define USB_REQUEST_GET_CONFIGURATION 0x08 |
||||||
|
#define USB_REQUEST_SET_CONFIGURATION 0x09 |
||||||
|
#define USB_REQUEST_GET_INTERFACE 0x0A |
||||||
|
#define USB_REQUEST_SET_INTERFACE 0x0B |
||||||
|
#define USB_REQUEST_SYNC_FRAME 0x0C |
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// defined USB device classes
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#define USB_DEVICE_CLASS_RESERVED 0x00 |
||||||
|
#define USB_DEVICE_CLASS_AUDIO 0x01 |
||||||
|
#define USB_DEVICE_CLASS_COMMUNICATIONS 0x02 |
||||||
|
#define USB_DEVICE_CLASS_HUMAN_INTERFACE 0x03 |
||||||
|
#define USB_DEVICE_CLASS_MONITOR 0x04 |
||||||
|
#define USB_DEVICE_CLASS_PHYSICAL_INTERFACE 0x05 |
||||||
|
#define USB_DEVICE_CLASS_POWER 0x06 |
||||||
|
#define USB_DEVICE_CLASS_PRINTER 0x07 |
||||||
|
#define USB_DEVICE_CLASS_STORAGE 0x08 |
||||||
|
#define USB_DEVICE_CLASS_HUB 0x09 |
||||||
|
#define USB_DEVICE_CLASS_VENDOR_SPECIFIC 0xFF |
||||||
|
|
||||||
|
//
|
||||||
|
// USB Core defined Feature selectors
|
||||||
|
//
|
||||||
|
|
||||||
|
#define USB_FEATURE_ENDPOINT_STALL 0x0000 |
||||||
|
#define USB_FEATURE_REMOTE_WAKEUP 0x0001 |
||||||
|
|
||||||
|
//
|
||||||
|
// USB DWG defined Feature selectors
|
||||||
|
//
|
||||||
|
|
||||||
|
#define USB_FEATURE_INTERFACE_POWER_D0 0x0002 |
||||||
|
#define USB_FEATURE_INTERFACE_POWER_D1 0x0003 |
||||||
|
#define USB_FEATURE_INTERFACE_POWER_D2 0x0004 |
||||||
|
#define USB_FEATURE_INTERFACE_POWER_D3 0x0005 |
||||||
|
|
||||||
|
typedef struct _USB_DEVICE_DESCRIPTOR { |
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
USHORT bcdUSB; |
||||||
|
UCHAR bDeviceClass; |
||||||
|
UCHAR bDeviceSubClass; |
||||||
|
UCHAR bDeviceProtocol; |
||||||
|
UCHAR bMaxPacketSize0; |
||||||
|
USHORT idVendor; |
||||||
|
USHORT idProduct; |
||||||
|
USHORT bcdDevice; |
||||||
|
UCHAR iManufacturer; |
||||||
|
UCHAR iProduct; |
||||||
|
UCHAR iSerialNumber; |
||||||
|
UCHAR bNumConfigurations; |
||||||
|
} USB_DEVICE_DESCRIPTOR, *PUSB_DEVICE_DESCRIPTOR; |
||||||
|
|
||||||
|
typedef struct _USB_ENDPOINT_DESCRIPTOR { |
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
UCHAR bEndpointAddress; |
||||||
|
UCHAR bmAttributes; |
||||||
|
USHORT wMaxPacketSize; |
||||||
|
UCHAR bInterval; |
||||||
|
} USB_ENDPOINT_DESCRIPTOR, *PUSB_ENDPOINT_DESCRIPTOR; |
||||||
|
|
||||||
|
typedef struct _USB_CONFIGURATION_DESCRIPTOR { |
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
USHORT wTotalLength; |
||||||
|
UCHAR bNumInterfaces; |
||||||
|
UCHAR bConfigurationValue; |
||||||
|
UCHAR iConfiguration; |
||||||
|
UCHAR bmAttributes; |
||||||
|
UCHAR MaxPower; |
||||||
|
} USB_CONFIGURATION_DESCRIPTOR, *PUSB_CONFIGURATION_DESCRIPTOR; |
||||||
|
|
||||||
|
typedef struct _USB_INTERFACE_DESCRIPTOR { |
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
UCHAR bInterfaceNumber; |
||||||
|
UCHAR bAlternateSetting; |
||||||
|
UCHAR bNumEndpoints; |
||||||
|
UCHAR bInterfaceClass; |
||||||
|
UCHAR bInterfaceSubClass; |
||||||
|
UCHAR bInterfaceProtocol; |
||||||
|
UCHAR iInterface; |
||||||
|
} USB_INTERFACE_DESCRIPTOR, *PUSB_INTERFACE_DESCRIPTOR; |
||||||
|
|
||||||
|
typedef struct _USB_STRING_DESCRIPTOR { |
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
WCHAR bString[1]; |
||||||
|
} USB_STRING_DESCRIPTOR, *PUSB_STRING_DESCRIPTOR; |
||||||
|
|
||||||
|
typedef struct _USB_COMMON_DESCRIPTOR { |
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
} USB_COMMON_DESCRIPTOR, *PUSB_COMMON_DESCRIPTOR; |
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Standard USB HUB definitions
|
||||||
|
//
|
||||||
|
// See Chapter 11 USB core specification
|
||||||
|
//
|
||||||
|
|
||||||
|
typedef struct _USB_HUB_DESCRIPTOR { |
||||||
|
UCHAR bDescriptorLength; // Length of this descriptor
|
||||||
|
UCHAR bDescriptorType; // Hub configuration type
|
||||||
|
UCHAR bNumberOfPorts; // number of ports on this hub
|
||||||
|
USHORT wHubCharacteristics; // Hub Charateristics
|
||||||
|
UCHAR bPowerOnToPowerGood; // port power on till power good in 2ms
|
||||||
|
UCHAR bHubControlCurrent; // max current in mA
|
||||||
|
//
|
||||||
|
// room for 255 ports power control and removable bitmask
|
||||||
|
UCHAR bRemoveAndPowerMask[64]; |
||||||
|
} USB_HUB_DESCRIPTOR, *PUSB_HUB_DESCRIPTOR; |
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Structures defined by various DWG feature documents
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// See DWG USB Feature Specification: Interface Power Management
|
||||||
|
//
|
||||||
|
|
||||||
|
#define USB_SUPPORT_D0_COMMAND 0x01 |
||||||
|
#define USB_SUPPORT_D1_COMMAND 0x02 |
||||||
|
#define USB_SUPPORT_D2_COMMAND 0x04 |
||||||
|
#define USB_SUPPORT_D3_COMMAND 0x08 |
||||||
|
|
||||||
|
#define USB_SUPPORT_D1_WAKEUP 0x10 |
||||||
|
#define USB_SUPPORT_D2_WAKEUP 0x20 |
||||||
|
|
||||||
|
|
||||||
|
typedef struct _USB_CONFIGURATION_POWER_DESCRIPTOR { |
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
UCHAR SelfPowerConsumedD0[3]; |
||||||
|
UCHAR bPowerSummaryId; |
||||||
|
UCHAR bBusPowerSavingD1; |
||||||
|
UCHAR bSelfPowerSavingD1; |
||||||
|
UCHAR bBusPowerSavingD2; |
||||||
|
UCHAR bSelfPowerSavingD2; |
||||||
|
UCHAR bBusPowerSavingD3; |
||||||
|
UCHAR bSelfPowerSavingD3; |
||||||
|
USHORT TransitionTimeFromD1; |
||||||
|
USHORT TransitionTimeFromD2; |
||||||
|
USHORT TransitionTimeFromD3; |
||||||
|
} USB_CONFIGURATION_POWER_DESCRIPTOR, *PUSB_CONFIGURATION_POWER_DESCRIPTOR; |
||||||
|
|
||||||
|
|
||||||
|
typedef struct _USB_INTERFACE_POWER_DESCRIPTOR { |
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
UCHAR bmCapabilitiesFlags; |
||||||
|
UCHAR bBusPowerSavingD1; |
||||||
|
UCHAR bSelfPowerSavingD1; |
||||||
|
UCHAR bBusPowerSavingD2; |
||||||
|
UCHAR bSelfPowerSavingD2; |
||||||
|
UCHAR bBusPowerSavingD3; |
||||||
|
UCHAR bSelfPowerSavingD3; |
||||||
|
USHORT TransitionTimeFromD1; |
||||||
|
USHORT TransitionTimeFromD2; |
||||||
|
USHORT TransitionTimeFromD3; |
||||||
|
} USB_INTERFACE_POWER_DESCRIPTOR, *PUSB_INTERFACE_POWER_DESCRIPTOR; |
||||||
|
|
||||||
|
|
||||||
|
#include <POPPACK.H> |
||||||
|
|
||||||
|
|
||||||
|
#endif /* __USB100_H__ */ |
||||||
|
|
@ -0,0 +1,111 @@ |
|||||||
|
#ifndef __USB200_H__ |
||||||
|
#define __USB200_H__ |
||||||
|
|
||||||
|
#include "usb100.h" |
||||||
|
|
||||||
|
|
||||||
|
#include <PSHPACK1.H> |
||||||
|
|
||||||
|
typedef enum _USB_DEVICE_SPEED { |
||||||
|
UsbLowSpeed = 0, |
||||||
|
UsbFullSpeed, |
||||||
|
UsbHighSpeed |
||||||
|
} USB_DEVICE_SPEED; |
||||||
|
|
||||||
|
typedef enum _USB_DEVICE_TYPE { |
||||||
|
Usb11Device = 0, |
||||||
|
Usb20Device |
||||||
|
} USB_DEVICE_TYPE; |
||||||
|
|
||||||
|
// standard definiions for the port status
|
||||||
|
// word of the HUB port register
|
||||||
|
|
||||||
|
#define USB_PORT_STATUS_CONNECT 0x0001 |
||||||
|
#define USB_PORT_STATUS_ENABLE 0x0002 |
||||||
|
#define USB_PORT_STATUS_SUSPEND 0x0004 |
||||||
|
#define USB_PORT_STATUS_OVER_CURRENT 0x0008 |
||||||
|
#define USB_PORT_STATUS_RESET 0x0010 |
||||||
|
#define USB_PORT_STATUS_POWER 0x0100 |
||||||
|
#define USB_PORT_STATUS_LOW_SPEED 0x0200 |
||||||
|
#define USB_PORT_STATUS_HIGH_SPEED 0x0400 |
||||||
|
|
||||||
|
typedef union _BM_REQUEST_TYPE { |
||||||
|
struct _BM { |
||||||
|
UCHAR Recipient:2; |
||||||
|
UCHAR Reserved:3; |
||||||
|
UCHAR Type:2; |
||||||
|
UCHAR Dir:1; |
||||||
|
}; |
||||||
|
UCHAR B; |
||||||
|
} BM_REQUEST_TYPE, *PBM_REQUEST_TYPE; |
||||||
|
|
||||||
|
typedef struct _USB_DEFAULT_PIPE_SETUP_PACKET { |
||||||
|
BM_REQUEST_TYPE bmRequestType; |
||||||
|
UCHAR bRequest; |
||||||
|
|
||||||
|
union _wValue { |
||||||
|
struct { |
||||||
|
UCHAR LowByte; |
||||||
|
UCHAR HiByte; |
||||||
|
}; |
||||||
|
USHORT W; |
||||||
|
} wValue; |
||||||
|
|
||||||
|
union _wIndex { |
||||||
|
struct { |
||||||
|
UCHAR LowByte; |
||||||
|
UCHAR HiByte; |
||||||
|
}; |
||||||
|
USHORT W; |
||||||
|
} wIndex; |
||||||
|
USHORT wLength; |
||||||
|
} USB_DEFAULT_PIPE_SETUP_PACKET, *PUSB_DEFAULT_PIPE_SETUP_PACKET; |
||||||
|
|
||||||
|
// setup packet is eight bytes -- defined by spec
|
||||||
|
C_ASSERT(sizeof(USB_DEFAULT_PIPE_SETUP_PACKET) == 8); |
||||||
|
|
||||||
|
|
||||||
|
#define USB_DEVICE_QUALIFIER_DESCRIPTOR_TYPE 0x06 |
||||||
|
|
||||||
|
typedef struct _USB_DEVICE_QUALIFIER_DESCRIPTOR { |
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
USHORT bcdUSB; |
||||||
|
UCHAR bDeviceClass; |
||||||
|
UCHAR bDeviceSubClass; |
||||||
|
UCHAR bDeviceProtocol; |
||||||
|
UCHAR bMaxPacketSize0; |
||||||
|
UCHAR bNumConfigurations; |
||||||
|
UCHAR bReserved; |
||||||
|
} USB_DEVICE_QUALIFIER_DESCRIPTOR, *PUSB_DEVICE_QUALIFIER_DESCRIPTOR; |
||||||
|
|
||||||
|
|
||||||
|
typedef union _USB_HIGH_SPEED_MAXPACKET { |
||||||
|
struct _MP { |
||||||
|
USHORT MaxPacket:11; /* 0..10 */ |
||||||
|
USHORT HSmux:2; /* 11..12 */ |
||||||
|
USHORT Reserved:3; /* 13..15 */ |
||||||
|
}; |
||||||
|
USHORT us; |
||||||
|
} USB_HIGH_SPEED_MAXPACKET, *PUSB_HIGH_SPEED_MAXPACKET; |
||||||
|
|
||||||
|
#define USB_INTERFACE_ASSOCIATION_DESCRIPTOR_TYPE 0x0B |
||||||
|
|
||||||
|
typedef struct _USB_INTERFACE_ASSOCIATION_DESCRIPTOR { |
||||||
|
|
||||||
|
UCHAR bLength; |
||||||
|
UCHAR bDescriptorType; |
||||||
|
UCHAR bFirstInterface; |
||||||
|
UCHAR bInterfaceCount; |
||||||
|
UCHAR bFunctionClass; |
||||||
|
UCHAR bFunctionSubClass; |
||||||
|
UCHAR bFunctionProtocol; |
||||||
|
UCHAR iFunction; |
||||||
|
|
||||||
|
} USB_INTERFACE_ASSOCIATION_DESCRIPTOR, *PUSB_INTERFACE_ASSOCIATION_DESCRIPTOR; |
||||||
|
|
||||||
|
|
||||||
|
#include <POPPACK.H> |
||||||
|
|
||||||
|
#endif __USB200_H__ |
||||||
|
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,60 @@ |
|||||||
|
#ifndef DATATHREAD_H |
||||||
|
#define DATATHREAD_H |
||||||
|
|
||||||
|
#include <qt_windows.h> |
||||||
|
#include <QObject> |
||||||
|
#include <QThread> |
||||||
|
#include <QByteArray> |
||||||
|
#include <QMutex> |
||||||
|
#include <opencv2/opencv.hpp> |
||||||
|
using namespace cv; |
||||||
|
class datathread : public QThread |
||||||
|
{ |
||||||
|
Q_OBJECT |
||||||
|
public: |
||||||
|
explicit datathread(QObject *parent = nullptr); |
||||||
|
|
||||||
|
void SetImageInfo(int _type, int _rows, int _cols); |
||||||
|
|
||||||
|
void stopProcess(); |
||||||
|
|
||||||
|
void setStatu(bool _run); |
||||||
|
|
||||||
|
public slots: |
||||||
|
void appendData(char* data,int len); |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
signals: |
||||||
|
void signalGetImage(cv::Mat); |
||||||
|
|
||||||
|
|
||||||
|
protected: |
||||||
|
void run()override; |
||||||
|
|
||||||
|
|
||||||
|
private: |
||||||
|
QMutex dataMutex; |
||||||
|
|
||||||
|
int minLen; |
||||||
|
bool onImage; |
||||||
|
bool onLine; |
||||||
|
int cols; |
||||||
|
int rows; |
||||||
|
int type; |
||||||
|
int lineNum; |
||||||
|
int pixNum; |
||||||
|
unsigned char* recvImage; |
||||||
|
unsigned char* sendImage; |
||||||
|
int bitsPerPix; |
||||||
|
unsigned char* pureData; |
||||||
|
unsigned char* data; |
||||||
|
int datalen; |
||||||
|
|
||||||
|
bool isRun; |
||||||
|
Mat image; |
||||||
|
Mat temp; |
||||||
|
|
||||||
|
}; |
||||||
|
|
||||||
|
#endif // DATATHREAD_H
|
@ -0,0 +1,41 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<ui version="4.0"> |
||||||
|
<class>login</class> |
||||||
|
<widget class="QWidget" name="login"> |
||||||
|
<property name="geometry"> |
||||||
|
<rect> |
||||||
|
<x>0</x> |
||||||
|
<y>0</y> |
||||||
|
<width>146</width> |
||||||
|
<height>200</height> |
||||||
|
</rect> |
||||||
|
</property> |
||||||
|
<property name="windowTitle"> |
||||||
|
<string>Form</string> |
||||||
|
</property> |
||||||
|
<property name="styleSheet"> |
||||||
|
<string notr="true"/> |
||||||
|
</property> |
||||||
|
<layout class="QVBoxLayout" name="verticalLayout"> |
||||||
|
<item> |
||||||
|
<widget class="QLabel" name="label"> |
||||||
|
<property name="text"> |
||||||
|
<string/> |
||||||
|
</property> |
||||||
|
<property name="pixmap"> |
||||||
|
<pixmap>../../zxrcClient/zxrcClient/logo.ico</pixmap> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item> |
||||||
|
<widget class="QProgressBar" name="progressBar"> |
||||||
|
<property name="value"> |
||||||
|
<number>24</number> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
</layout> |
||||||
|
</widget> |
||||||
|
<resources/> |
||||||
|
<connections/> |
||||||
|
</ui> |
After Width: | Height: | Size: 8.8 KiB |
@ -0,0 +1,283 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<ui version="4.0"> |
||||||
|
<class>MainWindow</class> |
||||||
|
<widget class="QMainWindow" name="MainWindow"> |
||||||
|
<property name="geometry"> |
||||||
|
<rect> |
||||||
|
<x>0</x> |
||||||
|
<y>0</y> |
||||||
|
<width>1092</width> |
||||||
|
<height>607</height> |
||||||
|
</rect> |
||||||
|
</property> |
||||||
|
<property name="windowTitle"> |
||||||
|
<string>MainWindow</string> |
||||||
|
</property> |
||||||
|
<widget class="QWidget" name="centralwidget"> |
||||||
|
<layout class="QGridLayout" name="gridLayout"> |
||||||
|
<item row="0" column="5"> |
||||||
|
<widget class="SpinBox" name="spinBox_2"> |
||||||
|
<property name="minimum"> |
||||||
|
<number>1</number> |
||||||
|
</property> |
||||||
|
<property name="maximum"> |
||||||
|
<number>10000</number> |
||||||
|
</property> |
||||||
|
<property name="value"> |
||||||
|
<number>640</number> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="0" column="0"> |
||||||
|
<widget class="TogglePushButton" name="pushButton"> |
||||||
|
<property name="text"> |
||||||
|
<string>开始传输</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="0" column="2"> |
||||||
|
<widget class="QLabel" name="label_2"> |
||||||
|
<property name="text"> |
||||||
|
<string> 行数 </string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="0" column="1"> |
||||||
|
<widget class="PushButton" name="pushButton_2"> |
||||||
|
<property name="text"> |
||||||
|
<string>恢复默认</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="0" column="3"> |
||||||
|
<widget class="SpinBox" name="spinBox"> |
||||||
|
<property name="minimum"> |
||||||
|
<number>1</number> |
||||||
|
</property> |
||||||
|
<property name="maximum"> |
||||||
|
<number>10000</number> |
||||||
|
</property> |
||||||
|
<property name="value"> |
||||||
|
<number>512</number> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="0" column="4"> |
||||||
|
<widget class="QLabel" name="label_3"> |
||||||
|
<property name="text"> |
||||||
|
<string> 列数 </string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="1" column="0" colspan="6"> |
||||||
|
<widget class="Splitter" name="splitter_2"> |
||||||
|
<property name="orientation"> |
||||||
|
<enum>Qt::Horizontal</enum> |
||||||
|
</property> |
||||||
|
<widget class="Splitter" name="splitter_1"> |
||||||
|
<property name="orientation"> |
||||||
|
<enum>Qt::Vertical</enum> |
||||||
|
</property> |
||||||
|
<widget class="ToolBox" name="toolbox" native="true"/> |
||||||
|
<widget class="QTextBrowser" name="textBrowser"/> |
||||||
|
</widget> |
||||||
|
<widget class="QScrollArea" name="scrollArea"> |
||||||
|
<property name="minimumSize"> |
||||||
|
<size> |
||||||
|
<width>648</width> |
||||||
|
<height>520</height> |
||||||
|
</size> |
||||||
|
</property> |
||||||
|
<property name="widgetResizable"> |
||||||
|
<bool>true</bool> |
||||||
|
</property> |
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents"> |
||||||
|
<property name="geometry"> |
||||||
|
<rect> |
||||||
|
<x>0</x> |
||||||
|
<y>0</y> |
||||||
|
<width>646</width> |
||||||
|
<height>518</height> |
||||||
|
</rect> |
||||||
|
</property> |
||||||
|
<widget class="QLabel" name="label"> |
||||||
|
<property name="geometry"> |
||||||
|
<rect> |
||||||
|
<x>10</x> |
||||||
|
<y>20</y> |
||||||
|
<width>621</width> |
||||||
|
<height>481</height> |
||||||
|
</rect> |
||||||
|
</property> |
||||||
|
<property name="text"> |
||||||
|
<string>TextLabel</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</widget> |
||||||
|
</widget> |
||||||
|
<widget class="QWidget" name="widget_2" native="true"> |
||||||
|
<layout class="QGridLayout" name="gridLayout_2"> |
||||||
|
<item row="8" column="1"> |
||||||
|
<widget class="QLineEdit" name="lineEdit_6"/> |
||||||
|
</item> |
||||||
|
<item row="4" column="1"> |
||||||
|
<widget class="QLineEdit" name="lineEdit_3"/> |
||||||
|
</item> |
||||||
|
<item row="2" column="0"> |
||||||
|
<widget class="QLabel" name="label_4"> |
||||||
|
<property name="text"> |
||||||
|
<string>中心点横坐标</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="1" column="0" colspan="2"> |
||||||
|
<widget class="QTableWidget" name="tableWidget"/> |
||||||
|
</item> |
||||||
|
<item row="2" column="1"> |
||||||
|
<widget class="QLineEdit" name="lineEdit"/> |
||||||
|
</item> |
||||||
|
<item row="3" column="1"> |
||||||
|
<widget class="QLineEdit" name="lineEdit_2"/> |
||||||
|
</item> |
||||||
|
<item row="0" column="0" colspan="2"> |
||||||
|
<widget class="TogglePushButton" name="pushButton_3"> |
||||||
|
<property name="text"> |
||||||
|
<string>开始统计</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="4" column="0"> |
||||||
|
<widget class="QLabel" name="label_6"> |
||||||
|
<property name="text"> |
||||||
|
<string>区域平均值</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="5" column="1"> |
||||||
|
<widget class="QLineEdit" name="lineEdit_4"/> |
||||||
|
</item> |
||||||
|
<item row="6" column="0" colspan="2"> |
||||||
|
<widget class="Line" name="line"> |
||||||
|
<property name="orientation"> |
||||||
|
<enum>Qt::Horizontal</enum> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="13" column="0" colspan="2"> |
||||||
|
<spacer name="verticalSpacer"> |
||||||
|
<property name="orientation"> |
||||||
|
<enum>Qt::Vertical</enum> |
||||||
|
</property> |
||||||
|
<property name="sizeHint" stdset="0"> |
||||||
|
<size> |
||||||
|
<width>20</width> |
||||||
|
<height>40</height> |
||||||
|
</size> |
||||||
|
</property> |
||||||
|
</spacer> |
||||||
|
</item> |
||||||
|
<item row="3" column="0"> |
||||||
|
<widget class="QLabel" name="label_5"> |
||||||
|
<property name="text"> |
||||||
|
<string>中心点纵坐标</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="10" column="0"> |
||||||
|
<widget class="QLabel" name="label_10"> |
||||||
|
<property name="text"> |
||||||
|
<string>全局平均值</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="10" column="1"> |
||||||
|
<widget class="QLineEdit" name="lineEdit_7"/> |
||||||
|
</item> |
||||||
|
<item row="11" column="0"> |
||||||
|
<widget class="QLabel" name="label_11"> |
||||||
|
<property name="text"> |
||||||
|
<string>全局均方根</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="5" column="0"> |
||||||
|
<widget class="QLabel" name="label_7"> |
||||||
|
<property name="text"> |
||||||
|
<string>区域均方根</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="7" column="1"> |
||||||
|
<widget class="QLineEdit" name="lineEdit_5"/> |
||||||
|
</item> |
||||||
|
<item row="7" column="0"> |
||||||
|
<widget class="QLabel" name="label_8"> |
||||||
|
<property name="text"> |
||||||
|
<string>截止点数</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="8" column="0"> |
||||||
|
<widget class="QLabel" name="label_9"> |
||||||
|
<property name="text"> |
||||||
|
<string>溢出点数</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="11" column="1"> |
||||||
|
<widget class="QLineEdit" name="lineEdit_8"/> |
||||||
|
</item> |
||||||
|
</layout> |
||||||
|
</widget> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
</layout> |
||||||
|
</widget> |
||||||
|
<widget class="QStatusBar" name="statusbar"/> |
||||||
|
<widget class="QToolBar" name="toolBar"> |
||||||
|
<property name="windowTitle"> |
||||||
|
<string>toolBar</string> |
||||||
|
</property> |
||||||
|
<property name="movable"> |
||||||
|
<bool>false</bool> |
||||||
|
</property> |
||||||
|
<attribute name="toolBarArea"> |
||||||
|
<enum>TopToolBarArea</enum> |
||||||
|
</attribute> |
||||||
|
<attribute name="toolBarBreak"> |
||||||
|
<bool>false</bool> |
||||||
|
</attribute> |
||||||
|
</widget> |
||||||
|
</widget> |
||||||
|
<customwidgets> |
||||||
|
<customwidget> |
||||||
|
<class>TogglePushButton</class> |
||||||
|
<extends>QPushButton</extends> |
||||||
|
<header location="global">qfluentwidgets</header> |
||||||
|
</customwidget> |
||||||
|
<customwidget> |
||||||
|
<class>SpinBox</class> |
||||||
|
<extends>QSpinBox</extends> |
||||||
|
<header location="global">qfluentwidgets</header> |
||||||
|
</customwidget> |
||||||
|
<customwidget> |
||||||
|
<class>ToolBox</class> |
||||||
|
<extends>QWidget</extends> |
||||||
|
<header location="global">qfluentwidgets</header> |
||||||
|
<container>1</container> |
||||||
|
</customwidget> |
||||||
|
<customwidget> |
||||||
|
<class>Splitter</class> |
||||||
|
<extends>QSplitter</extends> |
||||||
|
<header location="global">qfluentwidgets</header> |
||||||
|
<container>1</container> |
||||||
|
</customwidget> |
||||||
|
<customwidget> |
||||||
|
<class>PushButton</class> |
||||||
|
<extends>QPushButton</extends> |
||||||
|
<header location="global">qfluentwidgets</header> |
||||||
|
</customwidget> |
||||||
|
</customwidgets> |
||||||
|
<resources/> |
||||||
|
<connections/> |
||||||
|
</ui> |
@ -0,0 +1,139 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<ui version="4.0"> |
||||||
|
<class>menu1</class> |
||||||
|
<widget class="QWidget" name="menu1"> |
||||||
|
<property name="geometry"> |
||||||
|
<rect> |
||||||
|
<x>0</x> |
||||||
|
<y>0</y> |
||||||
|
<width>209</width> |
||||||
|
<height>640</height> |
||||||
|
</rect> |
||||||
|
</property> |
||||||
|
<property name="windowTitle"> |
||||||
|
<string>Form</string> |
||||||
|
</property> |
||||||
|
<layout class="QGridLayout" name="gridLayout"> |
||||||
|
<item row="0" column="0"> |
||||||
|
<widget class="QPushButton" name="pushButton"> |
||||||
|
<property name="text"> |
||||||
|
<string>存低温背景</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="0" column="1"> |
||||||
|
<widget class="QPushButton" name="pushButton_2"> |
||||||
|
<property name="text"> |
||||||
|
<string>存高温背景</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="1" column="0"> |
||||||
|
<widget class="QPushButton" name="pushButton_3"> |
||||||
|
<property name="text"> |
||||||
|
<string>计算K值</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="1" column="1"> |
||||||
|
<widget class="QPushButton" name="pushButton_4"> |
||||||
|
<property name="text"> |
||||||
|
<string>保存K值</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="2" column="0"> |
||||||
|
<widget class="TogglePushButton" name="pushButton_5"> |
||||||
|
<property name="text"> |
||||||
|
<string>开启K值</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="3" column="0"> |
||||||
|
<widget class="QPushButton" name="pushButton_6"> |
||||||
|
<property name="text"> |
||||||
|
<string>单点校正</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="3" column="1"> |
||||||
|
<widget class="QPushButton" name="pushButton_7"> |
||||||
|
<property name="text"> |
||||||
|
<string>保存B值</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="4" column="0"> |
||||||
|
<widget class="TogglePushButton" name="pushButton_8"> |
||||||
|
<property name="text"> |
||||||
|
<string>开启B值</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="5" column="0"> |
||||||
|
<widget class="SpinBox" name="spinBox"> |
||||||
|
<property name="maximum"> |
||||||
|
<number>4000</number> |
||||||
|
</property> |
||||||
|
<property name="singleStep"> |
||||||
|
<number>0</number> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="5" column="1"> |
||||||
|
<widget class="QPushButton" name="pushButton_9"> |
||||||
|
<property name="text"> |
||||||
|
<string>设置GPOL(mv)</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="6" column="0"> |
||||||
|
<widget class="DoubleSpinBox" name="doubleSpinBox"> |
||||||
|
<property name="maximum"> |
||||||
|
<double>35.000000000000000</double> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="6" column="1"> |
||||||
|
<widget class="QPushButton" name="pushButton_10"> |
||||||
|
<property name="text"> |
||||||
|
<string>设置积分时间(ms)</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="7" column="0"> |
||||||
|
<widget class="TogglePushButton" name="pushButton_11"> |
||||||
|
<property name="text"> |
||||||
|
<string>开启TEC</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="7" column="1"> |
||||||
|
<widget class="TogglePushButton" name="pushButton_12"> |
||||||
|
<property name="text"> |
||||||
|
<string>切换14Bit</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
</layout> |
||||||
|
</widget> |
||||||
|
<customwidgets> |
||||||
|
<customwidget> |
||||||
|
<class>TogglePushButton</class> |
||||||
|
<extends>QPushButton</extends> |
||||||
|
<header location="global">qfluentwidgets</header> |
||||||
|
</customwidget> |
||||||
|
<customwidget> |
||||||
|
<class>SpinBox</class> |
||||||
|
<extends>QSpinBox</extends> |
||||||
|
<header location="global">qfluentwidgets</header> |
||||||
|
</customwidget> |
||||||
|
<customwidget> |
||||||
|
<class>DoubleSpinBox</class> |
||||||
|
<extends>QDoubleSpinBox</extends> |
||||||
|
<header location="global">qfluentwidgets</header> |
||||||
|
</customwidget> |
||||||
|
</customwidgets> |
||||||
|
<resources/> |
||||||
|
<connections/> |
||||||
|
</ui> |
@ -0,0 +1,130 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<ui version="4.0"> |
||||||
|
<class>menu2</class> |
||||||
|
<widget class="QWidget" name="menu2"> |
||||||
|
<property name="geometry"> |
||||||
|
<rect> |
||||||
|
<x>0</x> |
||||||
|
<y>0</y> |
||||||
|
<width>480</width> |
||||||
|
<height>640</height> |
||||||
|
</rect> |
||||||
|
</property> |
||||||
|
<property name="windowTitle"> |
||||||
|
<string>Form</string> |
||||||
|
</property> |
||||||
|
<layout class="QGridLayout" name="gridLayout"> |
||||||
|
<item row="0" column="0"> |
||||||
|
<widget class="TogglePushButton" name="pushButton"> |
||||||
|
<property name="text"> |
||||||
|
<string>开启空间滤波</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="1" column="0"> |
||||||
|
<widget class="SpinBox" name="spinBox"> |
||||||
|
<property name="maximum"> |
||||||
|
<number>1023</number> |
||||||
|
</property> |
||||||
|
<property name="value"> |
||||||
|
<number>250</number> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="1" column="1"> |
||||||
|
<widget class="QPushButton" name="pushButton_2"> |
||||||
|
<property name="text"> |
||||||
|
<string>设置DDE增益</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="2" column="0"> |
||||||
|
<widget class="SpinBox" name="spinBox_2"> |
||||||
|
<property name="maximum"> |
||||||
|
<number>255</number> |
||||||
|
</property> |
||||||
|
<property name="value"> |
||||||
|
<number>85</number> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="2" column="1"> |
||||||
|
<widget class="QPushButton" name="pushButton_3"> |
||||||
|
<property name="text"> |
||||||
|
<string>设置数字滤波系数</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="3" column="0"> |
||||||
|
<widget class="SpinBox" name="spinBox_3"> |
||||||
|
<property name="maximum"> |
||||||
|
<number>65535</number> |
||||||
|
</property> |
||||||
|
<property name="value"> |
||||||
|
<number>200</number> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="3" column="1"> |
||||||
|
<widget class="QPushButton" name="pushButton_4"> |
||||||
|
<property name="text"> |
||||||
|
<string>设置直方图平台值</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="4" column="0"> |
||||||
|
<widget class="TogglePushButton" name="pushButton_5"> |
||||||
|
<property name="text"> |
||||||
|
<string>开启数字增强</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="5" column="0"> |
||||||
|
<widget class="QLabel" name="label"> |
||||||
|
<property name="text"> |
||||||
|
<string>对比度</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="5" column="1"> |
||||||
|
<widget class="DoubleSpinBox" name="doubleSpinBox"/> |
||||||
|
</item> |
||||||
|
<item row="6" column="0"> |
||||||
|
<widget class="QLabel" name="label_2"> |
||||||
|
<property name="text"> |
||||||
|
<string>亮度</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="6" column="1"> |
||||||
|
<widget class="SpinBox" name="spinBox_4"/> |
||||||
|
</item> |
||||||
|
<item row="0" column="1"> |
||||||
|
<widget class="TogglePushButton" name="pushButton_6"> |
||||||
|
<property name="text"> |
||||||
|
<string>开启双边滤波</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
</layout> |
||||||
|
</widget> |
||||||
|
<customwidgets> |
||||||
|
<customwidget> |
||||||
|
<class>TogglePushButton</class> |
||||||
|
<extends>QPushButton</extends> |
||||||
|
<header location="global">qfluentwidgets</header> |
||||||
|
</customwidget> |
||||||
|
<customwidget> |
||||||
|
<class>SpinBox</class> |
||||||
|
<extends>QSpinBox</extends> |
||||||
|
<header location="global">qfluentwidgets</header> |
||||||
|
</customwidget> |
||||||
|
<customwidget> |
||||||
|
<class>DoubleSpinBox</class> |
||||||
|
<extends>QDoubleSpinBox</extends> |
||||||
|
<header location="global">qfluentwidgets</header> |
||||||
|
</customwidget> |
||||||
|
</customwidgets> |
||||||
|
<resources/> |
||||||
|
<connections/> |
||||||
|
</ui> |
@ -0,0 +1,116 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<ui version="4.0"> |
||||||
|
<class>menu3</class> |
||||||
|
<widget class="QWidget" name="menu3"> |
||||||
|
<property name="geometry"> |
||||||
|
<rect> |
||||||
|
<x>0</x> |
||||||
|
<y>0</y> |
||||||
|
<width>480</width> |
||||||
|
<height>640</height> |
||||||
|
</rect> |
||||||
|
</property> |
||||||
|
<property name="windowTitle"> |
||||||
|
<string>Form</string> |
||||||
|
</property> |
||||||
|
<layout class="QGridLayout" name="gridLayout_3"> |
||||||
|
<item row="0" column="0"> |
||||||
|
<widget class="QGroupBox" name="groupBox"> |
||||||
|
<property name="title"> |
||||||
|
<string>方向控制</string> |
||||||
|
</property> |
||||||
|
<layout class="QGridLayout" name="gridLayout"> |
||||||
|
<item row="0" column="0"> |
||||||
|
<widget class="CheckBox" name="checkBox"> |
||||||
|
<property name="text"> |
||||||
|
<string>左右镜像</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="1" column="0"> |
||||||
|
<widget class="CheckBox" name="checkBox_2"> |
||||||
|
<property name="text"> |
||||||
|
<string>上下镜像</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="2" column="0"> |
||||||
|
<widget class="RadioButton" name="radioButton"> |
||||||
|
<property name="text"> |
||||||
|
<string>左转90°</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="3" column="0"> |
||||||
|
<widget class="RadioButton" name="radioButton_2"> |
||||||
|
<property name="text"> |
||||||
|
<string>不变</string> |
||||||
|
</property> |
||||||
|
<property name="checked"> |
||||||
|
<bool>true</bool> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="4" column="0"> |
||||||
|
<widget class="RadioButton" name="radioButton_3"> |
||||||
|
<property name="text"> |
||||||
|
<string>右转90°</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
</layout> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="1" column="0"> |
||||||
|
<widget class="QGroupBox" name="groupBox_2"> |
||||||
|
<property name="title"> |
||||||
|
<string>颜色模式</string> |
||||||
|
</property> |
||||||
|
<layout class="QGridLayout" name="gridLayout_2"> |
||||||
|
<item row="0" column="0"> |
||||||
|
<widget class="RadioButton" name="radioButton_4"> |
||||||
|
<property name="text"> |
||||||
|
<string>原色</string> |
||||||
|
</property> |
||||||
|
<property name="checked"> |
||||||
|
<bool>true</bool> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="1" column="0"> |
||||||
|
<widget class="RadioButton" name="radioButton_5"> |
||||||
|
<property name="text"> |
||||||
|
<string>反色</string> |
||||||
|
</property> |
||||||
|
<property name="checked"> |
||||||
|
<bool>false</bool> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="2" column="0"> |
||||||
|
<widget class="RadioButton" name="radioButton_6"> |
||||||
|
<property name="text"> |
||||||
|
<string>彩色</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
</layout> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
</layout> |
||||||
|
</widget> |
||||||
|
<customwidgets> |
||||||
|
<customwidget> |
||||||
|
<class>RadioButton</class> |
||||||
|
<extends>QRadioButton</extends> |
||||||
|
<header location="global">qfluentwidgets</header> |
||||||
|
</customwidget> |
||||||
|
<customwidget> |
||||||
|
<class>CheckBox</class> |
||||||
|
<extends>QCheckBox</extends> |
||||||
|
<header location="global">qfluentwidgets</header> |
||||||
|
</customwidget> |
||||||
|
</customwidgets> |
||||||
|
<resources/> |
||||||
|
<connections/> |
||||||
|
</ui> |
@ -0,0 +1,78 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<ui version="4.0"> |
||||||
|
<class>menu4</class> |
||||||
|
<widget class="QWidget" name="menu4"> |
||||||
|
<property name="geometry"> |
||||||
|
<rect> |
||||||
|
<x>0</x> |
||||||
|
<y>0</y> |
||||||
|
<width>480</width> |
||||||
|
<height>640</height> |
||||||
|
</rect> |
||||||
|
</property> |
||||||
|
<property name="windowTitle"> |
||||||
|
<string>Form</string> |
||||||
|
</property> |
||||||
|
<layout class="QGridLayout" name="gridLayout"> |
||||||
|
<item row="5" column="0"> |
||||||
|
<widget class="SpinBox" name="spinBox"/> |
||||||
|
</item> |
||||||
|
<item row="5" column="1"> |
||||||
|
<widget class="QPushButton" name="pushButton_6"> |
||||||
|
<property name="text"> |
||||||
|
<string>保存指定帧数数据</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="4" column="0" colspan="2"> |
||||||
|
<widget class="TogglePushButton" name="pushButton_5"> |
||||||
|
<property name="text"> |
||||||
|
<string>保存连续原始数据</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="3" column="0" colspan="2"> |
||||||
|
<widget class="TogglePushButton" name="pushButton_4"> |
||||||
|
<property name="text"> |
||||||
|
<string>保存视频</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="2" column="0" colspan="2"> |
||||||
|
<widget class="QPushButton" name="pushButton_3"> |
||||||
|
<property name="text"> |
||||||
|
<string>保存单帧原始数据</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="1" column="0" colspan="2"> |
||||||
|
<widget class="QPushButton" name="pushButton_2"> |
||||||
|
<property name="text"> |
||||||
|
<string>保存单帧图像</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
<item row="0" column="0" colspan="2"> |
||||||
|
<widget class="QPushButton" name="pushButton"> |
||||||
|
<property name="text"> |
||||||
|
<string>设置文件保存路径</string> |
||||||
|
</property> |
||||||
|
</widget> |
||||||
|
</item> |
||||||
|
</layout> |
||||||
|
</widget> |
||||||
|
<customwidgets> |
||||||
|
<customwidget> |
||||||
|
<class>TogglePushButton</class> |
||||||
|
<extends>QPushButton</extends> |
||||||
|
<header location="global">qfluentwidgets</header> |
||||||
|
</customwidget> |
||||||
|
<customwidget> |
||||||
|
<class>SpinBox</class> |
||||||
|
<extends>QSpinBox</extends> |
||||||
|
<header location="global">qfluentwidgets</header> |
||||||
|
</customwidget> |
||||||
|
</customwidgets> |
||||||
|
<resources/> |
||||||
|
<connections/> |
||||||
|
</ui> |
@ -0,0 +1,25 @@ |
|||||||
|
#ifndef PROTOCOL_H |
||||||
|
#define PROTOCOL_H |
||||||
|
|
||||||
|
enum IMAGETYPE{ |
||||||
|
gray8, |
||||||
|
gray16 |
||||||
|
}; |
||||||
|
|
||||||
|
#define FrameHead 0xFFFFFFFF |
||||||
|
#define LineHead 0xF0000000 |
||||||
|
|
||||||
|
#define MINFrameSize 60000 |
||||||
|
|
||||||
|
struct headStruct{ |
||||||
|
int headid; |
||||||
|
int frameType; |
||||||
|
int rows; |
||||||
|
int cols; |
||||||
|
int check; |
||||||
|
}; |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif // PROTOCOL_H
|
Loading…
Reference in new issue