2 #include <lib/driver/misc_options.h>
8 #include <lib/base/init.h>
9 #include <lib/base/init_num.h>
10 #include <lib/base/eerror.h>
12 Misc_Options *Misc_Options::instance = 0;
14 Misc_Options::Misc_Options()
15 :m_12V_output_state(-1)
21 int Misc_Options::set_12V_output(int state)
23 if (state == m_12V_output_state)
25 int fd = open("/proc/stb/misc/12V_output", O_WRONLY);
28 eDebug("couldn't open /proc/stb/misc/12V_output");
37 write(fd, str, strlen(str));
38 m_12V_output_state = state;
43 bool Misc_Options::detected_12V_output()
45 int fd = open("/proc/stb/misc/12V_output", O_WRONLY);
48 eDebug("couldn't open /proc/stb/misc/12V_output");
55 Misc_Options *Misc_Options::getInstance()
60 //FIXME: correct "run/startlevel"
61 eAutoInitP0<Misc_Options> init_misc_options(eAutoInitNumbers::rc, "misc options");