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 unsigned int default_bufsize;
00062
00063
00064
00065 a4l_irq_desc_t irq_desc;
00066 };
00067 typedef struct a4l_transfer a4l_trf_t;
00068
00069
00070
00071 int a4l_rdproc_transfer(char *page,
00072 char **start,
00073 off_t off, int count, int *eof, void *data);
00074
00075
00076
00077 void a4l_presetup_transfer(a4l_cxt_t * cxt);
00078 int a4l_setup_transfer(a4l_cxt_t * cxt);
00079 int a4l_precleanup_transfer(a4l_cxt_t * cxt);
00080 int a4l_cleanup_transfer(a4l_cxt_t * cxt);
00081 int a4l_reserve_transfer(a4l_cxt_t * cxt, int idx_subd);
00082 int a4l_init_transfer(a4l_cxt_t * cxt, a4l_cmd_t * cmd);
00083 int a4l_cancel_transfer(a4l_cxt_t * cxt, int idx_subd);
00084 int a4l_cancel_transfers(a4l_cxt_t * cxt);
00085
00086 ssize_t a4l_put(a4l_cxt_t * cxt, void *buf, size_t nbytes);
00087 ssize_t a4l_get(a4l_cxt_t * cxt, void *buf, size_t nbytes);
00088
00089 int a4l_request_irq(struct a4l_device *dev,
00090 unsigned int irq,
00091 a4l_irq_hdlr_t handler,
00092 unsigned long flags, void *cookie);
00093 int a4l_free_irq(struct a4l_device *dev, unsigned int irq);
00094 unsigned int a4l_get_irq(struct a4l_device *dev);
00095
00096 int a4l_ioctl_cancel(a4l_cxt_t * cxt, void *arg);
00097
00098 #endif
00099
00100 #endif
00101
00102 #endif