1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

forgot to check in setmod1.c

This commit is contained in:
internal 2023-06-12 11:32:14 +02:00
parent 0d9b5ca619
commit 7478bcffb9

33
apps/setmod1.c Normal file
View File

@ -0,0 +1,33 @@
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdint.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <pthread.h>
#include <linux/dvb/mod.h>
int main()
{
int fd;
struct dvb_mod_params mp;
struct dvb_mod_channel_params mc;
fd = open("/dev/dvb/adapter1/mod0", O_RDONLY);
mp.base_frequency = 722000000;
mp.attenuator = 0;
ioctl(fd, DVB_MOD_SET, &mp);
mc.modulation = QAM_256;
mc.input_bitrate = 40000000ULL << 32;
mc.pcr_correction = 0;
ioctl(fd, DVB_MOD_CHANNEL_SET, &mc);
close(fd);
}