can_anagate_win32:
authorChristian Taedcke <hacking@taedcke.com>
Mon, 23 Jan 2012 20:16:06 +0100
changeset 703 00600dcc1dee
parent 702 8be1c1e5fb17
child 704 375137a7f256
can_anagate_win32:
- added can_anagate_win32 to solution file and fixed compilation errors for current driver
- renamed project file to include vc9
CanFestival-3.vc9.sln
drivers/can_anagate_win32/can_anagate_win32.c
drivers/can_anagate_win32/can_anagate_win32.vc9.vcproj
drivers/can_anagate_win32/can_anagate_win32.vcproj
--- a/CanFestival-3.vc9.sln	Mon Jan 23 20:06:45 2012 +0100
+++ b/CanFestival-3.vc9.sln	Mon Jan 23 20:16:06 2012 +0100
@@ -19,6 +19,8 @@
 		{50EF2507-9B87-4525-8B19-80EB42E67079} = {50EF2507-9B87-4525-8B19-80EB42E67079}
 	EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "can_anagate_win32", "drivers\can_anagate_win32\can_anagate_win32.vc9.vcproj", "{2F3E1E68-1518-4829-B543-8DF2987E664B}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug UNICODE|Win32 = Debug UNICODE|Win32
@@ -67,6 +69,14 @@
 		{BD8B1FE1-89CD-4F89-8275-0F553FA71059}.Release UNICODE|Win32.Build.0 = Release|Win32
 		{BD8B1FE1-89CD-4F89-8275-0F553FA71059}.Release|Win32.ActiveCfg = Release|Win32
 		{BD8B1FE1-89CD-4F89-8275-0F553FA71059}.Release|Win32.Build.0 = Release|Win32
+		{2F3E1E68-1518-4829-B543-8DF2987E664B}.Debug UNICODE|Win32.ActiveCfg = Debug|Win32
+		{2F3E1E68-1518-4829-B543-8DF2987E664B}.Debug UNICODE|Win32.Build.0 = Debug|Win32
+		{2F3E1E68-1518-4829-B543-8DF2987E664B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{2F3E1E68-1518-4829-B543-8DF2987E664B}.Debug|Win32.Build.0 = Debug|Win32
+		{2F3E1E68-1518-4829-B543-8DF2987E664B}.Release UNICODE|Win32.ActiveCfg = Release|Win32
+		{2F3E1E68-1518-4829-B543-8DF2987E664B}.Release UNICODE|Win32.Build.0 = Release|Win32
+		{2F3E1E68-1518-4829-B543-8DF2987E664B}.Release|Win32.ActiveCfg = Release|Win32
+		{2F3E1E68-1518-4829-B543-8DF2987E664B}.Release|Win32.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
--- a/drivers/can_anagate_win32/can_anagate_win32.c	Mon Jan 23 20:06:45 2012 +0100
+++ b/drivers/can_anagate_win32/can_anagate_win32.c	Mon Jan 23 20:16:06 2012 +0100
@@ -84,7 +84,7 @@
 
 
 /*********functions which permit to communicate with the board****************/
-UNS8 canReceive_driver(CAN_HANDLE fd0, Message *m)
+UNS8 __stdcall canReceive_driver(CAN_HANDLE fd0, Message *m)
 {
 	SAnaGatePort*  pAnaGatePort = (SAnaGatePort*)fd0;
    int            i;
@@ -108,7 +108,7 @@
 }
 
 /***************************************************************************/
-UNS8 canSend_driver(CAN_HANDLE fd0, Message const *m)
+UNS8 __stdcall canSend_driver(CAN_HANDLE fd0, Message const *m)
 {
 	SAnaGatePort*  pAnaCanPort = (SAnaGatePort*)fd0;
 	char cErrorMsg[100];
@@ -152,13 +152,13 @@
 }
 /****************************************************************************/
 
-UNS8 canChangeBaudRate_driver( CAN_HANDLE fd0, char* baud)
+UNS8 __stdcall canChangeBaudRate_driver( CAN_HANDLE fd0, char* baud)
 {
    int nRetCode;
    char cErrorMsg[100];
    struct SAnaGatePort*  pAnaGatePort = (struct SAnaGatePort*)fd0;
    
-   if (nRetCode = CANSetGlobals (pAnaGatePort->hHandle, TranslateBaudeRate(baud), 0, 0, 1) ) 
+   if (nRetCode = CANSetGlobals (pAnaGatePort->hHandle, TranslateBaudeRate(baud), 0, 0, 1, 0) ) 
    {
       CANErrorMessage( nRetCode, cErrorMsg ,100 ); // Convert returncode to error messge
       fprintf(stderr, "canChangeBaudRate_drive (AnaGate_Win32): %s\n", cErrorMsg);
@@ -174,7 +174,7 @@
  For example "192.168.1.254:A"
 */
 
-CAN_HANDLE canOpen_driver(s_BOARD *board)
+CAN_HANDLE __stdcall canOpen_driver(s_BOARD *board)
 {
 	int PortNr;
 	char cErrorMsg[100];
@@ -248,7 +248,8 @@
 							   TranslateBaudeRate(board->baudrate), 
 							   0,/*OperatingMode = normal*/ 
 							   0,/*CAN-Termination = off*/ 
-							   1 /*HighSpeedMode = on*/) ) 
+							   1, /*HighSpeedMode = on*/
+							   0 /*Timestamps = off*/) ) 
 	{
 		CANErrorMessage( nRetCode, cErrorMsg ,100 ); // Convert returncode to error messge
 		fprintf(stderr, "canOpen_driver (AnaGate_Win32): %s @ %s\n", cErrorMsg,sIPAddress);
@@ -285,7 +286,7 @@
 }
 
 /***************************************************************************/
