Last change
on this file since 23 was 22, checked in by ogrimm, 16 years ago |
First commit of drsdaq program
|
File size:
1.5 KB
|
Line | |
---|
1 | /*
|
---|
2 | * $ZEL$
|
---|
3 | */
|
---|
4 |
|
---|
5 | #ifndef _test_3100_h_
|
---|
6 | #define _test_3100_h_
|
---|
7 |
|
---|
8 | #define _GNU_SOURCE
|
---|
9 |
|
---|
10 | #include <stdio.h>
|
---|
11 | #include <errno.h>
|
---|
12 | #include <string.h>
|
---|
13 | #include <sys/types.h>
|
---|
14 | #include <time.h>
|
---|
15 | #include <unistd.h>
|
---|
16 | #include <stdlib.h>
|
---|
17 | #include <fcntl.h>
|
---|
18 | #include <sys/mman.h>
|
---|
19 | #include <sys/ioctl.h>
|
---|
20 |
|
---|
21 | #include "dev/pci/sis1100_var.h"
|
---|
22 |
|
---|
23 | #ifndef SIS1100_Version
|
---|
24 | # define MAJORVERSION 1
|
---|
25 | # define MINORVERSION 0
|
---|
26 | #else
|
---|
27 | # define MAJORVERSION ((SIS1100_Version>>16)&0xffff)
|
---|
28 | # define MINORVERSION (SIS1100_Version&0xffff)
|
---|
29 | #endif
|
---|
30 |
|
---|
31 | #if MAJORVERSION < 2
|
---|
32 | enum sis1100_subdev {sis1100_subdev_remote, sis1100_subdev_ram,
|
---|
33 | sis1100_subdev_dsp};
|
---|
34 | #endif
|
---|
35 |
|
---|
36 | #define VMESTART 0x84000000
|
---|
37 |
|
---|
38 | struct path {
|
---|
39 | char* name;
|
---|
40 | enum sis1100_subdev type;
|
---|
41 | int p;
|
---|
42 | int majorversion;
|
---|
43 | int minorversion;
|
---|
44 | u_int32_t mapsize;
|
---|
45 | volatile u_int32_t* map;
|
---|
46 | struct sis1100_ident ident;
|
---|
47 | };
|
---|
48 |
|
---|
49 | extern u_int32_t* buf;
|
---|
50 | extern int bufsize;
|
---|
51 |
|
---|
52 | int init_path(struct path* path);
|
---|
53 | int done_path(struct path* path);
|
---|
54 | int vme_probe(struct path* path, u_int32_t addr);
|
---|
55 | int check_reopen(struct path* path);
|
---|
56 | int check_rw(struct path* path);
|
---|
57 | int check_MAPSIZE(struct path* path);
|
---|
58 | int check_mmap(struct path* path);
|
---|
59 | int check_IDENT(struct path* path);
|
---|
60 | int check_rw_single(struct path* path, u_int32_t start, u_int32_t size);
|
---|
61 | int check_r_block(struct path* path, u_int32_t start, u_int32_t max);
|
---|
62 | int check_w_block(struct path* path, u_int32_t start, u_int32_t max);
|
---|
63 | int check_VME_BLOCK_READ(struct path* path, u_int32_t start, u_int32_t size);
|
---|
64 |
|
---|
65 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.