root / logic / trunk / measurement_reader / src / drv_comm / dev01 / drv_comm.h @ 72
History | View | Annotate | Download (1.25 KB)
1 |
/*
|
---|---|
2 |
* chardev.h − the header file with the ioctl definitions.
|
3 |
* The declarations here have to be in a header file, because
|
4 |
* they need to be known both to the kernel module
|
5 |
* (in chardev.c) and the process calling ioctl (ioctl.c)
|
6 |
*/
|
7 |
#ifndef DRV_COMM_H
|
8 |
#define DRV_COMM_H
|
9 |
#include <linux/ioctl.h> |
10 |
/*
|
11 |
* The major device number. We can't rely on dynamic
|
12 |
* registration any more, because ioctls need to know
|
13 |
* it.
|
14 |
*/
|
15 |
#define MAJOR_NUM_1 100 |
16 |
#define MAJOR_NUM_2 101 |
17 |
#define MAJOR_NUM_3 102 |
18 |
#define MAJOR_NUM_4 103 |
19 |
#define MAJOR_NUM_5 104 |
20 |
#define MAJOR_NUM_6 105 |
21 |
/*
|
22 |
* Set the message of the device driver
|
23 |
*/
|
24 |
#define IOCTL_SET_MSG_1 _IOR(MAJOR_NUM_1, 0, char *) |
25 |
#define IOCTL_SET_MSG_2 _IOR(MAJOR_NUM_1, 0, char *) |
26 |
#define IOCTL_SET_MSG_3 _IOR(MAJOR_NUM_1, 0, char *) |
27 |
#define IOCTL_SET_MSG_4 _IOR(MAJOR_NUM_1, 0, char *) |
28 |
#define IOCTL_SET_MSG_5 _IOR(MAJOR_NUM_1, 0, char *) |
29 |
#define IOCTL_SET_MSG_6 _IOR(MAJOR_NUM_1, 0, char *) |
30 |
|
31 |
ioctl_set_msg_1(int file_desc, char *message); |
32 |
ioctl_set_msg_2(int file_desc, char *message); |
33 |
ioctl_set_msg_3(int file_desc, char *message); |
34 |
ioctl_set_msg_4(int file_desc, char *message); |
35 |
ioctl_set_msg_5(int file_desc, char *message); |
36 |
ioctl_set_msg_6(int file_desc, char *message); |
37 |
void set_device_value(const char *dev,int devIdx); |
38 |
|
39 |
#endif //DRV_COMM_H |