-int canClose_driver(CAN_HANDLE fd0)
+int __stdcall canClose_driver(CAN_HANDLE fd0)
 {
 	SAnaGatePort*  pAnaCanPort = (SAnaGatePort*)fd0;
 	char cErrorMsg[100];
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/drivers/can_anagate_win32/can_anagate_win32.vc9.vcproj	Mon Jan 23 20:16:06 2012 +0100
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9,00"
+	Name="can_anagate_win32"
+	ProjectGUID="{2F3E1E68-1518-4829-B543-8DF2987E664B}"
+	RootNamespace="can_anagate_win32"
+	Keyword="Win32Proj"
+	TargetFrameworkVersion="131072"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="../../Debug"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="AnaGateCAN_API;../../include;../../include/win32"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CAN_ANAGATE_WIN32_EXPORTS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="false"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="AnaGateCanDll.lib"
+				LinkIncremental="2"
+				AdditionalLibraryDirectories="AnaGateCAN_API"
+				ModuleDefinitionFile="can_anagate_win32.def"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CAN_ANAGATE_WIN32_EXPORTS"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="2"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Quelldateien"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath=".\can_anagate_win32.c"
+				>
+			</File>
+			<File
+				RelativePath=".\can_anagate_win32.def"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Headerdateien"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath=".\API\include\AnaGateDllCan.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
--- a/drivers/can_anagate_win32/can_anagate_win32.vcproj	Mon Jan 23 20:06:45 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,207 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8,00"
-	Name="can_anagate_win32"
-	ProjectGUID="{2F3E1E68-1518-4829-B543-8DF2987E664B}"
-	RootNamespace="can_anagate_win32"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="../../Debug"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="AnaGateCAN_API;../../include;../../include/win32"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CAN_ANAGATE_WIN32_EXPORTS"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="4"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="AnaGateCanDll.lib"
-				LinkIncremental="2"
-				AdditionalLibraryDirectories="AnaGateCAN_API"
-				ModuleDefinitionFile="can_anagate_win32.def"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="1"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CAN_ANAGATE_WIN32_EXPORTS"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="2"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="true"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Quelldateien"
-			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath=".\can_anagate_win32.c"
-				>
-			</File>
-			<File
-				RelativePath=".\can_anagate_win32.def"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Headerdateien"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-			<File
-				RelativePath=".\API\include\AnaGateDllCan.h"
-				>
-			</File>
-		</Filter>
-		<File
-			RelativePath=".\ReadMe.txt"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>