3 @brief Library file for the vmod12e16 driver
4 @author Juan David Gonzalez Cobas
9 #include <linux/types.h>
13 #include "vmod12e16drvr.h"
14 #include "libvmod12e16.h"
16 int vmod12e16_get_handle(unsigned int lun
)
18 const int name_size
= 256;
19 char devname
[name_size
];
20 const char *driver_name
= "vmod12e16";
22 snprintf(devname
, name_size
, "/dev/%s.%d", driver_name
, lun
);
23 return open(devname
, O_RDWR
);
26 int vmod12e16_convert(int fd
, int channel
,
27 enum vmod12e16_amplification factor
, int *value
)
29 struct vmod12e16_conversion cv
, *cvp
= &cv
;
32 cvp
->channel
= channel
;
33 cvp
->amplification
= factor
;
34 err
= ioctl(fd
, VMOD12E16_IOCCONVERT
, cvp
);
41 int vmod12e16_close(int fd
)