added buffer info ioctl support and some alpha buffer related functions
This commit is contained in:
parent
7e7985ead9
commit
fc62ecb25e
5 changed files with 30 additions and 2 deletions
|
@ -171,6 +171,7 @@ typedef unsigned short sampl_t;
|
|||
#define COMEDI_INSNLIST _IOR(CIO,11,comedi_insnlist)
|
||||
#define COMEDI_INSN _IOR(CIO,12,comedi_insn)
|
||||
#define COMEDI_BUFCONFIG _IOR(CIO,13,comedi_bufconfig)
|
||||
#define COMEDI_BUFINFO _IOWR(CIO,14,comedi_bufinfo)
|
||||
|
||||
|
||||
/* structures */
|
||||
|
@ -186,6 +187,7 @@ typedef struct comedi_devconfig_struct comedi_devconfig;
|
|||
typedef struct comedi_rangeinfo_struct comedi_rangeinfo;
|
||||
typedef struct comedi_krange_struct comedi_krange;
|
||||
typedef struct comedi_bufconfig_struct comedi_bufconfig;
|
||||
typedef struct comedi_bufinfo_struct comedi_bufinfo;
|
||||
|
||||
struct comedi_trig_struct{
|
||||
unsigned int subdev; /* subdevice */
|
||||
|
@ -298,6 +300,18 @@ struct comedi_bufconfig_struct{
|
|||
unsigned int unused[4];
|
||||
};
|
||||
|
||||
struct comedi_bufinfo_struct{
|
||||
unsigned int subdevice;
|
||||
unsigned int bytes_read;
|
||||
|
||||
unsigned int buf_int_ptr;
|
||||
unsigned int buf_user_ptr;
|
||||
unsigned int buf_int_count;
|
||||
unsigned int buf_user_count;
|
||||
|
||||
unsigned int unused[5];
|
||||
};
|
||||
|
||||
/* range stuff */
|
||||
|
||||
#define __RANGE(a,b) ((((a)&0xffff)<<16)|((b)&0xffff))
|
||||
|
|
|
@ -150,7 +150,11 @@ enum comedi_oor_behavior {
|
|||
|
||||
enum comedi_oor_behavior comedi_set_global_oor_behavior(enum comedi_oor_behavior behavior);
|
||||
|
||||
|
||||
int comedi_buf_resize(comedi_t *it, unsigned int subdev, unsigned int size);
|
||||
int comedi_buf_resize_max(comedi_t *it, unsigned int subdev, unsigned int max_size);
|
||||
int comedi_buf_size(comedi_t *it, unsigned int subdev);
|
||||
int comedi_buf_contents(comedi_t *it, unsigned int subdev);
|
||||
int comedi_buf_mark_read(comedi_t *it, unsigned int subdev, unsigned int bytes);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
CFLAGS = -fPIC -Wall -Wstrict-prototypes -O2 -I../include -I.
|
||||
|
||||
OBJS=comedi.o timer.o sv.o range.o ioctl.o filler.o timed.o error.o \
|
||||
dio.o data.o get.o
|
||||
dio.o data.o get.o buffer.o
|
||||
|
||||
libcomedi.a: $(OBJS)
|
||||
#gcc -shared -Wl,-soname,libcomedi.so,-T,version_script -o libcomedi.so.${VERSION_CODE} $(OBJS) -lm
|
||||
|
|
|
@ -75,4 +75,12 @@ int ioctl_rangeinfo(int fd,int range_type,comedi_krange *range_ptr)
|
|||
return ioctl(fd,COMEDI_RANGEINFO,&it);
|
||||
}
|
||||
|
||||
int ioctl_bufconfig(int fd, comedi_bufconfig *bc)
|
||||
{
|
||||
return ioctl(fd, COMEDI_BUFCONFIG, bc);
|
||||
}
|
||||
|
||||
int ioctl_bufinfo(int fd, comedi_bufinfo *bi)
|
||||
{
|
||||
return ioctl(fd, COMEDI_BUFINFO, bi);
|
||||
}
|
||||
|
|
|
@ -100,6 +100,8 @@ int ioctl_chaninfo(int fd,unsigned int subdev,lsampl_t *maxdata_list,
|
|||
unsigned int *flaglist,unsigned int *rangelist);
|
||||
int ioctl_trigger(int fd,comedi_trig *it);
|
||||
int ioctl_rangeinfo(int fd,int range_type,comedi_krange *range_ptr);
|
||||
int ioctl_bufconfig(int fd, comedi_bufconfig *bc);
|
||||
int ioctl_bufinfo(int fd, comedi_bufinfo *bi);
|
||||
|
||||
/* filler routines */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue