Subversion Repositories f9daq

Compare Revisions

No changes between revisions

Ignore whitespace Rev 176 → Rev 177

/drivers/wiener_pcicc32_dll/Release/pcicc32_ni.lib
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/pcicc32_ni.bsc
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/OS_INFO.obj
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/pcicc32_ni.dll
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/Libcc32_95.obj
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/pcicc32_ni.exp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/obj/OS_INFO.sbr
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/wiener_pcicc32_dll/Release/obj/bscmake.read.1.tlog
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/obj/Libcc32_95.sbr
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/wiener_pcicc32_dll/Release/obj/BscMake.command.1.tlog
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/obj/link.write.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/obj/CL.write.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/obj/link-rc.write.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/obj/pcicc32_ni.log
0,0 → 1,30
Build started 10.2.2014 9:12:17.
1>Project "C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\pcicc32_ni.vcxproj" on node 2 (Build target(s)).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(345,5): warning MSB8004: Intermediate Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Intermediate Directory.
1>ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\CL.exe /c /Zi /nologo /W3 /WX- /O2 /Oy- /D WIN32 /D NDEBUG /D _WINDOWS /D _VC80_UPGRADE=0x0600 /D _WINDLL /GF /Gm- /EHsc /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Fo".\Release\\" /Fd".\Release\vc110.pdb" /FR"C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Release\obj\\" /Gd /TC /analyze- /errorReport:prompt Libcc32.c Libcc32_95.c Libcc32_NT.c OS_INFO.C
Libcc32.c
Libcc32_95.c
Libcc32_NT.c
1>Libcc32_NT.c(126): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\string.h(191) : see declaration of 'strncpy'
OS_INFO.C
Generating Code...
Link:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Release\pcicc32_ni.dll" /INCREMENTAL:NO /NOLOGO odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:"C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Release\pcicc32_ni.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\Release\pcicc32_ni.lib" /MACHINE:X86 /SAFESEH /DLL .\Release\Libcc32.obj
.\Release\Libcc32_95.obj
.\Release\Libcc32_NT.obj
.\Release\OS_INFO.obj
Creating library .\Release\pcicc32_ni.lib and object .\Release\pcicc32_ni.exp
pcicc32_ni.vcxproj -> C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Release\pcicc32_ni.dll
BscMake:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\bscmake.exe /nologo /o".\Release\pcicc32_ni.bsc" "C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Release\obj\Libcc32.sbr" "C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Release\obj\Libcc32_95.sbr" "C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Release\obj\Libcc32_NT.sbr" "C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Release\obj\OS_INFO.sbr"
PostBuildEvent:
copy debug\pcicc32_ni.dll C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\
:VCEnd
1 file(s) copied.
1>Done Building Project "C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\pcicc32_ni.vcxproj" (Build target(s)).
 
Build succeeded.
 
Time Elapsed 00:00:03.87
/drivers/wiener_pcicc32_dll/Release/obj/link-cvtres.write.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/obj/pcicc32_ni.lastbuildstate
0,0 → 1,2
#v4.0:v110:false
Release|Win32|C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\|
/drivers/wiener_pcicc32_dll/Release/obj/bscmake.write.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/obj/Libcc32.sbr
/drivers/wiener_pcicc32_dll/Release/obj/pcicc32_ni.write.1.tlog
0,0 → 1,5
^C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\pcicc32_ni.vcxproj
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Release\pcicc32_ni.lib
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Release\pcicc32_ni.lib
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Release\pcicc32_ni.exp
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Release\pcicc32_ni.exp
/drivers/wiener_pcicc32_dll/Release/obj/link.read.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/obj/CL.read.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/obj/link-rc.read.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/obj/link.command.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/obj/link-cvtres.read.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/obj/cl.command.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/Libcc32_NT.obj
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release/vc110.pdb
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Release
Property changes:
Added: svn:global-ignores
+*.obj
/drivers/wiener_pcicc32_dll/Debug/pcicc32_ni.pdb
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/pcicc32_ni.lib
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/pcicc32_ni.dll
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/Libcc32_95.obj
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/pcicc32_ni.exp
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/vc110.idb
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/Libcc32.obj
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/obj/pcicc32_ni.lastbuildstate
0,0 → 1,2
#v4.0:v110:false
Debug|Win32|C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\|
/drivers/wiener_pcicc32_dll/Debug/obj/pcicc32_ni.write.1.tlog
0,0 → 1,15
^C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\pcicc32_ni.vcxproj
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.lib
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.lib
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.exp
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.exp
^C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\pcicc32_ni.vcxproj
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.lib
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.lib
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.exp
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.exp
^C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\pcicc32_ni.vcxproj
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.lib
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.lib
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.exp
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.exp
/drivers/wiener_pcicc32_dll/Debug/obj/link.write.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/obj/CL.write.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/obj/link.read.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/obj/CL.read.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/obj/link-rc.write.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/obj/link-rc.read.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/obj/pcicc32_ni.log
0,0 → 1,23
Build started 10.2.2014 8:57:06.
1>Project "C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\pcicc32_ni.vcxproj" on node 2 (Build target(s)).
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(345,5): warning MSB8004: Intermediate Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Intermediate Directory.
1>ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\CL.exe /c /ZI /nologo /W3 /WX- /Od /Oy- /D WIN32 /D _DEBUG /D _WINDOWS /D _VC80_UPGRADE=0x0600 /D _WINDLL /Gm /EHsc /MTd /GS /Gy- /fp:precise /Zc:wchar_t /Zc:forScope /Fo".\Debug\\" /Fd".\Debug\vc110.pdb" /Gd /TC /analyze- /errorReport:prompt Libcc32_NT.c
Libcc32_NT.c
1>c:\users\f9daq\rok\wienerpciada\pcicamac\dll-source\libcc32_nt.c(126): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
c:\program files (x86)\microsoft visual studio 11.0\vc\include\string.h(191) : see declaration of 'strncpy'
Link:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.dll" /INCREMENTAL /NOLOGO odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\Debug\pcicc32_ni.lib" /MACHINE:X86 /SAFESEH /DLL .\Debug\Libcc32.obj
.\Debug\Libcc32_95.obj
.\Debug\Libcc32_NT.obj
.\Debug\OS_INFO.obj
pcicc32_ni.vcxproj -> C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.dll
PostBuildEvent:
copy debug\pcicc32_ni.dll C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\
:VCEnd
1 file(s) copied.
1>Done Building Project "C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\pcicc32_ni.vcxproj" (Build target(s)).
 
Build succeeded.
 
Time Elapsed 00:00:00.60
/drivers/wiener_pcicc32_dll/Debug/obj/link-cvtres.write.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/obj/link.command.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/obj/cl.command.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/obj/link-cvtres.read.1.tlog
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/obj/pcicc32_ni.Build.CppClean.log
0,0 → 1,24
C:\USERS\F9DAQ\ROK\WIENERPCIADA\PCICAMAC\DLL-SOURCE\DEBUG\LIBCC32.OBJ
C:\USERS\F9DAQ\ROK\WIENERPCIADA\PCICAMAC\DLL-SOURCE\DEBUG\LIBCC32_95.OBJ
C:\USERS\F9DAQ\ROK\WIENERPCIADA\PCICAMAC\DLL-SOURCE\DEBUG\LIBCC32_NT.OBJ
C:\USERS\F9DAQ\ROK\WIENERPCIADA\PCICAMAC\DLL-SOURCE\DEBUG\OS_INFO.OBJ
C:\USERS\F9DAQ\ROK\WIENERPCIADA\PCICAMAC\DLL-SOURCE\DEBUG\VC110.PDB
C:\USERS\F9DAQ\ROK\WIENERPCIADA\PCICAMAC\DLL-SOURCE\DEBUG\PCICC32_NI.ILK
C:\USERS\F9DAQ\ROK\WIENERPCIADA\PCICAMAC\DLL-SOURCE\DEBUG\PCICC32_NI.DLL
C:\USERS\F9DAQ\ROK\WIENERPCIADA\PCICAMAC\DLL-SOURCE\DEBUG\PCICC32_NI.PDB
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.lib
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.exp
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\obj\cl.command.1.tlog
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\obj\CL.read.1.tlog
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\obj\CL.write.1.tlog
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\obj\link-cvtres.read.1.tlog
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\obj\link-cvtres.write.1.tlog
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\obj\link-rc.read.1.tlog
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\obj\link-rc.write.1.tlog
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\obj\link.command.1.tlog
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\obj\link.read.1.tlog
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\obj\link.write.1.tlog
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\obj\pcicc32_ni.write.1.tlog
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.pdb
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.dll
C:\Users\f9daq\rok\wienerpciada\PciCamac\Dll-source\Debug\pcicc32_ni.ilk
/drivers/wiener_pcicc32_dll/Debug/pcicc32_ni.ilk
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/Libcc32_NT.obj
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug/vc110.pdb
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/Debug
Property changes:
Added: svn:global-ignores
+*.obj
/drivers/wiener_pcicc32_dll/Libcc32_95.c
0,0 → 1,431
/*
cc32lib.c -- a simple access library for the PCICC32 PCI to CAMAC Interface from ARW Elektronik
 
(c) 2000 ARW Elektronik
 
this source code is published under GPL (Open Source). You can use, redistrubute and
modify it unless this header is not modified or deleted. No warranty is given that
this software will work like expected.
This product is not authorized for use as critical component in life support systems
wihout the express written approval of ARW Elektronik Germany.
Please announce changes and hints to ARW Elektronik
 
first steps derived from the LINUX pcicc32 library AR 16.03.2000
added buffer, UNTIL_NOT_Q and AUTOREAD functionality AR 17.03.2001
corrected fault in setAccessParameter() AR 21.05.2002
added framework only fro future interrupt handling AR 08.06.2002
*/
/*--- INCLUDES -----------------------------------------------------------------------------------*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "Vpcic32D.h" /* PCI common ioctl commands and structures between driver and library */
#include "libcc32_95.h" /* shared header bewteen applictaion and library */
 
/*--- DEFINES ------------------------------------------------------------------------------------*/
#define pwCC32_ADR(adr, N, A, F) (unsigned short *)((N << 10) + (A << 6) + ((F & 0xF) << 2) + adr)
#define plCC32_ADR(adr, N, A, F) (unsigned long *)((N << 10) + (A << 6) + ((F & 0xF) << 2) + adr)
#define WINDOW_SIZE 32768
 
/*--- EXTERNALS ----------------------------------------------------------------------------------*/
 
/*--- TYPEDEFS -----------------------------------------------------------------------------------*/
typedef struct
{
HANDLE nHandle; /* the handle of this device */
int nModuleNumber; /* the number of the module */
char *base; /* base of range */
unsigned short wLastAttributes; /* switched attributes like UNTIL_NOT_Q or AUTOREAD */
} CC32_DEVICE;
 
