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);
27 eDebug("couldnt open /dev/rfmod0!!!!");
36 eRFmod *eRFmod::getInstance()
41 void eRFmod::setFunction(int val) //0=Enable 1=Disable
43 ioctl(fd, IOCTL_SET_STANDBY, &val);
46 void eRFmod::setTestmode(int val) //0=Enable 1=Disable
48 ioctl(fd, IOCTL_SET_TESTMODE, &val);
51 void eRFmod::setSoundFunction(int val) //0=Enable 1=Disable
53 ioctl(fd, IOCTL_SET_SOUNDENABLE, &val);
56 void eRFmod::setSoundCarrier(int val)
58 ioctl(fd, IOCTL_SET_SOUNDSUBCARRIER, &val);
61 void eRFmod::setChannel(int val)
63 ioctl(fd, IOCTL_SET_CHANNEL, &val);
66 void eRFmod::setFinetune(int val)
68 ioctl(fd, IOCTL_SET_FINETUNE, &val);
71 //FIXME: correct "run/startlevel"
72 eAutoInitP0<eRFmod> init_rfmod(eAutoInitNumbers::rc, "UHF Modulator");