File: dmxdevP.h

package info (click to toggle)
dmx4linux 2.5%2Bdfsg-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,660 kB
  • ctags: 2,835
  • sloc: ansic: 23,341; yacc: 918; asm: 846; makefile: 614; sh: 439
file content (93 lines) | stat: -rw-r--r-- 2,490 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
 * dmxdevP.h
 * private header, only for dmxdev.
 *
 * Copyright (C) Michael Stickel <michael@cubic.org>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
#ifndef __DMXDEVP_H__
#define __DMXDEVP_H__

#include <linux/config.h>
#include <linux/version.h>

#ifndef CONFIG_MODULES
#error Linux Kernel needs Modules support for DMX4Linux
#endif

#ifndef KERNEL_VERSION
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#endif

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)
#error DMX4Linux requires Linux 2.2.x or greater
#endif

#if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
#  define MODVERSIONS
#endif


#ifdef MODVERSIONS
# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
#  include <config/modversions.h>
# else
#  include <linux/modversions.h>
# endif
#endif

#include <dmx/dmxdev.h>
#include <dmxdev/utils.h>
#include <dmxdev/fileinfo.h>

#define MINOR_NUM(min,node)      int min=MINOR(node->i_rdev)
#define FILE_MINOR_NUM(min,file) int min=MINOR(file->f_dentry->d_inode->i_rdev)

#define FILE_MINOR(file)         MINOR((file)->f_dentry->d_inode->i_rdev)

#define MINVAL(min)		 ((min)>=0 && (min)<DMX_DEVNUMS)
#define DEV_BUF(buf,n)           unsigned char *buf=DMX_Buffer[(n)]

#define IS_MINOR_DMXOUT(x)  ((x)==DMXOUTMINOR)  /* output device. memory mapping possible */
#define IS_MINOR_DMXIN(x)   ((x)==DMXINMINOR)  /* works as dmx-out for inputs */

#ifndef MIN
#define MIN(a,b) (((a)<(b))?(a):(b))
#endif

#ifndef MAX
#define MAX(a,b) (((a)>(b))?(a):(b))
#endif



int  DMXProcInit    (void);
void DMXProcCleanup (void);


int number_input_universes (void);
int number_output_universes (void);


DMXInterface *dmx_family_create_interface (DMXFamily *f, DMXPropList *pl);

/*
 * for internal use only
 */
int
dmx_universe_signal_changed (DMXUniverse *u, uint start, uint size);

#endif