Xenomai API
2.5.6.1
|
00001 00023 #ifndef __ANALOGY_CONTEXT__ 00024 #define __ANALOGY_CONTEXT__ 00025 00026 #if defined(__KERNEL__) && !defined(DOXYGEN_CPP) 00027 00028 #include <rtdm/rtdm_driver.h> 00029 00030 struct a4l_device; 00031 struct a4l_buffer; 00032 00033 struct a4l_device_context { 00034 00035 /* Needed to call rtdm_*_copy_from/to_user functions */ 00036 rtdm_user_info_t *user_info; 00037 00038 /* The adequate device pointer 00039 (retrieved thanks to minor at open time) */ 00040 struct a4l_device *dev; 00041 00042 /* The buffer structure contains everything to transfer data 00043 from asynchronous acquisition operations on a specific 00044 subdevice */ 00045 struct a4l_buffer *buffer; 00046 }; 00047 typedef struct a4l_device_context a4l_cxt_t; 00048 00049 static inline int a4l_get_minor(a4l_cxt_t *cxt) 00050 { 00051 /* Get a pointer on the container structure */ 00052 struct rtdm_dev_context * rtdm_cxt = rtdm_private_to_context(cxt); 00053 /* Get the minor index */ 00054 return rtdm_cxt->device->device_id; 00055 } 00056 00057 #endif /* __KERNEL__ && !DOXYGEN_CPP */ 00058 00059 #endif /* __ANALOGY_CONTEXT__ */