author | zecke <zecke> | 2006-04-27 10:45:16 (UTC) |
---|---|---|
committer | zecke <zecke> | 2006-04-27 10:45:16 (UTC) |
commit | 17191b7ae7929568b9ed87a427e2eaeb28377a00 (patch) (side-by-side diff) | |
tree | 8a095f0ecd0b4a09f72b1e8295bfc3d8c8008524 /libopie2 | |
parent | c5e86199c46839e6952b8ec3dec1447e5f60a279 (diff) | |
download | opie-17191b7ae7929568b9ed87a427e2eaeb28377a00.zip opie-17191b7ae7929568b9ed87a427e2eaeb28377a00.tar.gz opie-17191b7ae7929568b9ed87a427e2eaeb28377a00.tar.bz2 |
libopie2/opiecore/device/:
Patch by hrhr to add basic backlight support for the
hx4700 series of iPAQs to ODevice
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.cpp | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index 0c78277..2566979 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h @@ -70,7 +70,7 @@ enum OModel { Model_iPAQ_H22xx = ( Model_iPAQ | 0x0007 ), Model_iPAQ_H191x = ( Model_iPAQ | 0x0008 ), Model_iPAQ_H1940 = ( Model_iPAQ | 0x0009 ), - + Model_iPAQ_HX4700 = ( Model_iPAQ | 0x000A ), Model_Jornada = ( 6 << 16 ), Model_Jornada_56x = ( Model_Jornada | 0x0001 ), Model_Jornada_720 = ( Model_Jornada | 0x0002 ), diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp index a221e23..e6e3145 100644 --- a/libopie2/opiecore/device/odevice_ipaq.cpp +++ b/libopie2/opiecore/device/odevice_ipaq.cpp @@ -153,6 +153,9 @@ void iPAQ::init(const QString& model) d->m_model = Model_iPAQ_H191x; else if ( d->m_modelstr == "H1940" ) d->m_model = Model_iPAQ_H1940; + else if ( d->m_modelstr == "HX4700" ) + d->m_model = Model_iPAQ_HX4700; + else d->m_model = Model_Unknown; @@ -165,6 +168,7 @@ void iPAQ::init(const QString& model) case Model_iPAQ_H22xx: case Model_iPAQ_H191x: case Model_iPAQ_H1940: + case Model_iPAQ_HX4700: d->m_rotation = Rot0; break; case Model_iPAQ_H36xx: @@ -382,6 +386,14 @@ bool iPAQ::setDisplayBrightness ( int bright ) // No Global::shellQuote as we gurantee it to be sane res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); break; + + case Model_iPAQ_HX4700: + cmdline = QString::fromLatin1( "echo %1 > /sys/class/backlight/w100fb/brightness" ).arg( bright ); + // No Global::shellQuote as we gurantee it to be sane + res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); + break; + + default: if (( fd = ::open ( "/dev/touchscreen/0", O_WRONLY )) >= 0 ) { FLITE_IN bl; @@ -407,6 +419,7 @@ int iPAQ::displayBrightnessResolution() const case Model_iPAQ_H39xx: return 64; case Model_iPAQ_H5xxx: + case Model_iPAQ_HX4700: return 255; case Model_iPAQ_H191x: return 7; |