source: drsdaq/VME/struck/sis1100/V2.02/examples/camac_simple_routines/camac_clearinhibit.c~@ 23

Last change on this file since 23 was 22, checked in by ogrimm, 16 years ago
First commit of drsdaq program
  • Property svn:executable set to *
File size: 796 bytes
Line 
1/************************************/
2/* Clear CAMAC Inhibit with SIS5100 */
3/****:*******************************/
4
5#define _GNU_SOURCE
6#include <stdio.h>
7#include <errno.h>
8#include <string.h>
9#include <sys/types.h>
10#include <unistd.h>
11#include <stdlib.h>
12#include <fcntl.h>
13#include <sys/ioctl.h>
14
15
16#include "dev/pci/sis1100_var.h"
17#include "sis5100_camac_calls.h"
18
19
20/****************************************************************************/
21int main(int argc, char* argv[])
22{
23
24int p;
25int res;
26
27
28if (argc<2) {
29 fprintf(stderr, "usage: %s path\n", argv[0]);
30 return 1;
31}
32
33if ((p=open(argv[1], O_RDWR, 0))<0) {
34 perror("open");
35 return 1;
36}
37
38
39res=s5100_control_write(p,0x100,0x10000);
40if (res!=0) {
41 printf("error: %x\n",res);
42}
43close(p);
44return 0;
45}
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Note: See TracBrowser for help on using the repository browser.