/*--- FUNCTIONS -----------------------------------------------------------------------*/
 
//--------------------------------------------------------------------------------------
// a function to get the base address of the CAMAC range
//
static int attachWindow(HANDLE nHandle, DWORD dwInterface, void **base)
{
VPCIC32D_WINDOW window;
DWORD DIOC_count; // count of returned bytes of DeviceIoControl
DWORD result;
 
*base = NULL;
if (nHandle == (HANDLE)-1) return ERROR_INVALID_HANDLE;
 
// attach a window into the CC32 space ----------------
result = DeviceIoControl(nHandle, VPCIC32_ATTACH_CC32,
&dwInterface, sizeof(dwInterface),
&window, sizeof(window),
&DIOC_count, NULL);
 
if (!result)
return GetLastError();
else
{
*base = window.pvWindowBase;
return 0;
}
}
 
//--------------------------------------------------------------------------------------
// a function to release a attached range
//
static int detachWindow(HANDLE nHandle, DWORD dwInterface)
{
DWORD DIOC_count; // count of returned bytes of DeviceIoControl
DWORD result;
 
if (nHandle == (HANDLE)-1) return ERROR_INVALID_HANDLE;
 
// attach a window into the CC32 space ----------------
result = DeviceIoControl(nHandle, VPCIC32_DETACH_CC32,
&dwInterface, sizeof(dwInterface),
NULL, 0, &DIOC_count, NULL);
if (!result)
return GetLastError();
else
return 0;
}
 
//--------------------------------------------------------------------------------------
// get the PCIADA status from the PCI side of the interface
//
static int getStatus(HANDLE nHandle, DWORD dwInterface, char *nTimeout, char *nLAM)
{
VPCIC32D_STATUS status;
DWORD DIOC_count; // count of returned bytes of DeviceIoControl
DWORD result;
 
if (nHandle == (HANDLE)-1) return ERROR_INVALID_HANDLE;
 
*nTimeout = *nLAM = 0;
 
// attach a window into the CC32 space ----------------
result = DeviceIoControl(nHandle, VPCIC32_GET_STATUS,
&dwInterface, sizeof(dwInterface),
&status, sizeof(status), &DIOC_count, NULL);
 
if (!result)
return GetLastError();
else
{
*nTimeout = (char)status.bTimeout;
*nLAM = (char)status.bInterrupt;
 
return 0;
}
}
 
//--------------------------------------------------------------------------------------
// clear the PCIADA status
//
static int clearStatus(HANDLE nHandle, DWORD dwInterface)
{
DWORD DIOC_count; // count of returned bytes of DeviceIoControl
DWORD result;
 
if (nHandle == (HANDLE)-1) return ERROR_INVALID_HANDLE;
 
// attach a window into the CC32 space ----------------
result = DeviceIoControl(nHandle, VPCIC32_CLEAR_STATUS,
&dwInterface, sizeof(dwInterface),
NULL, 0, &DIOC_count, NULL);
 
if (!result)
return GetLastError();
else
return 0;
}
 
//-------------------------------------------------------------------------
// set the future access parameters - override the current
//
static int setAccessParameter(HANDLE hHandle, DWORD dwInterface, USHORT wBlockTransfer)
{
DWORD result;
DWORD DIOC_count; // count of returned bytes of DeviceIoControl
VPCIC32D_ACCESS_COMMAND access_parameter;
 
if (hHandle == (HANDLE)-1) return ERROR_INVALID_HANDLE;
 
access_parameter.dwInterface = dwInterface;
access_parameter.wBlockTransfer = wBlockTransfer;
 
result = DeviceIoControl(hHandle, VPCIC32_SET_ACCESS_PARA,
&access_parameter, (DWORD)sizeof(access_parameter), NULL,
0, &DIOC_count, NULL);
if (!result)
return GetLastError();
else
return 0;
}
 
//--------------------------------------------------------------------------------------
// open the device
//
int cc32_open_95(char *cszPath, int nModuleNumber, void **handle)
{
CC32_DEVICE *dev;
int error;
*handle = (void *)-1;
dev = (CC32_DEVICE *)malloc(sizeof(CC32_DEVICE));
if (!dev) return errno;
dev->base = (char *)0;
dev->nModuleNumber = nModuleNumber;
dev->wLastAttributes = 0;
 
dev->nHandle = CreateFile(cszPath,
0,
0,
NULL,
0,
FILE_FLAG_DELETE_ON_CLOSE,
NULL);
if (dev->nHandle != INVALID_HANDLE_VALUE)
error = attachWindow(dev->nHandle, nModuleNumber, &dev->base);
else
error = GetLastError();
 
if (error)
{
free(dev);
return error;
}
 
*handle = (void *)dev;
return NO_ERROR;
}
 
//--------------------------------------------------------------------------------------
// close the device
//
int cc32_close_95(void *handle)
{
CC32_DEVICE *dev = (CC32_DEVICE *)handle;
int error = NO_ERROR;
if (dev)
{
if (dev->nHandle != INVALID_HANDLE_VALUE)
{
detachWindow(dev->nHandle, dev->nModuleNumber);
CloseHandle(dev->nHandle);
}
free(dev);
}
else
error = ERROR_INVALID_FUNCTION;
return error;
}
 
//--------------------------------------------------------------------------------------
// read a word
//
unsigned short cc32_read_word_95(void *handle, unsigned int N, unsigned int A, unsigned int F)
{
CC32_DEVICE *dev = (CC32_DEVICE *)handle;
return *pwCC32_ADR(dev->base, N, A, F);
}
 
//--------------------------------------------------------------------------------------
// read a long
//
unsigned long cc32_read_long_all_95(void *handle, unsigned int N, unsigned int A, unsigned int F)
{
CC32_DEVICE *dev = (CC32_DEVICE *)handle;
return *plCC32_ADR(dev->base, N, A, F);
}
 
//--------------------------------------------------------------------------------------
// read a long and get Q and X
//
unsigned long cc32_read_long_95(void *handle, unsigned int N, unsigned int A, unsigned int F, char *Q, char *X)
{
CC32_DEVICE *dev = (CC32_DEVICE *)handle;
unsigned long erg = *plCC32_ADR(dev->base, N, A, F);
*Q = (erg & 0x80000000) ? 1 : 0;
*X = (erg & 0x40000000) ? 1 : 0;
return erg & 0x00FFFFFF;
}
 
//--------------------------------------------------------------------------------------
// write a word
//
void cc32_write_word_95(void *handle, unsigned int N, unsigned int A, unsigned int F, unsigned short uwData)
{
CC32_DEVICE *dev = (CC32_DEVICE *)handle;
dev->wLastAttributes = 0;
*pwCC32_ADR(dev->base, N, A, F) = uwData;
}
 
//--------------------------------------------------------------------------------------
// write a long
//
void cc32_write_long_95(void *handle, unsigned int N, unsigned int A, unsigned int F, unsigned long ulData)
{
CC32_DEVICE *dev = (CC32_DEVICE *)handle;
dev->wLastAttributes = 0;
*plCC32_ADR(dev->base, N, A, F) = ulData;
}
 
//--------------------------------------------------------------------------------------
// clear the PCIADA status
//
int cc32_poll_error_95(void *handle, char *nTimeout, char *nLam)
{
CC32_DEVICE *dev = (CC32_DEVICE *)handle;
int error;
if ((error = getStatus(dev->nHandle, dev->nModuleNumber, nTimeout, nLam)))
return error;
if (*nTimeout) /* clear error */
{
if ((error = clearStatus(dev->nHandle, dev->nModuleNumber)))
return error;
}
return NO_ERROR;
}
 
//--------------------------------------------------------------------------------------
// read 'len' words or 'UNTIL_NOT_Q' from a address made out of N,A,F
//
int cc32_read_word_buffer_95(void * handle, unsigned int N, unsigned int A, unsigned int F,
unsigned short *pwBuffer, unsigned long *pdwLen)
{
CC32_DEVICE *dev = (CC32_DEVICE *)handle;
register unsigned long i = 0;
unsigned long dwLen = *pdwLen;
unsigned long *pdwAddress = plCC32_ADR(dev->base, N, A, F);
register unsigned long dwTempBuffer;
 
if (dev->wLastAttributes & UNTIL_NOT_Q)
{
do
{
dwTempBuffer = *pdwAddress;
*pwBuffer++ = (unsigned short)dwTempBuffer;
} while ((dwTempBuffer & 0x80000000) && (i++ < dwLen));
}
else
{
while (i++ < dwLen)
*pwBuffer++ = (unsigned short)*pdwAddress;
}
*pdwLen = --i;
return 0;
}
 
//--------------------------------------------------------------------------------------
// read 'len' longs or 'UNTIL_NOT_Q' from a address made out of N,A,F, mask 24 bits out
//
int cc32_read_long_buffer_95(void * handle, unsigned int N, unsigned int A, unsigned int F,
unsigned long *pdwBuffer, unsigned long *pdwLen)
{
CC32_DEVICE *dev = (CC32_DEVICE *)handle;
register unsigned long i = 0;
unsigned long dwLen = *pdwLen;
unsigned long *pdwAddress = plCC32_ADR(dev->base, N, A, F);
register unsigned long dwTempBuffer;
 
if (dev->wLastAttributes & UNTIL_NOT_Q)
{
do
{
dwTempBuffer = *pdwAddress;
*pdwBuffer++ = dwTempBuffer & 0x00FFFFFF;
} while ((dwTempBuffer & 0x80000000) && (i++ < dwLen));
}
else
{
while (i++ < dwLen)
*pdwBuffer++ = *pdwAddress & 0x00FFFFFF;
}
*pdwLen = --i;
return 0;
}
 
//--------------------------------------------------------------------------------------
// read 'len' longs or 'UNTIL_NOT_Q' from a address made out of N,A,F, without interpretation
//
int cc32_read_long_all_buffer_95(void * handle, unsigned int N, unsigned int A, unsigned int F,
unsigned long *pdwBuffer, unsigned long *pdwLen)
{
CC32_DEVICE *dev = (CC32_DEVICE *)handle;
register unsigned long i = 0;
unsigned long dwLen = *pdwLen;
unsigned long *pdwAddress = plCC32_ADR(dev->base, N, A, F);
register unsigned long dwTempBuffer;
 
if (dev->wLastAttributes & UNTIL_NOT_Q)
{
do
{
dwTempBuffer = *pdwAddress;
*pdwBuffer++ = dwTempBuffer;
} while ((dwTempBuffer & 0x80000000) && (i++ < dwLen));
}
else
{
while (i++ < dwLen)
*pdwBuffer++ = *pdwAddress;
}
*pdwLen = --i;
return 0;
}
 
