From 9458c6fcf07885c97e8b627b035c848267ee2d0c Mon Sep 17 00:00:00 2001 From: Ronny Strutz Date: Fri, 2 Sep 2005 21:40:11 +0000 Subject: [PATCH] avswitch --- lib/driver/avswitch.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ lib/driver/avswitch.h | 19 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 lib/driver/avswitch.cpp create mode 100644 lib/driver/avswitch.h diff --git a/lib/driver/avswitch.cpp b/lib/driver/avswitch.cpp new file mode 100644 index 00000000..31db25a4 --- /dev/null +++ b/lib/driver/avswitch.cpp @@ -0,0 +1,41 @@ +#include + +#include +#include +#include + +#include +#include +#include +#include + +eAVSwitch *eAVSwitch::instance = 0; + +eAVSwitch::eAVSwitch() +{ + ASSERT(!instance); + instance = this; + + avsfd = open("/dev/dbox/avs0", O_RDWR); +} + +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 init_avswitch(eAutoInitNumbers::rc, "AVSwitch Driver"); diff --git a/lib/driver/avswitch.h b/lib/driver/avswitch.h new file mode 100644 index 00000000..d8417692 --- /dev/null +++ b/lib/driver/avswitch.h @@ -0,0 +1,19 @@ +#ifndef __avswitch_h +#define __avswitch_h + +class eAVSwitch +{ + static eAVSwitch *instance; + + int avsfd; +protected: +public: + eAVSwitch(); + ~eAVSwitch(); + + static eAVSwitch *getInstance(); + + void setColorFormat(int format); +}; + +#endif -- 2.30.2