Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 83 → Rev 81

/pts/wienvme_dll.h
0,0 → 1,74
#ifndef _WIENVME_DLL_H
#define _WIENVME_DLL_H
 
#include <ansi_c.h>
#include <stdint.h>
#include <windows.h>
#include <cvidef.h>
 
extern int hHandle24, hHandle32;
 
void WIENVME_load (char*);
int WIENVME_open (int*, unsigned char, char*, unsigned short);
int WIENVME_open24 (void);
int WIENVME_open32 (void);
int WIENVME_start (char*);
void WIENVME_unload (void);
int WIENVME_close (int);
int WIENVME_close24 (void);
int WIENVME_close32 (void);
int WIENVME_stop (void);
int WIENVME_reset (void);
 
int WIENVME_read8 (int, unsigned long, unsigned long, void*);
int WIENVME_read16 (int, unsigned long, unsigned long, void*);
int WIENVME_read32 (int, unsigned long, unsigned long, void*);
int WIENVME_write8 (int, unsigned long, unsigned long, void*);
int WIENVME_write16 (int, unsigned long, unsigned long, void*);
int WIENVME_write32 (int, unsigned long, unsigned long, void*);
 
#define WIENVME_VME_START(NODE) WIENVME_start((NODE))
#define WIENVME_VME_STOP() WIENVME_stop()
#define WIENVME_VME_RESET() WIENVME_reset()
#define WIENVME_VME_A24D8_R(VME,DATA) WIENVME_read8(hHandle24, 1, (VME), (DATA))
#define WIENVME_VME_A24D16_R(VME,DATA) WIENVME_read16(hHandle24, 1, (VME), (DATA))
#define WIENVME_VME_A24D32_R(VME,DATA) WIENVME_read32(hHandle24, 1, (VME), (DATA))
#define WIENVME_VME_A24D8_W(VME,DATA) WIENVME_write8(hHandle24, 1, (VME), (DATA))
#define WIENVME_VME_A24D16_W(VME,DATA) WIENVME_write16(hHandle24, 1, (VME), (DATA))
#define WIENVME_VME_A24D32_W(VME,DATA) WIENVME_write32(hHandle24, 1, (VME), (DATA))
#define WIENVME_VME_A32D8_R(VME,DATA) WIENVME_read8(hHandle32, 1, (VME), (DATA))
#define WIENVME_VME_A32D16_R(VME,DATA) WIENVME_read16(hHandle32, 1, (VME), (DATA))
#define WIENVME_VME_A32D32_R(VME,DATA) WIENVME_read32(hHandle32, 1, (VME), (DATA))
#define WIENVME_VME_A32D8_W(VME,DATA) WIENVME_write8(hHandle32, 1, (VME), (DATA))
#define WIENVME_VME_A32D16_W(VME,DATA) WIENVME_write16(hHandle32, 1, (VME), (DATA))
#define WIENVME_VME_A32D32_W(VME,DATA) WIENVME_write32(hHandle32, 1, (VME), (DATA))
 
 
short __stdcall WIENVME_VME_R( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t *Data);
 
short __stdcall WIENVME_VME_W( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t Data);
 
short __stdcall WIENVME_VME_MW( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t Data);
short __stdcall WIENVME_VME_MWRST( void );
short __stdcall WIENVME_VME_MWEXEC( void );
 
short __stdcall WIENVME_VME_MR( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t *Data);
short __stdcall WIENVME_VME_MRRST( void );
short __stdcall WIENVME_VME_MREXEC( uint32_t *Data );
 
typedef unsigned short ADDRESS_MODIFIER;
 
#define Std_Sup_Data (ADDRESS_MODIFIER)0x3d
#define Std_Sup_Prog (ADDRESS_MODIFIER)0x3e
#define Std_NoPriv_Data (ADDRESS_MODIFIER)0x39
#define Std_NoPriv_Prog (ADDRESS_MODIFIER)0x3a
 
#define Short_Sup (ADDRESS_MODIFIER)0x2d
#define Short_NoPriv (ADDRESS_MODIFIER)0x29
 