//--------------------------------------------------------------------------------------
// switch UNTIL_NOT_Q or AUTOREAD on or off
//
int cc32_access_switch_95(void *handle, unsigned short uwSwitch)
{
CC32_DEVICE *dev = (CC32_DEVICE *)handle;
 
dev->wLastAttributes = uwSwitch;
return setAccessParameter(dev->nHandle, dev->nModuleNumber, dev->wLastAttributes);
}
 
//--------------------------------------------------------------------------------------
// switch interrupts on
//
int cc32_enable_interrupt_95(void *handle)
{
return ERROR_INVALID_FUNCTION;
}
 
//--------------------------------------------------------------------------------------
// switch interrupts off
//
int cc32_disable_interrupt_95(void *handle)
{
return ERROR_INVALID_FUNCTION;
}
 
//--------------------------------------------------------------------------------------
// wait blocking for the next interrupt
//
int cc32_get_interrupt_95(void *handle, unsigned long *dwStatus)
{
return ERROR_INVALID_FUNCTION;
}
/drivers/wiener_pcicc32_dll/OS_INFO.H
0,0 → 1,24
#ifndef __OS_INFO_H__
#define __OS_INFO_H__
//-------------------------------------------------------------------------------------------
// os_info.h - request the OS type and version - the prototypes
//
// this source code is published under GPL (Open Source). You can use, redistrubute and
// modify it unless this header is not modified or deleted. No warranty is given that
// this software will work like expected.
// This product is not authorized for use as critical component in life support systems
// wihout the express written approval of ARW Elektronik Germany.
//
// Please announce changes and hints to ARW Elektronik
//
//
// what who when
// first steps AR 07.11.1999
//
 
BOOLEAN IsWindowsNT(void);
BOOLEAN IsWindows98(void);
BOOLEAN IsWindows95(void);
 
#endif
 
/drivers/wiener_pcicc32_dll/pcicc32_ni.vcxproj.user
0,0 → 1,4
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
/drivers/wiener_pcicc32_dll/Libcc32_95.h
0,0 → 1,71
 
#ifndef __LIBCC32_95_H__
#define __LIBCC32_95_H__
 
/*
libcc32_95.h -- header for a simple access library (WIN95 + WIN98) for the
PCICC32 PCI to CAMAC Interface from ARW Elektronik
 
(c) 2000 ARW Elektronik
 
this source code is published under GPL (Open Source). You can use, redistrubute and
modify it unless this header is not modified or deleted. No warranty is given that
this software will work like expected.
This product is not authorized for use as critical component in life support systems
wihout the express written approval of ARW Elektronik Germany.
Please announce changes and hints to ARW Elektronik
first steps AR 30.07.2000
added buffer, UNTIL_NOT_Q and AUTOREAD functionality AR 17.03.2001
added framework for interrupt handling AR 08.06.2002
*/
 
/* open a path to a device. E.g. "/dev/pcicc32_1" */
int cc32_open_95(char *cszPath, int nModuleNumber, void **handle);
 
/* close the opened path */
int cc32_close_95(void *handle);
 
/* read only a word - 16 bits - from a address made out of N,A,F */
unsigned short cc32_read_word_95(void *handle, unsigned int N, unsigned int A, unsigned int F);
 
/* read a long - 32 bits - from a address made out of N,A,F and get the result Q and X */
unsigned long cc32_read_long_95(void *handle, unsigned int N, unsigned int A, unsigned int F, char *Q, char *X);
 
/* read a long - 32 bits - without any interpretaion */
unsigned long cc32_read_long_all_95(void *handle, unsigned int N, unsigned int A, unsigned int F);
 
/* write a word - 16 bits - to a destination made out of N,A,F */
void cc32_write_word_95(void *handle, unsigned int N, unsigned int A, unsigned int F, unsigned short uwData);
 
/* write a long - 32 bits - uninterpreted to a destination made out of N,A,F */
void cc32_write_long_95(void *handle, unsigned int N, unsigned int A, unsigned int F, unsigned long ulData);
 
/* poll the state of the timeout line and the LAM state. The timeout line is cleared if it was set */
int cc32_poll_error_95(void *handle, char *nTimeout, char *nLam);
 
/* read words until not Q or *pdwLen data into a buffer */
int cc32_read_word_buffer_95(void * handle, unsigned int N, unsigned int A, unsigned int F,
unsigned short *pwBuffer, unsigned long *pdwLen);
 
/* read longs until not Q or *pdwLen data into a buffer */
int cc32_read_long_buffer_95(void * handle, unsigned int N, unsigned int A, unsigned int F,
unsigned long *pdwBuffer, unsigned long *pdwLen);
 
/* read longs until not Q or *pdwLen data and don't interpret Q and X information into a buffer */
int cc32_read_long_all_buffer_95(void * handle, unsigned int N, unsigned int A, unsigned int F,
unsigned long *pdwBuffer, unsigned long *pdwLen);
/* switch UNTIL_NOT_Q or AUTOREAD on or off */
int cc32_access_switch_95(void *handle, unsigned short uwSwitch);
 
/* switch interrupts on */
int cc32_enable_interrupt_95(void *handle);
 
/* switch interrupts off */
int cc32_disable_interrupt_95(void *handle);
 
/* wait blocking for the next interrupt */
int cc32_get_interrupt_95(void *handle, unsigned long *dwStatus);
 
#endif // __LIBCC32_95_H__
/drivers/wiener_pcicc32_dll/pcicc32_ni.dll
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/pcicc32_ni.v11.suo
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/pcicc32_ni.plg
0,0 → 1,55
<html>
<body>
<pre>
<h1>Erstellungsprotokoll</h1>
<h3>
--------------------Konfiguration: pcicc32_ni - Win32 Release--------------------
</h3>
<h3>Befehlszeilen</h3>
Erstellen der temporären Datei "C:\DOKUME~1\klaus\LOKALE~1\Temp\RSPCD.tmp" mit Inhalten
[
/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR"Release/" /Fp"Release/pcicc32_ni.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c
"D:\Work\MyProjects\pcicc32_ni\Libcc32.c"
"D:\Work\MyProjects\pcicc32_ni\Libcc32_95.c"
"D:\Work\MyProjects\pcicc32_ni\Libcc32_NT.c"
"D:\Work\MyProjects\pcicc32_ni\OS_INFO.C"
]
Creating command line "cl.exe @C:\DOKUME~1\klaus\LOKALE~1\Temp\RSPCD.tmp"
Erstellen der temporären Datei "C:\DOKUME~1\klaus\LOKALE~1\Temp\RSPCE.tmp" mit Inhalten
[
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"Release/pcicc32_ni.pdb" /machine:I386 /out:"Release/pcicc32_ni.dll" /implib:"Release/pcicc32_ni.lib"
.\Release\Libcc32.obj
.\Release\Libcc32_95.obj
.\Release\Libcc32_NT.obj
.\Release\OS_INFO.OBJ
]
Erstellen der Befehlzeile "link.exe @C:\DOKUME~1\klaus\LOKALE~1\Temp\RSPCE.tmp"
<h3>Ausgabefenster</h3>
Kompilierung läuft...
Libcc32.c
Libcc32_95.c
Libcc32_NT.c
OS_INFO.C
Linker-Vorgang läuft...
Bibliothek Release/pcicc32_ni.lib und Objekt Release/pcicc32_ni.exp wird erstellt
Erstellen der Befehlzeile "bscmake.exe /nologo /o"Release/pcicc32_ni.bsc" .\Release\Libcc32.sbr .\Release\Libcc32_95.sbr .\Release\Libcc32_NT.sbr .\Release\OS_INFO.SBR"
Browse-Informationsdatei wird erstellt...
<h3>Ausgabefenster</h3>
Erstellen der temporären Datei "C:\DOKUME~1\klaus\LOKALE~1\Temp\RSPD2.bat" mit Inhalten
[
@echo off
copy debug\pcicc32_ni.dll ..\CatchInterrupts_CC32_NT_with_Dll\release
copy debug\pcicc32_ni.dll ..\pciCC32Test_with_Dll\release
]
Erstellen der Befehlzeile "C:\DOKUME~1\klaus\LOKALE~1\Temp\RSPD2.bat"
 
1 Datei(en) kopiert.
1 Datei(en) kopiert.
 
 
 
<h3>Ergebnisse</h3>
pcicc32_ni.dll - 0 Fehler, 0 Warnung(en)
</pre>
</body>
</html>
/drivers/wiener_pcicc32_dll/Libcc32.c
0,0 → 1,228
/*
cc32lib.c -- a simple access library for the PCICC32 PCI to CAMAC Interface from ARW Elektronik
 
(c) 2000 ARW Elektronik
 
this source code is published under GPL (Open Source). You can use, redistrubute and
modify it unless this header is not modified or deleted. No warranty is given that
this software will work like expected.
This product is not authorized for use as critical component in life support systems
wihout the express written approval of ARW Elektronik Germany.
Please announce changes and hints to ARW Elektronik
 
first steps derived from the LINUX pcicc32 library AR 16.03.2000
new architecture - added WINNT to DLL AR 30.07.2000
added buffer, UNTIL_NOT_Q and AUTOREAD functionality AR 17.03.2001
added interrupt handling AR 08.06.2002
*/
/*--- INCLUDES -----------------------------------------------------------------------------------*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
 
#include "os_info.h" /* to determine the underlaying OS */
#include "libcc32_95.h" /* the win95 + 98 parts */
#include "libcc32_NT.h" /* the winnt part */
#include "libcc32.h" /* shared header bewteen applictaion and library */
 
/*--- DEFINES ------------------------------------------------------------------------------------*/
 
/*--- EXTERNALS ----------------------------------------------------------------------------------*/
 
/*--- TYPEDEFS -----------------------------------------------------------------------------------*/
typedef struct
{
int (*cc32_open)(char *cszPath, int nModuleNumber, void **handle);
int (*cc32_close)(void *handle);
unsigned short (*cc32_read_word)(void *handle, unsigned int N, unsigned int A, unsigned int F);
unsigned long (*cc32_read_long)(void *handle, unsigned int N, unsigned int A, unsigned int F, char *Q, char *X);
unsigned long (*cc32_read_long_all)(void *handle, unsigned int N, unsigned int A, unsigned int F);
void (*cc32_write_word)(void *handle, unsigned int N, unsigned int A, unsigned int F, unsigned short uwData);
void (*cc32_write_long)(void *handle, unsigned int N, unsigned int A, unsigned int F, unsigned long ulData);
int (*cc32_poll_error)(void *handle, char *nTimeout, char *nLam);
int (*cc32_read_word_buffer)(void * handle, unsigned int N, unsigned int A, unsigned int F, unsigned short *pwBuffer, unsigned long *pdwLen);
int (*cc32_read_long_buffer)(void * handle, unsigned int N, unsigned int A, unsigned int F, unsigned long *pdwBuffer, unsigned long *pdwLen);
int (*cc32_read_long_all_buffer)(void * handle, unsigned int N, unsigned int A, unsigned int F, unsigned long *pdwBuffer, unsigned long *pdwLen);
int (*cc32_access_switch)(void *handle, unsigned short uwSwitch);
int (*cc32_enable_interrupt)(void *handle);
int (*cc32_disable_interrupt)(void *handle);
int (*cc32_get_interrupt)(void *handle, unsigned long *dwStatus);
} MY_ACTIONS;
 
