source: drsdaq/VME/atlas/include/cmem_rcc/cmem_rcc_common.h@ 704

Last change on this file since 704 was 22, checked in by ogrimm, 16 years ago
First commit of drsdaq program
  • Property svn:executable set to *
File size: 1.3 KB
Line 
1/************************************************************************/
2/* */
3/* This is the common header file for the CMEM_RCC */
4/* driver, library & applications */
5/* */
6/* 12. Dec. 01 MAJO created */
7/* */
8/*******C 2005 - The software with that certain something****************/
9
10#ifndef _CMEM_RCC_COMMON_H
11#define _CMEM_RCC_COMMON_H
12
13#define CMEM_MAX_NAME 40
14#define TYPE_GFP 1
15#define TYPE_BPA 2
16
17#ifdef __KERNEL__
18 #include <linux/types.h>
19 #define P_ID_CMEM_RCC 7 // Needs to be re-defined here since we do not want to include rcc_error.h at this level
20#else
21 #include "rcc_error/rcc_error.h"
22 #include <sys/types.h>
23#endif
24
25// Error codes
26enum
27{
28 CMEM_RCC_SUCCESS = 0,
29 CMEM_RCC_ERROR_FAIL = (P_ID_CMEM_RCC << 8) + 1,
30 CMEM_RCC_FILE,
31 CMEM_RCC_NOTOPEN,
32 CMEM_RCC_IOCTL,
33 CMEM_RCC_MMAP,
34 CMEM_RCC_MUNMAP,
35 CMEM_RCC_OVERFLOW,
36 CMEM_RCC_TOOBIG,
37 CMEM_RCC_ILLHAND,
38 CMEM_RCC_NOSIZE,
39 CMEM_RCC_GETP,
40 CMEM_RCC_CFU,
41 CMEM_RCC_GFP,
42 CMEM_RCC_BPA,
43 CMEM_RCC_CTU,
44 CMEM_RCC_KMALLOC,
45 CMEM_RCC_NO_CODE
46};
47
48typedef struct
49{
50 u_long paddr;
51 u_long uaddr;
52 u_long kaddr;
53 u_int size;
54 u_int order;
55 u_int locked;
56 u_int type;
57 u_int handle;
58 char name[CMEM_MAX_NAME];
59} cmem_rcc_t;
60
61typedef u_int CMEM_Error_code_t;
62
63#endif
Note: See TracBrowser for help on using the repository browser.