00001
00023 #ifndef __ANALOGY_TRANSFER__
00024 #define __ANALOGY_TRANSFER__
00025
00026 #ifndef DOXYGEN_CPP
00027
00028 #include <analogy/context.h>
00029 #include <analogy/subdevice.h>
00030 #include <analogy/buffer.h>
00031
00032
00033 #define A4L_TSF_CLEAN 0
00034
00035
00036 #define A4L_IRQ_UNUSED (unsigned int)((unsigned short)(~0))
00037 #define A4L_IDX_UNUSED (unsigned int)(~0)
00038
00039
00040
00041
00042 #define A4L_IRQ_SHARED RTDM_IRQTYPE_SHARED
00043 #define A4L_IRQ_EDGE RTDM_IRQTYPE_EDGE
00044 #define A4L_IRQ_DISABLED 0
00045
00046
00047 #define A4L_INFINITE 0
00048 #define A4L_NONBLOCK (-1)
00049
00050 #ifdef __KERNEL__
00051
00052 struct a4l_device;
00053
00054 struct a4l_transfer {
00055
00056
00057 unsigned int nb_subd;
00058 a4l_subd_t **subds;
00059
00060
00061
00062 a4l_irq_desc_t irq_desc;
00063 };
00064 typedef struct a4l_transfer a4l_trf_t;
00065
00066
00067
00068 int a4l_rdproc_transfer(char *page,
00069 char **start,
00070 off_t off, int count, int *eof, void *data);
00071
00072
00073
00074 void a4l_presetup_transfer(a4l_cxt_t * cxt);
00075 int a4l_setup_transfer(a4l_cxt_t * cxt);
00076 int a4l_precleanup_transfer(a4l_cxt_t * cxt);
00077 int a4l_cleanup_transfer(a4l_cxt_t * cxt);
00078 int a4l_reserve_transfer(a4l_cxt_t * cxt, int idx_subd);
00079 int a4l_init_transfer(a4l_cxt_t * cxt, a4l_cmd_t * cmd);
00080 int a4l_cancel_transfer(a4l_cxt_t * cxt, int idx_subd);
00081 int a4l_cancel_transfers(a4l_cxt_t * cxt);
00082
00083 ssize_t a4l_put(a4l_cxt_t * cxt, void *buf, size_t nbytes);
00084 ssize_t a4l_get(a4l_cxt_t * cxt, void *buf, size_t nbytes);
00085
00086 int a4l_request_irq(struct a4l_device *dev,
00087 unsigned int irq,
00088 a4l_irq_hdlr_t handler,
00089 unsigned long flags, void *cookie);
00090 int a4l_free_irq(struct a4l_device *dev, unsigned int irq);
00091 unsigned int a4l_get_irq(struct a4l_device *dev);
00092
00093 int a4l_ioctl_cancel(a4l_cxt_t * cxt, void *arg);
00094
00095 #endif
00096
00097 #endif
00098
00099 #endif