/*--- GLOBALS ------------------------------------------------------------------------------------*/
MY_ACTIONS ma;
static BOOLEAN firstime = TRUE;
 
/*--- FUNCTIONS -----------------------------------------------------------------------*/
 
//--------------------------------------------------------------------------------------
// open the device
//
int __declspec(dllexport) cc32_open(char *cszPath, int nModuleNumber, CC32_HANDLE *handle)
{
if (firstime)
{
if (IsWindowsNT())
{
ma.cc32_open = cc32_open_NT;
ma.cc32_close = cc32_close_NT;
ma.cc32_read_word = cc32_read_word_NT;
ma.cc32_read_long = cc32_read_long_NT;
ma.cc32_read_long_all = cc32_read_long_all_NT;
ma.cc32_write_word = cc32_write_word_NT;
ma.cc32_write_long = cc32_write_long_NT;
ma.cc32_poll_error = cc32_poll_error_NT;
ma.cc32_read_word_buffer = cc32_read_word_buffer_NT;
ma.cc32_read_long_buffer = cc32_read_long_buffer_NT;
ma.cc32_read_long_all_buffer = cc32_read_long_all_buffer_NT;
ma.cc32_access_switch = cc32_access_switch_NT;
ma.cc32_enable_interrupt = cc32_enable_interrupt_NT;
ma.cc32_disable_interrupt = cc32_disable_interrupt_NT;
ma.cc32_get_interrupt = cc32_get_interrupt_NT;
}
else
if (IsWindows95() || IsWindows98())
{
ma.cc32_open = cc32_open_95;
ma.cc32_close = cc32_close_95;
ma.cc32_read_word = cc32_read_word_95;
ma.cc32_read_long = cc32_read_long_95;
ma.cc32_read_long_all = cc32_read_long_all_95;
ma.cc32_write_word = cc32_write_word_95;
ma.cc32_write_long = cc32_write_long_95;
ma.cc32_poll_error = cc32_poll_error_95;
ma.cc32_read_word_buffer = cc32_read_word_buffer_95;
ma.cc32_read_long_buffer = cc32_read_long_buffer_95;
ma.cc32_read_long_all_buffer = cc32_read_long_all_buffer_95;
ma.cc32_access_switch = cc32_access_switch_95;
ma.cc32_enable_interrupt = cc32_enable_interrupt_95;
ma.cc32_disable_interrupt = cc32_disable_interrupt_95;
ma.cc32_get_interrupt = cc32_get_interrupt_95;
}
else
return -1;
 
firstime = FALSE;
}
 
return ma.cc32_open(cszPath, nModuleNumber, (CC32_HANDLE *)handle);
}
 
//--------------------------------------------------------------------------------------
// close the device
//
int __declspec(dllexport) cc32_close(CC32_HANDLE handle)
{
return ma.cc32_close((CC32_HANDLE)handle);
}
 
//--------------------------------------------------------------------------------------
// read a word
//
unsigned short __declspec(dllexport) cc32_read_word(CC32_HANDLE handle, unsigned int N, unsigned int A, unsigned int F)
{
return ma.cc32_read_word((CC32_HANDLE) handle, N, A, F);
}
 
//--------------------------------------------------------------------------------------
// read a long
//
unsigned long __declspec(dllexport) cc32_read_long_all(CC32_HANDLE handle, unsigned int N, unsigned int A, unsigned int F)
{
return ma.cc32_read_long_all((CC32_HANDLE) handle, N, A, F);
}
 
//--------------------------------------------------------------------------------------
// read a long and get Q and X
//
unsigned long __declspec(dllexport) cc32_read_long(CC32_HANDLE handle, unsigned int N, unsigned int A, unsigned int F, char *Q, char *X)
{
return ma.cc32_read_long((CC32_HANDLE) handle, N, A, F, Q, X);
}
 
//--------------------------------------------------------------------------------------
// write a word
//
void __declspec(dllexport) cc32_write_word(CC32_HANDLE handle, unsigned int N, unsigned int A, unsigned int F, unsigned short uwData)
{
ma.cc32_write_word((CC32_HANDLE) handle, N, A, F, uwData);
}
 
//--------------------------------------------------------------------------------------
// write a long
//
void __declspec(dllexport) cc32_write_long(CC32_HANDLE handle, unsigned int N, unsigned int A, unsigned int F, unsigned long ulData)
{
ma.cc32_write_long((CC32_HANDLE) handle, N, A, F, ulData);
}
 
//--------------------------------------------------------------------------------------
// read and clear the PCIADA status
//
int __declspec(dllexport) cc32_poll_error(CC32_HANDLE handle, char *nTimeout, char *nLam)
{
return ma.cc32_poll_error((CC32_HANDLE) handle, nTimeout, nLam);
}
 
//--------------------------------------------------------------------------------------
// read 'len' words or 'UNTIL_NOT_Q' from a address made out of N,A,F into a buffer
//
int __declspec(dllexport) cc32_read_word_buffer(CC32_HANDLE handle, unsigned int N, unsigned int A, unsigned int F,
unsigned short *pwBuffer, unsigned long *pdwLen)
{
return ma.cc32_read_word_buffer(handle, N, A, F, pwBuffer, pdwLen);
}
 
//--------------------------------------------------------------------------------------
// read 'len' longs or 'UNTIL_NOT_Q' from a address made out of N,A,F into a buffer, mask 24 bits out
//
int __declspec(dllexport) cc32_read_long_buffer(CC32_HANDLE handle, unsigned int N, unsigned int A, unsigned int F,
unsigned long *pdwBuffer, unsigned long *pdwLen)
{
return ma.cc32_read_long_buffer(handle, N, A, F, pdwBuffer, pdwLen);
}
 
//--------------------------------------------------------------------------------------
// read 'len' longs or 'UNTIL_NOT_Q' from a address made out of N,A,F into a buffer, without interpretation
//
int __declspec(dllexport) cc32_read_long_all_buffer(CC32_HANDLE handle, unsigned int N, unsigned int A, unsigned int F,
unsigned long *pdwBuffer, unsigned long *pdwLen)
{
return ma.cc32_read_long_all_buffer(handle, N, A, F, pdwBuffer, pdwLen);
}
 
//--------------------------------------------------------------------------------------
// set the accessmode for the path, e.g. UNTIL_NOT_Q or AUTOREAD or ...
//
int __declspec(dllexport) cc32_access_switch(CC32_HANDLE handle, unsigned short uwSwitch)
{
return ma.cc32_access_switch(handle, uwSwitch);
}
 
//--------------------------------------------------------------------------------------
// switch interrupts on
//
int __declspec(dllexport) cc32_enable_interrupt(CC32_HANDLE handle)
{
return ma.cc32_enable_interrupt(handle);
}
 
//--------------------------------------------------------------------------------------
// switch interrupts off
//
int __declspec(dllexport) cc32_disable_interrupt(CC32_HANDLE handle)
{
return ma.cc32_disable_interrupt(handle);
}
 
//--------------------------------------------------------------------------------------
// wait blocking for the next interrupt
//
int __declspec(dllexport) cc32_get_interrupt(CC32_HANDLE handle, unsigned long *dwStatus)
{
return ma.cc32_get_interrupt(handle, dwStatus);
}
/drivers/wiener_pcicc32_dll/vpcic32d.h
0,0 → 1,111
#ifndef __VPCIC32D_H__
#define __VPCIC32D_H__
//-------------------------------------------------------------------------
// WIN95 driver for PCICC32 CAMAC interface from ARW Elektronik, Germany --
//
// vpcic32d.h - the general header file to share information between driver
// and application
//
// (c) 2000,2001 ARW Elektronik
//
// this source code is published under GPL (Open Source). You can use, redistrubute and
// modify it unless this header is not modified or deleted. No warranty is given that
// this software will work like expected.
// This product is not authorized for use as critical component in life support systems
// without the express written approval of ARW Elektronik Germany.
//
// Please announce changes and hints to ARW Elektronik
//
// what who when
// first steps AR 07.03.2000
// added AUTOREAD AR 17.03.2001
// added VPCIC32_ACCESS_LCR AR 30.03.2001
//
 
// the action codes for ioctl calls
#define VPCIC32_ATTACH_CC32 0x00220000 // METHOD_BUFFERED + FILE_ANY_ACCESS +
#define VPCIC32_DETACH_CC32 0x00220004 // FILE_DEVICE_UNKNOWN
#define VPCIC32_GET_STATUS 0x00220008
#define VPCIC32_CLEAR_STATUS 0x0022000C
#define VPCIC32_SET_ACCESS_PARA 0x00220010
#define VPCIC32_CONTROL_INTERRUPTS 0x00220014
#define VPCIC32_INSTALL_IRQ_HANDLER 0x00220018
#define VPCIC32_ACCESS_LCR 0x00220020 // access tp PLX LCR space
 
// switches for VPCIC32_ACCESS_COMMAND.wAccessType
#define WORD_ACCESS (UCHAR)2 // word
#define LONG_ACCESS (UCHAR)4 // long
 
// VPCIC32_ACCESS_LCR access constants
#define LCR_READ 0 // read only access
#define LCR_WRITE 1 // write and read back access
#define LCR_OR 2 // read, bitwise 'or' content and read back access
#define LCR_AND 3 // read, bitwise 'and' content and read back access
#define LCR_WRITE_ONLY 4 // do not read back after write
 
// define bits for VPCIC32D_ACCESS_COMMAND.wBlockTransfer
#define UNTIL_NOT_Q 0x0001 // read/write unttil 'not Q' switch
#define AUTOREAD 0x0002 // PCIADA data pipelining access tuner switch
 
// mask bits for interrupt status provided by the user interrupt handler
#define LAM_IRQ 0x00FFFFFF // LAM was responsible for interrupt
#define CONNECTION_TIMEOUT 0x08000000 // irq raised through a connection timeout
#define LAM_BUS_OR 0x10000000 // a LAM-BUS-OR is pending
#define LAM_NOT_OR 0x20000000 // a LAM-NOT-OR is pending
#define LAM_AND_OR 0x40000000 // a LAM-AND-OR is pending
#define LAM_FF 0x80000000 // the LAM-Flip-Flop was set
 
