3 @brief Library file for the vmod16a2 driver
4 @author Juan David Gonzalez Cobas
13 #include "libvmod16a2.h"
15 int vmod16a2_get_handle(unsigned int lun
)
17 const int filename_sz
= 256;
18 char devname
[filename_sz
];
19 const char *driver_name
= "vmod16a2";
22 /* open the device file */
23 snprintf(devname
, filename_sz
, "/dev/%s.%d", driver_name
, lun
);
24 fd
= open(devname
, O_RDONLY
);
28 int vmod16a2_convert(int fd
, int channel
, int datum
)
30 struct vmod16a2_convert cvt
, *cvtp
= &cvt
;
32 cvtp
->channel
= channel
;
34 return ioctl(fd
, VMOD16A2_IOCPUT
, cvtp
);
37 int vmod16a2_close(int fd
)