author | mickeyl <mickeyl> | 2005-08-23 12:25:35 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-08-23 12:25:35 (UTC) |
commit | 95210ac41729a4c264e830963cdae3a4cdd218fb (patch) (side-by-side diff) | |
tree | c73284a5aebdeb2f56d11cec6ecda80e9b41cec8 /libopie2 | |
parent | d6e8e6bf49bb176ec54efed5eb0d012098f056d7 (diff) | |
download | opie-95210ac41729a4c264e830963cdae3a4cdd218fb.zip opie-95210ac41729a4c264e830963cdae3a4cdd218fb.tar.gz opie-95210ac41729a4c264e830963cdae3a4cdd218fb.tar.bz2 |
add support for the Sharp SL-C3100 "Borzoi"
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 1 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 16 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.h | 2 |
3 files changed, 15 insertions, 4 deletions
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index 76cf97d..0eed1c9 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h @@ -81,12 +81,13 @@ enum OModel { Model_Zaurus_SLA300 = ( Model_Zaurus | 0x0003 ), Model_Zaurus_SLB600 = ( Model_Zaurus | 0x0004 ), Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x0005 ), Model_Zaurus_SL6000 = ( Model_Zaurus | 0x0006 ), Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x0007 ), Model_Zaurus_SLC1000 = ( Model_Zaurus | 0x0008 ), + Model_Zaurus_SLC3100 = ( Model_Zaurus | 0x0009 ), Model_SIMpad = ( 3 << 16 ), Model_SIMpad_All = ( Model_SIMpad | 0xffff ), Model_SIMpad_CL4 = ( Model_SIMpad | 0x0001 ), Model_SIMpad_SL4 = ( Model_SIMpad | 0x0002 ), diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index b7f3104..4a80a7e 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp @@ -1,10 +1,10 @@ /* This file is part of the Opie Project Copyright (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> - =. + =. Copyright (C) 2002-2005 Michael 'Mickey' Lauer <mickey@Vanille.de> .=l. .>+-= _;:, .> :=|. This program is free software; you can .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU Library General Public .="- .-=="i, .._ License as published by the Free Software @@ -221,12 +221,15 @@ void Zaurus::init(const QString& cpu_info) } else if ( model == "SHARP Spitz" ) { d->m_model = Model_Zaurus_SLC3000; d->m_modelstr = "Zaurus SL-C3000"; } else if ( model == "SHARP Akita" ) { d->m_model = Model_Zaurus_SLC1000; d->m_modelstr = "Zaurus SL-C1000"; + } else if ( model == "SHARP Borzoi" ) { + d->m_model = Model_Zaurus_SLC3100; + d->m_modelstr = "Zaurus SL-C3100"; } else { d->m_model = Model_Zaurus_SL5500; d->m_modelstr = "Unknown Zaurus"; } // set path to backlight device in kernel 2.6 @@ -247,12 +250,13 @@ void Zaurus::init(const QString& cpu_info) switch( d->m_model ) { case Model_Zaurus_SL6000: // fallthrough case Model_Zaurus_SLA300: d->m_rotation = Rot0; break; + case Model_Zaurus_SLC3100: // fallthrough case Model_Zaurus_SLC3000: // fallthrough case Model_Zaurus_SLC1000: // fallthrough case Model_Zaurus_SLC7x0: d->m_rotation = rotation(); d->m_direction = direction(); break; @@ -293,12 +297,13 @@ void Zaurus::initButtons() switch ( d->m_model ) { case Model_Zaurus_SL6000: pz_buttons = z_buttons_6000; buttoncount = ARRAY_SIZE(z_buttons_6000); break; + case Model_Zaurus_SLC3100: // fallthrough case Model_Zaurus_SLC3000: // fallthrough case Model_Zaurus_SLC1000: // fallthrough case Model_Zaurus_SLC7x0: if ( isQWS( ) ) { addPreHandler(this); // hinge-sensor-handler } @@ -546,12 +551,13 @@ bool Zaurus::setDisplayStatus( bool on ) Transformation Zaurus::rotation() const { qDebug( "Zaurus::rotation()" ); Transformation rot; switch ( d->m_model ) { + case Model_Zaurus_SLC3100: // fallthrough case Model_Zaurus_SLC3000: // fallthrough case Model_Zaurus_SLC1000: { OHingeStatus hs = readHingeSensor(); qDebug( "Zaurus::rotation() - hinge sensor = %d", (int) hs ); if ( hs == CASE_PORTRAIT ) rot = Rot0; @@ -595,12 +601,13 @@ Transformation Zaurus::rotation() const } ODirection Zaurus::direction() const { ODirection dir; switch ( d->m_model ) { + case Model_Zaurus_SLC3100: // fallthrough case Model_Zaurus_SLC3000: // fallthrough case Model_Zaurus_SLC1000: // fallthrough case Model_Zaurus_SLC7x0: { OHingeStatus hs = readHingeSensor(); if ( hs == CASE_PORTRAIT ) dir = CCW; else if ( hs == CASE_UNKNOWN ) dir = CCW; @@ -618,13 +625,16 @@ ODirection Zaurus::direction() const return dir; } bool Zaurus::hasHingeSensor() const { - return d->m_model == Model_Zaurus_SLC7x0 || d->m_model == Model_Zaurus_SLC3000 || d->m_model == Model_Zaurus_SLC1000; + return d->m_model == Model_Zaurus_SLC7x0 || + d->m_model == Model_Zaurus_SLC3100 || + d->m_model == Model_Zaurus_SLC3000 || + d->m_model == Model_Zaurus_SLC1000; } OHingeStatus Zaurus::readHingeSensor() const { if (m_embedix) { @@ -668,13 +678,13 @@ OHingeStatus Zaurus::readHingeSensor() const * I hope that is ok - Alwin */ bool Zaurus::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat ) { int newkeycode = keycode; - if (d->m_model != Model_Zaurus_SLC7x0 && d->m_model != Model_Zaurus_SLC3000 && d->m_model != Model_Zaurus_SLC1000) return false; + if ( !hasHingeSensor() ) return false; /* map cursor keys depending on the hinge status */ switch ( keycode ) { // Rotate cursor keys case Key_Left : case Key_Right: diff --git a/libopie2/opiecore/device/odevice_zaurus.h b/libopie2/opiecore/device/odevice_zaurus.h index 4314aff..677e29f 100644 --- a/libopie2/opiecore/device/odevice_zaurus.h +++ b/libopie2/opiecore/device/odevice_zaurus.h @@ -1,10 +1,10 @@ /* This file is part of the Opie Project Copyright (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> - =. + =. Copyright (C) 2002-2005 Michael 'Mickey' Lauer <mickey@Vanille.de> .=l. .>+-= _;:, .> :=|. This program is free software; you can .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU Library General Public .="- .-=="i, .._ License as published by the Free Software |