// this structure is input in all ioctl calls except VPCIC32_SET_ACCESS_PARA
typedef struct
{
DWORD dwInterface; // CC32 module number
} VPCIC32D_DEVICE;
 
// this structure is output from VPCIC32_ATTACH_CC32 call
typedef struct
{
DWORD dwInterface; // CC32 module number
void *pvWindowBase; // the base address into the 32 kbyte Window of CC32
} VPCIC32D_WINDOW;
 
// this structure is output from VPCIC32_GET_STATUS call
typedef struct
{
DWORD dwInterface; // CC32 module number
WORD bTimeout; // denotes PCIADA timeout
WORD bInterrupt; // denotes a pending LAM interrupt
} VPCIC32D_STATUS;
 
// this structure is input to the VPCIC32_SET_ACCESS_PARA call
typedef struct
{
DWORD dwInterface; // CC32 module number
WORD wAccessType; // set the current access type , for compatibilty to NT, not used @ WIN95/98
WORD wBlockTransfer; // set to AUTOREAD or 0
} VPCIC32D_ACCESS_COMMAND;
 
// this structure is used to control the interrupts
typedef struct
{
DWORD dwInterface; // CC32 module number
WORD wEnable; // a 1 allows, a 0 inhibits interrupt requests
} VPCIC32D_IRQ_CONTROL;
 
// this structure is used to (de)install a irqhandler to a interface
typedef struct
{
DWORD dwInterface; // CC32 module number
DWORD dwIrqHandler; // void (*IrqHandler)(DWORD)
} VPCIC32D_IRQ_HANLDER;
 
// structure to access the local configuration space of PLX chip (test / debug only) with VPCIC32_ACCESS_LCR
typedef struct
{
DWORD dwInterface; // CC32 module number
DWORD dwContent; // content to write, and, or
WORD wRegisterAddress; // address offset of LCR register
UCHAR bAccessMode; // LCR_READ, write, or, and
UCHAR bBytesLane; // the data access width
} VPCIC32D_LCR_ACCESS;
 
#endif // __VPCIC32D_H__
/drivers/wiener_pcicc32_dll/Libcc32_NT.c
0,0 → 1,578
/*
cc32lib_NT.c -- a simple access library for the PCICC32 PCI to CAMAC Interface
from ARW Elektronik - the WINNT parts
 
(c) 2000 ARW Elektronik
 
this source code is published under GPL (Open Source). You can use, redistrubute and
modify it unless this header is not modified or deleted. No warranty is given that
this software will work like expected.
This product is not authorized for use as critical component in life support systems
wihout the express written approval of ARW Elektronik Germany.
Please announce changes and hints to ARW Elektronik
 
derived from the previous WIN95 library AR 30.07.2000
added buffer, UNTIL_NOT_Q and AUTOREAD functionality AR 17.03.2001
*/
/*--- INCLUDES -----------------------------------------------------------------------------------*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <winioctl.h>
 
#include "pcicc32.h" /* PCI common ioctl commands and structures between driver and library */
#include "libcc32_NT.h" /* shared header bewteen applictaion and library */
 
/*--- DEFINES ------------------------------------------------------------------------------------*/
#define DEFDEVICENAME "\\\\.\\PCICC32:\\CC32_xx"
 
/*--- EXTERNALS ----------------------------------------------------------------------------------*/
 
/*--- TYPEDEFS -----------------------------------------------------------------------------------*/
typedef struct
{
HANDLE nHandle; /* the handle of this device */
int nModuleNumber; /* the number of the module */
unsigned short wLastAccessWidth; /* the last parametrized data access width */
unsigned short wLastAttributes; /* the last Attributes to this channel */
unsigned long dwLastAccessAddress; /* the last access address to speed up */
} CC32_DEVICE_NT;
 
/*--- FUNCTIONS -----------------------------------------------------------------------*/
 
//--------------------------------------------------------------------------------------
// get the PCIADA status from the PCI side of the interface
//
static int getStatus(HANDLE nHandle, DWORD dwInterface, char *nTimeout, char *nLAM)
{
PCICC32_STATUS status;
DWORD DIOC_count; // count of returned bytes of DeviceIoControl
DWORD result;
 
if (nHandle == (HANDLE)-1) return -1;
 
*nTimeout = *nLAM = 0;
 
// attach a window into the CC32 space ----------------
result = DeviceIoControl(nHandle, PCICC32_GET_STATUS,
&dwInterface, sizeof(dwInterface),
&status, sizeof(status), &DIOC_count, NULL);
 
if (!result)
return GetLastError();
else
{
*nTimeout = (char)status.bTimeout;
*nLAM = (char)status.bInterrupt;
 
return 0;
}
}
 
//--------------------------------------------------------------------------------------
// clear the PCIADA status
//
static int clearStatus(HANDLE nHandle, DWORD dwInterface)
{
DWORD DIOC_count; // count of returned bytes of DeviceIoControl
DWORD result;
 
if (nHandle == (HANDLE)-1) return -1;
 
// attach a window into the CC32 space ----------------
result = DeviceIoControl(nHandle, PCICC32_CLEAR_STATUS,
&dwInterface, sizeof(dwInterface),
NULL, 0, &DIOC_count, NULL);
 
if (!result)
return GetLastError();
else
return 0;
}
 
//-------------------------------------------------------------------------
// set the future access parameters - override the current
//
static int setAccessParameter(HANDLE hHandle, USHORT wAccessType, USHORT wBlockTransfer)
{
DWORD result;
DWORD DIOC_count; // count of returned bytes of DeviceIoControl
PCICC32_ACCESS_COMMAND access_parameter;
 
access_parameter.wAccessType = wAccessType;
access_parameter.wBlockTransfer = wBlockTransfer;
 
result = DeviceIoControl(hHandle, PCICC32_SET_ACCESS_PARA,
&access_parameter, (DWORD)sizeof(access_parameter), NULL,
0, &DIOC_count, NULL);
if (!result)
return GetLastError();
else
return 0;
}
 
//-------------------------------------------------------------------------
// create a DeviceName out of cszDeviceName and nIfcNum
//
static char *DeviceName(int nIfcNum)
{
static char buffer[255];
char *ptr = buffer;
 
strncpy(buffer, DEFDEVICENAME, strlen(DEFDEVICENAME));
 
while (*ptr) ptr++;
do
{
ptr--;
} while (*ptr != '_'); // step back until '-'
 
ptr++;
if (nIfcNum >= 10) // add the interface number
{
*ptr++ = '1';
nIfcNum -= 10;
}
 
*ptr++ = '0' + nIfcNum;
*ptr = 0;
 
// a little help for the users
return buffer;
}
 
//-------------------------------------------------------------------------
// open my path to the interface
//
static HANDLE openPath(char *name)
{
return (HANDLE)CreateFile(
name,
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL
);
}
 
//--------------------------------------------------------------------------------------
// open the device
//
int cc32_open_NT(char *cszPath, int nModuleNumber, void **handle)
{
CC32_DEVICE_NT *dev;
int error = 0;
*handle = (void *)0;
dev = (CC32_DEVICE_NT *)malloc(sizeof(CC32_DEVICE_NT));
if (!dev) return errno;
dev->nModuleNumber = nModuleNumber;
dev->nHandle = INVALID_HANDLE_VALUE;
dev->wLastAccessWidth = 0xffff; /* invalidate for future use */
 
// start the driver ------------------
dev->nHandle = openPath(DeviceName(nModuleNumber));
if (dev->nHandle == INVALID_HANDLE_VALUE)
error = GetLastError();
else
{
SetFilePointer(dev->nHandle, 0, NULL, FILE_BEGIN);
dev->dwLastAccessAddress = 0;
dev->wLastAttributes = 0;
dev->wLastAccessWidth = 0;
}
 
if (error)
{
free(dev);
return error;
}
 
*handle = (void *)dev;
return NO_ERROR;
}
 
//--------------------------------------------------------------------------------------
// close the device
//
int cc32_close_NT(void *handle)
{
CC32_DEVICE_NT *dev = (CC32_DEVICE_NT *)handle;
int error = NO_ERROR;
if (dev)
{
if (dev->nHandle != INVALID_HANDLE_VALUE)
CloseHandle(dev->nHandle);
free(dev);
}
else
error = ERROR_INVALID_FUNCTION;
return error;
}
 
//--------------------------------------------------------------------------------------
// read a word
//
unsigned short cc32_read_word_NT(void *handle, unsigned int N, unsigned int A, unsigned int F)
{
register CC32_DEVICE_NT *dev = (CC32_DEVICE_NT *)handle;
unsigned long adr = NAF(N,A,F);
unsigned short buffer;
unsigned long bytesRead;
 
// cache the data access width
if (dev->wLastAccessWidth != WORD_ACCESS)
{
dev->wLastAccessWidth = WORD_ACCESS;
setAccessParameter(dev->nHandle, dev->wLastAccessWidth, dev->wLastAttributes);
}
 
// cache the address
if (dev->dwLastAccessAddress != adr)
{
SetFilePointer(dev->nHandle, adr, NULL, FILE_BEGIN);
dev->dwLastAccessAddress = adr;
}
 
ReadFile(dev->nHandle, &buffer, WORD_ACCESS, &bytesRead, NULL);
 
return buffer;
}
 
//--------------------------------------------------------------------------------------
// read a long
//
unsigned long cc32_read_long_all_NT(void *handle, unsigned int N, unsigned int A, unsigned int F)
{
register CC32_DEVICE_NT *dev = (CC32_DEVICE_NT *)handle;
unsigned long adr = NAF(N,A,F);
unsigned long buffer;
unsigned long bytesRead;
 
// cache the data access width
if (dev->wLastAccessWidth != LONG_ACCESS)
{
dev->wLastAccessWidth = LONG_ACCESS;
setAccessParameter(dev->nHandle, dev->wLastAccessWidth, dev->wLastAttributes);
}
 
// cache the address
if (dev->dwLastAccessAddress != adr)
{
SetFilePointer(dev->nHandle, adr, NULL, FILE_BEGIN);
dev->dwLastAccessAddress = adr;
}
 
ReadFile(dev->nHandle, &buffer, LONG_ACCESS, &bytesRead, NULL);
 
return buffer;
}
 
//--------------------------------------------------------------------------------------
// read a long and get Q and X
//
unsigned long cc32_read_long_NT(void *handle, unsigned int N, unsigned int A, unsigned int F, char *Q, char *X)
{
unsigned long erg = cc32_read_long_all_NT(handle, N, A, F);
*Q = (erg & 0x80000000) ? 1 : 0;
*X = (erg & 0x40000000) ? 1 : 0;
 
return erg & 0x00FFFFFF;
}
 
