blob: f7b1bbd4e7afe37e4248c43e3184937ad65f427f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#include <lib/driver/avswitch.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <lib/base/init.h>
#include <lib/base/init_num.h>
#include <lib/base/econfig.h>
#include <lib/base/eerror.h>
eAVSwitch *eAVSwitch::instance = 0;
eAVSwitch::eAVSwitch()
{
ASSERT(!instance);
instance = this;
avsfd = open("/dev/dbox/avs0", O_RDWR);
//enable colors on thedoc's tv
ioctl(avsfd, 0x1000 | 35, 2);
ioctl(avsfd, 0x1000 | 9, 1);
}
eAVSwitch::~eAVSwitch()
{
if(avsfd > 0)
close(avsfd);
}
eAVSwitch *eAVSwitch::getInstance()
{
return instance;
}
void eAVSwitch::setColorFormat(int format)
{
printf("eAVSwitch::setColorFormat(%d)\n",format);
/*there are no ioctl for controling this in avs - scart api needed
no, not the gillem one */
}
//FIXME: correct "run/startlevel"
eAutoInitP0<eAVSwitch> init_avswitch(eAutoInitNumbers::rc, "AVSwitch Driver");
|