1 #include <lib/driver/rfmod.h>
7 #include <lib/base/init.h>
8 #include <lib/base/init_num.h>
9 #include <lib/base/eerror.h>
11 #define IOCTL_SET_CHANNEL 0
12 #define IOCTL_SET_TESTMODE 1
13 #define IOCTL_SET_SOUNDENABLE 2
14 #define IOCTL_SET_SOUNDSUBCARRIER 3
15 #define IOCTL_SET_FINETUNE 4
16 #define IOCTL_SET_STANDBY 5
18 eRFmod *eRFmod::instance = 0;
25 fd = open("/dev/rfmod0", O_RDWR);
34 eRFmod *eRFmod::getInstance()
39 void eRFmod::setFunction(int val) //0=Enable 1=Disable
41 ioctl(fd, IOCTL_SET_STANDBY, &val);
44 void eRFmod::setTestmode(int val) //0=Enable 1=Disable
46 ioctl(fd, IOCTL_SET_TESTMODE, &val);
49 void eRFmod::setSoundFunction(int val) //0=Enable 1=Disable
51 ioctl(fd, IOCTL_SET_SOUNDENABLE, &val);
54 void eRFmod::setSoundCarrier(int val)
56 ioctl(fd, IOCTL_SET_SOUNDSUBCARRIER, &val);
59 void eRFmod::setChannel(int val)
61 ioctl(fd, IOCTL_SET_CHANNEL, &val);
64 void eRFmod::setFinetune(int val)
66 ioctl(fd, IOCTL_SET_FINETUNE, &val);
69 //FIXME: correct "run/startlevel"
70 eAutoInitP0<eRFmod> init_rfmod(eAutoInitNumbers::rc, "UHF Modulator");