//--------------------------------------------------------------------------------------
// write a word
//
void cc32_write_word_NT(void *handle, unsigned int N, unsigned int A, unsigned int F, unsigned short uwData)
{
register CC32_DEVICE_NT *dev = (CC32_DEVICE_NT *)handle;
unsigned long adr = NAF(N,A,F);
DWORD bytesWritten;
// cache the data access width
if (dev->wLastAccessWidth != WORD_ACCESS)
{
dev->wLastAccessWidth = WORD_ACCESS;
setAccessParameter(dev->nHandle, dev->wLastAccessWidth, dev->wLastAttributes);
}
 
// cache the address
if (dev->dwLastAccessAddress != adr)
{
SetFilePointer(dev->nHandle, adr, NULL, FILE_BEGIN);
dev->dwLastAccessAddress = adr;
}
 
WriteFile(dev->nHandle, &uwData, WORD_ACCESS, &bytesWritten, NULL);
}
 
//--------------------------------------------------------------------------------------
// write a long
//
void cc32_write_long_NT(void *handle, unsigned int N, unsigned int A, unsigned int F, unsigned long ulData)
{
register CC32_DEVICE_NT *dev = (CC32_DEVICE_NT *)handle;
unsigned long adr = NAF(N,A,F);
DWORD bytesWritten;
// cache the data access width
if (dev->wLastAccessWidth != LONG_ACCESS)
{
dev->wLastAccessWidth = LONG_ACCESS;
setAccessParameter(dev->nHandle, dev->wLastAccessWidth, dev->wLastAttributes);
}
 
// cache the address
if (dev->dwLastAccessAddress != adr)
{
SetFilePointer(dev->nHandle, adr, NULL, FILE_BEGIN);
dev->dwLastAccessAddress = adr;
}
 
WriteFile(dev->nHandle, &ulData, LONG_ACCESS, &bytesWritten, NULL);
}
 
//--------------------------------------------------------------------------------------
// clear the PCIADA status
//
int cc32_poll_error_NT(void *handle, char *nTimeout, char *nLam)
{
CC32_DEVICE_NT *dev = (CC32_DEVICE_NT *)handle;
int error;
if ((error = getStatus(dev->nHandle, dev->nModuleNumber, nTimeout, nLam)))
return error;
if (*nTimeout) /* clear error */
{
if ((error = clearStatus(dev->nHandle, dev->nModuleNumber)))
return error;
}
return NO_ERROR;
}
 
//--------------------------------------------------------------------------------------
// read 'len' words or 'UNTIL_NOT_Q' from a address made out of N,A,F
//
int cc32_read_word_buffer_NT(void * handle, unsigned int N, unsigned int A, unsigned int F,
unsigned short *pwBuffer, unsigned long *pdwLen)
{
register CC32_DEVICE_NT *dev = (CC32_DEVICE_NT *)handle;
unsigned long adr = NAF(N,A,F);
unsigned long dwLen;
 
// cache the data access width
if (dev->wLastAccessWidth != WORD_ACCESS)
{
dev->wLastAccessWidth = WORD_ACCESS;
setAccessParameter(dev->nHandle, dev->wLastAccessWidth, dev->wLastAttributes);
}
 
// cache the address
if (dev->dwLastAccessAddress != adr)
{
SetFilePointer(dev->nHandle, adr, NULL, FILE_BEGIN);
dev->dwLastAccessAddress = adr;
}
 
*pdwLen <<= 1; // make bytes
dwLen = *pdwLen;
if (!ReadFile(dev->nHandle, pwBuffer, dwLen, pdwLen, NULL))
return GetLastError();
 
*pdwLen >>= 1; // make words
return 0;
}
 
//--------------------------------------------------------------------------------------
// read 'len' longs or 'UNTIL_NOT_Q' from a address made out of N,A,F, mask 24 bits out
//
int cc32_read_long_buffer_NT(void * handle, unsigned int N, unsigned int A, unsigned int F,
unsigned long *pdwBuffer, unsigned long *pdwLen)
{
register CC32_DEVICE_NT *dev = (CC32_DEVICE_NT *)handle;
unsigned long adr = NAF(N,A,F);
unsigned long *pdwPtr = pdwBuffer;
unsigned long *pdwEnd = pdwBuffer;
unsigned long dwLen;
 
// cache the data access width
if (dev->wLastAccessWidth != LONG_ACCESS)
{
dev->wLastAccessWidth = LONG_ACCESS;
setAccessParameter(dev->nHandle, dev->wLastAccessWidth, dev->wLastAttributes);
}
 
// cache the address
if (dev->dwLastAccessAddress != adr)
{
SetFilePointer(dev->nHandle, adr, NULL, FILE_BEGIN);
dev->dwLastAccessAddress = adr;
}
 
*pdwLen <<= 2; // make bytes
dwLen = *pdwLen;
if (!ReadFile(dev->nHandle, pdwBuffer, dwLen, pdwLen, NULL))
return GetLastError();
 
pdwEnd += *pdwLen;
while (pdwEnd < pdwPtr)
*pdwPtr++ &= 0x00FFFFFF; // mask Q and X bits
 
*pdwLen >>= 2; // make longs
return 0;
}
 
//--------------------------------------------------------------------------------------
// read 'len' longs or 'UNTIL_NOT_Q' from a address made out of N,A,F, without interpretation
//
int cc32_read_long_all_buffer_NT(void * handle, unsigned int N, unsigned int A, unsigned int F,
unsigned long *pdwBuffer, unsigned long *pdwLen)
{
register CC32_DEVICE_NT *dev = (CC32_DEVICE_NT *)handle;
unsigned long adr = NAF(N,A,F);
unsigned long dwLen;
 
// cache the data access width
if (dev->wLastAccessWidth != LONG_ACCESS)
{
dev->wLastAccessWidth = LONG_ACCESS;
setAccessParameter(dev->nHandle, dev->wLastAccessWidth, dev->wLastAttributes);
}
 
// cache the address
if (dev->dwLastAccessAddress != adr)
{
SetFilePointer(dev->nHandle, adr, NULL, FILE_BEGIN);
dev->dwLastAccessAddress = adr;
}
 
*pdwLen <<= 2; // make bytes
dwLen = *pdwLen;
if (!ReadFile(dev->nHandle, pdwBuffer, dwLen, pdwLen, NULL))
return GetLastError();
 
*pdwLen >>= 2; // make longs
return 0;
}
 
//--------------------------------------------------------------------------------------
// switch UNTIL_NOT_Q or AUTOREAD on or off
//
int cc32_access_switch_NT(void *handle, unsigned short uwSwitch)
{
register CC32_DEVICE_NT *dev = (CC32_DEVICE_NT *)handle;
 
dev->wLastAttributes = uwSwitch;
return setAccessParameter(dev->nHandle, dev->wLastAccessWidth, dev->wLastAttributes);
}
 
//--------------------------------------------------------------------------------------
// switch interrupts on
//
int cc32_enable_interrupt_NT(void *handle)
{
register CC32_DEVICE_NT *dev = (CC32_DEVICE_NT *)handle;
DWORD result;
DWORD DIOC_count; // count of returned bytes of DeviceIoControl
PCICC32_IRQ_CONTROL irqCntrl;
 
irqCntrl.dwInterface = 0; // don't bother at WINNT
irqCntrl.wEnable = 1; // enable it
 
result = DeviceIoControl(dev->nHandle, PCICC32_CONTROL_INTERRUPTS,
&irqCntrl, sizeof(irqCntrl), NULL, 0, &DIOC_count, NULL);
 
if (!result)
return GetLastError();
else
return NO_ERROR;
}
 
//--------------------------------------------------------------------------------------
// switch interrupts off
//
int cc32_disable_interrupt_NT(void *handle)
{
register CC32_DEVICE_NT *dev = (CC32_DEVICE_NT *)handle;
DWORD result;
DWORD DIOC_count; // count of returned bytes of DeviceIoControl
PCICC32_IRQ_CONTROL irqCntrl;
 
irqCntrl.dwInterface = 0; // don't bother at WINNT
irqCntrl.wEnable = 0; // disable it
 
result = DeviceIoControl(dev->nHandle, PCICC32_CONTROL_INTERRUPTS,
&irqCntrl, sizeof(irqCntrl), NULL, 0, &DIOC_count, NULL);
 
if (!result)
return GetLastError();
else
return NO_ERROR;
}
 
