Xenomai  3.0-rc3
device.h
Go to the documentation of this file.
1 
22 #ifndef _COBALT_RTDM_ANALOGY_DEVICE_H
23 #define _COBALT_RTDM_ANALOGY_DEVICE_H
24 
26 #include <rtdm/analogy/transfer.h>
27 #include <rtdm/analogy/driver.h>
28 
29 #define A4L_NB_DEVICES 10
30 
31 #define A4L_DEV_ATTACHED_NR 0
32 
33 struct a4l_device {
34 
35  /* Spinlock for global device use */
36  rtdm_lock_t lock;
37 
38  /* Device specific flags */
39  unsigned long flags;
40 
41  /* Driver assigned to this device thanks to attaching
42  procedure */
43  struct a4l_driver *driver;
44 
45  /* Hidden description stuff */
46  struct list_head subdvsq;
47 
48  /* Context-dependent stuff */
49  struct a4l_transfer transfer;
50 
51  /* Private data useful for drivers functioning */
52  void *priv;
53 };
54 
55 /* --- Devices tab related functions --- */
56 void a4l_init_devs(void);
57 int a4l_check_cleanup_devs(void);
58 int a4l_rdproc_devs(struct seq_file *p, void *data);
59 
60 /* --- Context related function / macro --- */
61 void a4l_set_dev(struct a4l_device_context *cxt);
62 #define a4l_get_dev(x) ((x)->dev)
63 
64 /* --- Upper layer functions --- */
65 int a4l_ioctl_devcfg(struct a4l_device_context * cxt, void *arg);
66 int a4l_ioctl_devinfo(struct a4l_device_context * cxt, void *arg);
67 
68 #endif /* !_COBALT_RTDM_ANALOGY_DEVICE_H */
ipipe_spinlock_t rtdm_lock_t
Lock variable.
Definition: driver.h:528
Analogy for Linux, Operation system facilities.
Analogy for Linux, driver facilities.
Structure containing driver declaration data.
Definition: driver.h:39
Analogy for Linux, transfer related features.