#define Ext_Sup_Data (ADDRESS_MODIFIER)0x0d
#define Ext_Sup_Prog (ADDRESS_MODIFIER)0x0e
#define Ext_NoPriv_Data (ADDRESS_MODIFIER)0x09
#define Ext_NoPriv_Prog (ADDRESS_MODIFIER)0x0a
 
#endif
Property changes:
Added: svn:executable
Index: PtsModule_CVI.c
===================================================================
--- PtsModule_CVI.c (revision 83)
+++ PtsModule_CVI.c (revision 81)
@@ -1,17 +1,6 @@
-// sudo ./pts -a 0x1000000 -v 1 -w 2 turn LED ON
-// sudo ./pts -a 0x1000000 -v 1 -w 1 turn LED OFF
-// sudo ./ptsvmusb -a 0x02501000 -v 2 -i a.bit -b 2
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <ctype.h>
-#include <string.h>
-
-#include "vme.h"
-
#include <cvirte.h>
#include "PtsModule.h"
@@ -21,13 +10,23 @@
#include <formatio.h>
static int p1;
+// sudo ./pts -a 0x1000000 -v 1 -w 2 turn LED ON
+// sudo ./pts -a 0x1000000 -v 1 -w 1 turn LED OFF
+// sudo ./ptsvmusb -a 0x02501000 -v 2 -i a.bit -b 2
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include "vme.h"
+
+
int verbose;
uint32_t ptaddr=0;
char str[255];
/pts/PtsModule_CVI.prj
1,15 → 1,22
[Project Header]
<<<<<<< .mine
Version = 1302
Pathname = "/c/home/rok/hapd/pts/PtsModule_CVI.prj"
CVI Dir = "/c/program files/national instruments/cvi2013"
CVI Shared Dir = "/C/Program Files/National Instruments/Shared/CVI"
=======
Version = 1201
Pathname = "/c/home/rok/pts/PtsModule_CVI.prj"
CVI Dir = "/c/program files (x86)/national instruments/cvi2012"
CVI Shared Dir = "/C/Program Files (x86)/National Instruments/Shared/CVI"
>>>>>>> .r80
CVI Pub Local Dir = "/C/ProgramData/National Instruments/CVI2013"
CVI Pub Global Dir = "/C/ProgramData/National Instruments/CVI"
IVI Standard Root Dir = "/C/Program Files/IVI Foundation/IVI"
VXIplug&play Framework Dir = "/C/Program Files/IVI Foundation/VISA/winnt"
IVI Standard Root Dir = "/C/Program Files (x86)/IVI Foundation/IVI"
VXIplug&play Framework Dir = "/C/Program Files (x86)/IVI Foundation/VISA/winnt"
IVI Standard Root 64-bit Dir = "/C/Program Files/IVI Foundation/IVI"
VXIplug&play Framework 64-bit Dir = "/C/Program Files/IVI Foundation/VISA/win64"
Number of Files = 9
Number of Files = 8
Target Type = "Executable"
Flags = 2064
Copied From Locked InstrDrv Directory = False
47,8 → 54,13
Res Id = 2
Path Is Rel = True
Path Rel To = "Project"
<<<<<<< .mine
Path Rel Path = "PtsModule.h"
Path = "/c/home/rok/hapd/pts/PtsModule.h"
=======
Path Rel Path = "../../../Program Files/CAEN/VME/lib/x86_64/CAENVMELib.lib"
Path = "/c/Program Files/CAEN/VME/lib/x86_64/CAENVMELib.lib"
>>>>>>> .r80
Exclude = False
Project Flags = 0
Folder = "Include Files"
55,22 → 67,10
Folder Id = 1
 
[File 0003]
File Type = "Include"
File Type = "User Interface Resource"
Res Id = 3
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "../../../CVI/instr/vme/vme.h"
Path = "/c/home/CVI/instr/vme/vme.h"
Exclude = False
Project Flags = 0
Folder = "Include Files"
Folder Id = 1
 
[File 0004]
File Type = "User Interface Resource"
Res Id = 4
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "PtsModule_CVI.uir"
Path = "/c/home/rok/hapd/pts/PtsModule_CVI.uir"
Exclude = False
78,9 → 78,9
Folder = "User Interface Files"
Folder Id = 2
 
[File 0005]
[File 0004]
File Type = "Function Panel"
Res Id = 5
Res Id = 4
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "../../../CVI/instr/CAENV1718/CAENV1718.fp"
90,9 → 90,9
Folder = "Instrument Files"
Folder Id = 3
 
[File 0006]
[File 0005]
File Type = "Function Panel"
Res Id = 6
Res Id = 5
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "../../../CVI/instr/vme/vme.fp"
102,9 → 102,9
Folder = "Instrument Files"
Folder Id = 3
 
[File 0007]
[File 0006]
File Type = "Function Panel"
Res Id = 7
Res Id = 6
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "../../../CVI/instr/WIENVME_DLL/wienvme_dll.fp"
114,21 → 114,29
Folder = "Instrument Files"
Folder Id = 3
 
[File 0008]
[File 0007]
File Type = "Function Panel"
Res Id = 8
Res Id = 7
Path Is Rel = True
<<<<<<< .mine
Path Rel To = "Project"
Path Rel Path = "../../../CVI/instr/WUSBVME_DLL/wusbvme_dll.fp"
Path = "/c/home/CVI/instr/WUSBVME_DLL/wusbvme_dll.fp"
=======
Path Rel To = "Project"
Path Rel Path Line0001 = "../../../Program Files/National Instruments/CVI2012/instr/WIENVME_DLL/wienvme_dl"
Path Rel Path Line0002 = "l.fp"
Path = "/c/Program Files/National Instruments/CVI2012/instr/WIENVME_DLL/wienvme_dll.fp"
>>>>>>> .r80
Exclude = False
Project Flags = 0
Folder = "Instrument Files"
Folder Id = 3
 
[File 0009]
<<<<<<< .mine
[File 0008]
File Type = "Library"
Res Id = 9
Res Id = 8
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "../../../../Program Files/CAEN/VME/lib/x86/CAENVMELib.lib"
137,6 → 145,14
Project Flags = 0
Folder = "Library Files"
Folder Id = 4
=======
[Folders]
Folder 0 = "Source Files"
Folder 1 = "Include Files"
Folder 2 = "User Interface Files"
Folder 3 = "Instrument Files"
Folder 4 = "Library Files"
>>>>>>> .r80
 
[Custom Build Configs]
Num Custom Build Configs = 0
168,7 → 184,11
Stack Commit = 4096
Image Base Address = 4194304
Image Base Address x64 = 4194304
<<<<<<< .mine
Compiler Defines = "/DWIN32_LEAN_AND_MEAN"
=======
Compiler Defines = "/DWIN32_LEAN_AND_MEAN /DCAEN_V1718 /DWXXIENVME"
>>>>>>> .r80
Sign = False
Sign Store = ""
Sign Certificate = ""
455,12 → 475,8
[Include Paths]
Include Path 1 Is Rel = True
Include Path 1 Rel To = "Project"
Include Path 1 Rel Path = "../../../CVI/instr/vme"
Include Path 1 = "/c/home/CVI/instr/vme"
Include Path 2 Is Rel = True
Include Path 2 Rel To = "Project"
Include Path 2 Rel Path = ""
Include Path 2 = "/c/home/rok/hapd/pts"
Include Path 1 Rel Path = ""
Include Path 1 = "/c/home/rok/hapd/pts"
 
[Create Executable]
Executable File_Debug Is Rel = True
/pts/PtsModule_CVI.uir
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/pts/CAENVMElib.h
29,8 → 29,16
#include "CAENVMEtypes.h"
 
#ifdef WIN32
#ifndef _CVI_
 
#ifdef _CVI_
typedef char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef int int32_t;
typedef unsigned int uint32_t;
// typedef INT64 int64_t;
// typedef UINT64 uint64_t;
#else
typedef INT8 int8_t;
typedef UINT8 uint8_t;
typedef INT16 int16_t;