//--------------------------------------------------------------------------------------
// wait blocking for the next interrupt
//
int cc32_get_interrupt_NT(void *handle, unsigned long *dwStatus)
{
register CC32_DEVICE_NT *dev = (CC32_DEVICE_NT *)handle;
DWORD result;
DWORD DIOC_count; // count of returned bytes of DeviceIoControl
PCICC32_IRQ_RESPONSE response;
int nError;
OVERLAPPED sOverlapped;
 
sOverlapped.hEvent = NULL;
result = DeviceIoControl(dev->nHandle, PCICC32_INSTALL_IRQ_BLOCK,
NULL, 0, &response, sizeof(response), &DIOC_count, NULL);
*dwStatus = response.dwInterruptFlags;
 
if (!result)
{
nError = GetLastError();
 
// a real error
if ((nError != ERROR_IO_PENDING) && (nError != ERROR_SUCCESS))
return nError;
 
// my IO is pending - wait for it
if (nError == ERROR_IO_PENDING)
{
result = GetOverlappedResult(dev->nHandle, &sOverlapped, &DIOC_count, TRUE);
*dwStatus = response.dwInterruptFlags;
 
if (!result)
{
nError = GetLastError(); // if it was cancelled
if (nError == ERROR_OPERATION_ABORTED)
return NO_ERROR; // accept it as 'normal'
else
return nError;
}
}
}
 
return NO_ERROR;
}
 
 
/drivers/wiener_pcicc32_dll/pcicc32_ni.vcxproj
0,0 → 1,159
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<SccProjectName />
<SccLocalPath />
<ProjectGuid>{0370965E-2E92-4C77-92E7-F42D4EE3DBCF}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.Cpp.UpgradeFromVC60.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(OutDir)</OutDir>
<IntDir>$(OutDir)obj</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(OutDir)</OutDir>
<IntDir>$(OutDir)obj</IntDir>
<LinkIncremental>true</LinkIncremental>
<TargetName>pcicc32_ni</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<StringPooling>true</StringPooling>
<FunctionLevelLinking>true</FunctionLevelLinking>
<Optimization>MaxSpeed</Optimization>
<SuppressStartupBanner>true</SuppressStartupBanner>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AssemblerListingLocation>.\Release\</AssemblerListingLocation>
<BrowseInformation>true</BrowseInformation>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<ObjectFileName>.\Release\</ObjectFileName>
<ProgramDataBaseFileName>.\Release\</ProgramDataBaseFileName>
</ClCompile>
<PostBuildEvent>
<Command>copy debug\pcicc32_ni.dll $(ProjectDir)</Command>
</PostBuildEvent>
<Midl>
<SuppressStartupBanner>true</SuppressStartupBanner>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TypeLibraryName>.\Release\pcicc32_ni.tlb</TypeLibraryName>
<MkTypLibCompatible>true</MkTypLibCompatible>
<RedirectOutputAndErrors>NUL</RedirectOutputAndErrors>
<TargetEnvironment>Win32</TargetEnvironment>
</Midl>
<ResourceCompile>
<Culture>0x0407</Culture>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Release\pcicc32_ni.bsc</OutputFile>
</Bscmake>
<Link>
<SuppressStartupBanner>true</SuppressStartupBanner>
<LinkDLL>true</LinkDLL>
<SubSystem>Windows</SubSystem>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<ImportLibrary>.\Release\pcicc32_ni.lib</ImportLibrary>
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<FunctionLevelLinking>false</FunctionLevelLinking>
<Optimization>Disabled</Optimization>
<SuppressStartupBanner>true</SuppressStartupBanner>
<WarningLevel>Level3</WarningLevel>
<MinimalRebuild>true</MinimalRebuild>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AssemblerListingLocation>.\Debug\</AssemblerListingLocation>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
<ObjectFileName>.\Debug\</ObjectFileName>
<ProgramDataBaseFileName>.\Debug\</ProgramDataBaseFileName>
</ClCompile>
<PostBuildEvent>
<Command>copy debug\pcicc32_ni.dll $(ProjectDir)</Command>
</PostBuildEvent>
<Midl>
<SuppressStartupBanner>true</SuppressStartupBanner>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<TypeLibraryName>.\Debug\pcicc32_ni.tlb</TypeLibraryName>
<MkTypLibCompatible>true</MkTypLibCompatible>
<RedirectOutputAndErrors>NUL</RedirectOutputAndErrors>
<TargetEnvironment>Win32</TargetEnvironment>
</Midl>
<ResourceCompile>
<Culture>0x0407</Culture>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner>
<OutputFile>.\Debug\pcicc32_ni.bsc</OutputFile>
</Bscmake>
<Link>
<SuppressStartupBanner>true</SuppressStartupBanner>
<LinkDLL>true</LinkDLL>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<ImportLibrary>.\Debug\pcicc32_ni.lib</ImportLibrary>
<AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Libcc32.c" />
<ClCompile Include="Libcc32_95.c" />
<ClCompile Include="Libcc32_NT.c" />
<ClCompile Include="OS_INFO.C" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Libcc32.h" />
<ClInclude Include="Libcc32_95.h" />
<ClInclude Include="libcc32_NT.h" />
<ClInclude Include="OS_INFO.H" />
<ClInclude Include="vpcic32d.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
/drivers/wiener_pcicc32_dll/Libcc32.h
0,0 → 1,94
#ifndef __CC32LIB_H__
#define __CC32LIB_H__
/*
cc32lib.h -- header for a simple access library for the
PCICC32 PCI to CAMAC Interface from ARW Elektronik
 
(c) 2000 ARW Elektronik
 
this source code is published under GPL (Open Source). You can use, redistrubute and
modify it unless this header is not modified or deleted. No warranty is given that
this software will work like expected.
This product is not authorized for use as critical component in life support systems
wihout the express written approval of ARW Elektronik Germany.
Please announce changes and hints to ARW Elektronik
 
To use this library the module "pcicc32.o" have to be installed. There must be also a
node which points with ist major number to the module and its minor number must equal
the CC32 module number (Jumper J301 to J304).
first steps derived from the LINUX pcicc32 library AR 16.03.2000
added buffer, UNTIL_NOT_Q and AUTOREAD functionality AR 17.03.2001
added interrupt handling (NT + 2000 only) AR 08.06.2002
*/
 
/*--- INCLUDES --------------------------------------------------------------------------*/
 
/*--- TYPEDEFS --------------------------------------------------------------------------*/
typedef void* CC32_HANDLE; /* type of the device handle */
 
/*--- DEFINES ---------------------------------------------------------------------------*/
#define SW_UNTIL_NOT_Q 1 /* switches for cc32_access_switch( ..., uSwitch); */
#define SW_AUTOREAD 2
 
/*--- PROTOTYPES ------------------------------------------------------------------------*/
 
#ifdef __cplusplus
extern "C"
{
#endif
 
/* open a path to a device. E.g. "/dev/pcicc32_1" */
int __declspec(dllexport) cc32_open(char *cszPath, int nModuleNumber, CC32_HANDLE *handle);
 
/* close the opened path */
int __declspec(dllexport) cc32_close(CC32_HANDLE handle);
 
/* read only a word - 16 bits - from a address made out of N,A,F */
unsigned short __declspec(dllexport) cc32_read_word(CC32_HANDLE handle, unsigned int N, unsigned int A, unsigned int F);
 
/* read a long - 32 bits - from a address made out of N,A,F and get the result Q and X */
unsigned long __declspec(dllexport) cc32_read_long(CC32_HANDLE handle, unsigned int N, unsigned int A, unsigned int F, char *Q, char *X);
 
/* read a long - 32 bits - without any interpretation */
unsigned long __declspec(dllexport) cc32_read_long_all(CC32_HANDLE handle, unsigned int N, unsigned int A, unsigned int F);
 
/* write a word - 16 bits - to a destination made out of N,A,F */
void __declspec(dllexport) cc32_write_word(CC32_HANDLE handle, unsigned int N, unsigned int A, unsigned int F, unsigned short uwData);
 
/* write a long - 32 bits - uninterpreted to a destination made out of N,A,F */
void __declspec(dllexport) cc32_write_long(CC32_HANDLE handle, unsigned int N, unsigned int A, unsigned int F, unsigned long ulData);
 
/* poll the state of the timeout line and the LAM state. The timeout line is cleared if it was set */
int __declspec(dllexport) cc32_poll_error(CC32_HANDLE handle, char *nTimeout, char *nLam);
 
/* read 'len' words or 'UNTIL_NOT_Q' from a address made out of N,A,F into a buffer*/
int __declspec(dllexport) cc32_read_word_buffer(CC32_HANDLE handle, unsigned int N, unsigned int A, unsigned int F,
unsigned short *pwBuffer, unsigned long *pdwLen);
 
/* read 'len' longs or 'UNTIL_NOT_Q' from a address made out of N,A,F into a buffer*/
int __declspec(dllexport) cc32_read_long_buffer(CC32_HANDLE handle, unsigned int N, unsigned int A, unsigned int F,
unsigned long *pdwBuffer, unsigned long *pdwLen);
/* read 'len' longs or 'UNTIL_NOT_Q' from a address made out of N,A,F into a buffer, no interpretation */
int __declspec(dllexport) cc32_read_long_all_buffer(CC32_HANDLE handle, unsigned int N, unsigned int A, unsigned int F,
unsigned long *pdwBuffer, unsigned long *pdwLen);
 
/* switch UNTIL_NOT_Q or AUTOREAD on or off */
int __declspec(dllexport) cc32_access_switch(CC32_HANDLE handle, unsigned short uwSwitch);
 
/* switch interrupts on */
int __declspec(dllexport) cc32_enable_interrupt(CC32_HANDLE handle);
 
/* switch interrupts off */
int __declspec(dllexport) cc32_disable_interrupt(CC32_HANDLE handle);
 
/* wait blocking for the next interrupt */
int __declspec(dllexport) cc32_get_interrupt(CC32_HANDLE handle, unsigned long *dwStatus);
 
#ifdef __cplusplus
}
#endif
 
#endif /* __CC32LIB_H__ */
/drivers/wiener_pcicc32_dll/pcicc32_ni.sln
0,0 → 1,20

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2012 for Windows Desktop
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcicc32_ni", "pcicc32_ni.vcxproj", "{0370965E-2E92-4C77-92E7-F42D4EE3DBCF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0370965E-2E92-4C77-92E7-F42D4EE3DBCF}.Debug|Win32.ActiveCfg = Debug|Win32
{0370965E-2E92-4C77-92E7-F42D4EE3DBCF}.Debug|Win32.Build.0 = Debug|Win32
{0370965E-2E92-4C77-92E7-F42D4EE3DBCF}.Release|Win32.ActiveCfg = Release|Win32
{0370965E-2E92-4C77-92E7-F42D4EE3DBCF}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
/drivers/wiener_pcicc32_dll/libcc32_NT.h
0,0 → 1,72
#ifndef __LIBCC32_NT_H__
#define __LIBCC32_NT_H__
 
/*
libcc32_NT.h -- header for a simple access library (WINNT) for the
PCICC32 PCI to CAMAC Interface from ARW Elektronik
 
(c) 2000 ARW Elektronik
 
this source code is published under GPL (Open Source). You can use, redistrubute and
modify it unless this header is not modified or deleted. No warranty is given that
this software will work like expected.
This product is not authorized for use as critical component in life support systems
wihout the express written approval of ARW Elektronik Germany.
Please announce changes and hints to ARW Elektronik
first steps AR 30.07.2000
added buffer, UNTIL_NOT_Q and AUTOREAD functionality AR 17.03.2001
added interrupt handling AR 08.06.2002
*/
 
 
/* open a path to a device. E.g. "/dev/pcicc32_1" */
int cc32_open_NT(char *cszPath, int nModuleNumber, void **handle);
 
/* close the opened path */
int cc32_close_NT(void *handle);
 
/* read only a word - 16 bits - from a address made out of N,A,F */
unsigned short cc32_read_word_NT(void *handle, unsigned int N, unsigned int A, unsigned int F);
 
/* read a long - 32 bits - from a address made out of N,A,F and get the result Q and X */
unsigned long cc32_read_long_NT(void *handle, unsigned int N, unsigned int A, unsigned int F, char *Q, char *X);
 
/* read a long - 32 bits - without any interpretaion */
unsigned long cc32_read_long_all_NT(void *handle, unsigned int N, unsigned int A, unsigned int F);
 
/* write a word - 16 bits - to a destination made out of N,A,F */
void cc32_write_word_NT(void *handle, unsigned int N, unsigned int A, unsigned int F, unsigned short uwData);
 
/* write a long - 32 bits - uninterpreted to a destination made out of N,A,F */
void cc32_write_long_NT(void *handle, unsigned int N, unsigned int A, unsigned int F, unsigned long ulData);
 
/* poll the state of the timeout line and the LAM state. The timeout line is cleared if it was set */
int cc32_poll_error_NT(void *handle, char *nTimeout, char *nLam);
 
