Subversion Repositories f9daq

Rev

Rev 124 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 124 Rev 135
Line 1... Line 1...
1
#include <stdlib.h>
1
#include <stdlib.h>
2
#include <stdio.h>
2
#include <stdio.h>
-
 
3
#include "wienvme_dll.h"
3
 
4
 
4
#ifdef _CVI_
5
#ifdef _CVI_
5
#include <utility.h>
6
#include <utility.h>
6
#endif
7
#endif
7
 
8
 
Line 20... Line 21...
20
#include <stdio.h>
21
#include <stdio.h>
21
#include <stdint.h>
22
#include <stdint.h>
22
#include <string.h>
23
#include <string.h>
23
#endif
24
#endif
24
 
25
 
25
#include "wienvme_dll.h"
-
 
26
//----------- DEFINES -----------------------------------------------------
26
//----------- DEFINES -----------------------------------------------------
27
#define DEVICENAME_LINUX "/dev/pcivme_0"     // a device name 'template' for LINUX
27
#define DEVICENAME_LINUX "/dev/pcivme_0"     // a device name 'template' for LINUX
28
#define DEVICENAME_NT "\\\\.\\PCIVME:\\VMEMMxx"     // a device name 'template' for WINNT
28
#define DEVICENAME_NT "\\\\.\\PCIVME:\\VMEMMxx"     // a device name 'template' for WINNT
29
#define DEVICENAME_9X "\\\\.\\C:\\windows\\system\\VWIENVMED.vxd" // the same for WIN95/98
29
#define DEVICENAME_9X "\\\\.\\C:\\windows\\system\\VWIENVMED.vxd" // the same for WIN95/98
30
#define MODULE_NUMBER     1 // number of connected CC32 module
30
#define MODULE_NUMBER     1 // number of connected CC32 module
Line 267... Line 267...
267
      break;
267
      break;
268
 
268
 
269
    default:
269
    default:
270
      return 0;
270
      return 0;
271
  }
271
  }
272
  return nb;
272
  return (short)nb;
273
}
273
}
274
 
274
 
275
short __stdcall WIENVME_VME_W( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t Data) {
275
short __stdcall WIENVME_VME_W( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t Data) {
276
  int hHandle=0, nb=0;
276
  int hHandle=0, nb=0;
277
  switch (AM) {
277
  switch (AM) {
Line 295... Line 295...
295
      break;
295
      break;
296
 
296
 
297
    default:
297
    default:
298
      return 0;
298
      return 0;
299
  }
299
  }
300
  return nb;
300
  return (short)nb;
301
}
301
}
302
 
302
 
303
short __stdcall WIENVME_VME_MW( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t Data) {
303
short __stdcall WIENVME_VME_MW( uint16_t AM, uint16_t DW, uint32_t VME_Address, uint32_t Data) {
304
 
304
 
305
  return WIENVME_VME_W( AM, DW, VME_Address, Data);
305
  return WIENVME_VME_W( AM, DW, VME_Address, Data);