/* read words until not Q or *pdwLen data into a buffer */
int cc32_read_word_buffer_NT(void * handle, unsigned int N, unsigned int A, unsigned int F,
unsigned short *pwBuffer, unsigned long *pdwLen);
 
/* read longs until not Q or *pdwLen data into a buffer */
int cc32_read_long_buffer_NT(void * handle, unsigned int N, unsigned int A, unsigned int F,
unsigned long *pdwBuffer, unsigned long *pdwLen);
 
/* read longs until not Q or *pdwLen data and don't interpret Q and X information into a buffer */
int cc32_read_long_all_buffer_NT(void * handle, unsigned int N, unsigned int A, unsigned int F,
unsigned long *pdwBuffer, unsigned long *pdwLen);
 
/* switch UNTIL_NOT_Q or AUTOREAD on or off */
int cc32_access_switch_NT(void *handle, unsigned short uwSwitch);
 
/* switch interrupts on */
int cc32_enable_interrupt_NT(void *handle);
 
/* switch interrupts off */
int cc32_disable_interrupt_NT(void *handle);
 
/* wait blocking for the next interrupt */
int cc32_get_interrupt_NT(void *handle, unsigned long *dwStatus);
 
#endif // __LIBCC32_NT_H__
/drivers/wiener_pcicc32_dll/pcicc32.h
0,0 → 1,157
#ifndef __PCICC32_H__
#define __PCICC32_H__
//-------------------------------------------------------------------------
// WINNT driver for PCICC32 interface from ARW Elektronik, Germany --------
// IO definitions and common data structures between application and driver
//
// (c) 2000,2001 ARW Elektronik
//
// this source code is published under GPL (Open Source). You can use, redistrubute and
// modify it unless this header is not modified or deleted. No warranty is given that
// this software will work like expected.
// This product is not authorized for use as critical component in life support systems
// wihout the express written approval of ARW Elektronik Germany.
//
// Please announce changes and hints to ARW Elektronik
//
// what who when
// started AR 16.04.2000
// added irq functionality AR 24.02.2001
// added until 'not Q' read/write mode AR 03.03.2001
// added AUTOREAD AR 17.03.2001
//
 
//-------------------------------------------------------------------------
// INCLUDES
//
// #include <devioctl.h> must be declared before inclusion when used for driver
// #include <winioctl.h> must be declared before inclusion when used for applications
 
//-------------------------------------------------------------------------
// DEFINES
//
 
//----------------------------------------------------------------------------------------
// macros for simple CAMAC NAF address calculation
//
#define NAF(n, a, f) ((ULONG)((n << 10) + (a << 6) + ((f & 0xf) << 2)))
 
// to get a compatible view to WIN95 driver
#define USER_CONTROL_CODE(x) (x)
 
// VPCIC32D_ATTACH_CC32 and VPCIC32D_DETACH_CC32 are incompatible to WINNT - please use read and write commands
// get the interrupt and timeout status from a CC32 interface (0x00220008)
#define PCICC32_GET_STATUS CTL_CODE(\
FILE_DEVICE_UNKNOWN,\
USER_CONTROL_CODE(2),\
METHOD_BUFFERED,\
FILE_ANY_ACCESS)
 
// clear the timeout status of a CC32 interface (0x0022000C)
#define PCICC32_CLEAR_STATUS CTL_CODE(\
FILE_DEVICE_UNKNOWN,\
USER_CONTROL_CODE(3),\
METHOD_BUFFERED,\
FILE_ANY_ACCESS)
 
// set the access parameter for this file (0x00220010)
#define PCICC32_SET_ACCESS_PARA CTL_CODE(\
FILE_DEVICE_UNKNOWN,\
USER_CONTROL_CODE(4),\
METHOD_BUFFERED,\
FILE_ANY_ACCESS)
 
// allow or inhibit CC32 interrupt requests (0x00220014)
#define PCICC32_CONTROL_INTERRUPTS CTL_CODE(\
FILE_DEVICE_UNKNOWN,\
USER_CONTROL_CODE(5),\
METHOD_BUFFERED,\
FILE_ANY_ACCESS)
 
// requests thru blocking io the status of a pending or a rising interrupt (0x0022001C)
#define PCICC32_INSTALL_IRQ_BLOCK CTL_CODE(\
FILE_DEVICE_UNKNOWN,\
USER_CONTROL_CODE(7),\
METHOD_BUFFERED,\
FILE_ANY_ACCESS)
 
// requests to access the PLX LCR for test and debug (0x00220020)
#define PCICC32_ACCESS_LCR CTL_CODE(\
FILE_DEVICE_UNKNOWN,\
USER_CONTROL_CODE(8),\
METHOD_BUFFERED,\
FILE_ANY_ACCESS)
 
// set to check for control-code overflow
#define PCICC32_LAST_CTL_CODE PCICC32_ACCESS_LCR
 
// mask bits for interrupt status
#define LAM_IRQ 0x00FFFFFF // there was a LAM responible for the timeout
#define CONNECTION_TIMEOUT 0x08000000 // irq raised through a connection timout
#define LAM_BUS_OR 0x10000000 // a LAM-BUS-OR is pending
#define LAM_NOT_OR 0x20000000 // a LAM-NOT-OR is pending
#define LAM_AND_OR 0x40000000 // a LAM-AND-OR is pending
#define LAM_FF 0x80000000 // the LAM-Flip-Flop was set
 
// switches for PCICC32_ACCESS_COMMAND.wAccessType
#define WORD_ACCESS (UCHAR)2 // word
#define LONG_ACCESS (UCHAR)4 // long
 
// define bits for PCICC32_ACCESS_COMMAND.wBlockTransfer
#define UNTIL_NOT_Q 0x0001 // read/write unttil 'not Q' switch
#define AUTOREAD 0x0002 // PCIADA data pipelining access tuner switch
 
// data lane size constants for PCICC32_ACCESS_LCR
#define BYTE_ACCESS (UCHAR)1 // write byte wise (illegal)
#define WORD_ACCESS (UCHAR)2 // word
#define LONG_ACCESS (UCHAR)4 // long
 
// PCICC32_ACCESS_LCR access constants
#define LCR_READ 0 // read only access
#define LCR_WRITE 1 // write and read back access
#define LCR_OR 2 // read, bitwise 'or' content and read back access
#define LCR_AND 3 // read, bitwise 'and' content and read back access
#define LCR_WRITE_ONLY 4 // do not read back after write
 
// this structure is output from VPCIC32_GET_STATUS call
typedef struct
{
ULONG dwInterface; // CC32 module number (for compatibility to win95/98 only - not used)
USHORT bTimeout; // denotes a pending PCIADA timeout
USHORT bInterrupt; // denotes a pending LAM interrupt
} PCICC32_STATUS;
 
// this structure sets the access parameter for following reads or writes to this path
typedef struct
{
ULONG dwInterface; // CC32 module number (for compatibility to win95/98 only - not used)
USHORT wAccessType; // set the current access type (WORD_ACCESS, LONG_ACCESS)
USHORT wBlockTransfer; // set AUTOREAD or UNTIL_NOT_Q
} PCICC32_ACCESS_COMMAND;
 
// this structure is used to control the interrupts
typedef struct
{
ULONG dwInterface; // CC32 module number (for compatibility to win95/98 only - not used)
USHORT wEnable; // a 1 allows, a 0 inhibits interrupt requests
} PCICC32_IRQ_CONTROL;
 
// this structure returns from a blocking interrupt status call
typedef struct
{
ULONG dwInterface; // CC32 module number (for compatibility to win95/98 only - not used)
ULONG dwInterruptFlags; // the return status at the return of the blocking call
} PCICC32_IRQ_RESPONSE;
 
// structure to access the local configuration space of PLX chip (test / debug only) with PCICC32_ACCESS_LCR
typedef struct
{
ULONG dwInterface; // here dummy 'cause of compatibility to WIN95
ULONG dwContent; // content to write, and, or
USHORT wRegisterAddress; // address offset of LCR register
UCHAR bAccessMode; // LCR_READ, write, or, and
UCHAR bBytesLane; // the data access width
} PCICC32_LCR_ACCESS;
 
#endif // __PCICC32_H__
/drivers/wiener_pcicc32_dll/pcicc32_ni.opt
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/pcicc32_ni.ncb
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/drivers/wiener_pcicc32_dll/OS_INFO.C
0,0 → 1,99
//-------------------------------------------------------------------------------------------
// os_info.c - request the OS type and version
//
// this source code is published under GPL (Open Source). You can use, redistrubute and
// modify it unless this header is not modified or deleted. No warranty is given that
// this software will work like expected.
// This product is not authorized for use as critical component in life support systems
// wihout the express written approval of ARW Elektronik Germany.
//
// Please announce changes and hints to ARW Elektronik
//
//
// what who when
// first steps AR 07.11.1999
//
 
//-------------------------------------------------------------------------------------------
// INCLUDES
//
#include <windows.h>
 
//-------------------------------------------------------------------------------------------
// DEFINES
//
 
//-------------------------------------------------------------------------------------------
// TYPEDEFS
//
 
//-------------------------------------------------------------------------------------------
// LOCALS
//
 
//-------------------------------------------------------------------------------------------
// EXTERNALS
//
 
//-------------------------------------------------------------------------------------------
// GLOBALS
//
 
//-------------------------------------------------------------------------------------------
// FUNCTIONS
//
BOOLEAN IsWindowsNT(void)
{
OSVERSIONINFO osvi;
 
osvi.dwOSVersionInfoSize = sizeof(osvi);
if (!GetVersionEx(&osvi)) return FALSE; // can't get info
 
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
return TRUE;
}
else
return FALSE;
}
 
BOOLEAN IsWindows95(void)
{
OSVERSIONINFO osvi;
 
osvi.dwOSVersionInfoSize = sizeof(osvi);
if (!GetVersionEx(&osvi)) return FALSE; // can't get info
 
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
{
if ((osvi.dwMajorVersion == 4) && (osvi.dwMinorVersion == 0))
return TRUE;
}
 
return FALSE;
}
 
BOOLEAN IsWindows98(void)
{
OSVERSIONINFO osvi;
 
osvi.dwOSVersionInfoSize = sizeof(osvi);
if (!GetVersionEx(&osvi)) return FALSE; // can't get info
 
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
{
if ((osvi.dwMajorVersion > 4) ||
((osvi.dwMajorVersion == 4) && (osvi.dwMinorVersion > 0)))
return TRUE;
}
 
return FALSE;
}
 
/*
BOOLEAN IsWindowsBlaBla(void)
{
 
}
*/
 
/drivers/wiener_pcicc32_dll
Property changes:
Added: svn:global-ignores
+*.dsp
+*.dsw
+*.sdf