-rw-r--r-- | libopie2/opiecore/device/odevice.h | 1 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 46 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.h | 1 |
3 files changed, 36 insertions, 12 deletions
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index 93d7d22..bbc32fa 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h @@ -82,2 +82,3 @@ enum OModel { Model_Zaurus_SL6000 = ( Model_Zaurus | 0x000006 ), + Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x000007 ), diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index fb23e1d..75a2fdc 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp @@ -171,2 +171,5 @@ void Zaurus::init(const QString& cpu_info) d->m_modelstr = "Zaurus SL-C760 or SL-C860"; + } else if ( model == "SHARP Boxer" ) { + d->m_model = Model_Zaurus_SLC7x0; + d->m_modelstr = "Zaurus SL-C760 or SL-C860"; } else if ( model == "SHARP Poodle" ) { @@ -180,5 +183,8 @@ void Zaurus::init(const QString& cpu_info) d->m_modelstr = "Zaurus SL-6000"; + } else if ( model == "SHARP Spitz" ) { + d->m_model = Model_Zaurus_SLC3000; + d->m_modelstr = "Zaurus SL-C3000"; } else { d->m_model = Model_Zaurus_SL5500; - d->m_modelstr = "Unkown Zaurus"; + d->m_modelstr = "Unknown Zaurus"; } @@ -191,2 +197,3 @@ void Zaurus::init(const QString& cpu_info) break; + case Model_Zaurus_SLC3000: // fallthrough case Model_Zaurus_SLC7x0: @@ -196,4 +203,4 @@ void Zaurus::init(const QString& cpu_info) case Model_Zaurus_SLB600: // fallthrough + case Model_Zaurus_SL5000: // fallthrough case Model_Zaurus_SL5500: // fallthrough - case Model_Zaurus_SL5000: default: @@ -255,6 +262,5 @@ void Zaurus::buzzer( int sound ) - // Not all devices have real sound - if ( d->m_model == Model_Zaurus_SLC7x0 - || d->m_model == Model_Zaurus_SLB600 - || d->m_model == Model_Zaurus_SL6000 ) { + // All devices except SL5500 have a DSP device + if ( d->m_model != Model_Zaurus_SL5000 + && d->m_model != Model_Zaurus_SL5500 ) { @@ -341,4 +347,8 @@ bool Zaurus::setLedState ( OLed which, OLedState st ) { - if (!m_embedix) // Currently not supported on non_embedix kernels + // Currently not supported on non_embedix kernels + if (!m_embedix) + { + qDebug( "Zaurus::setLedState: ODevice handling for non-embedix kernels not yet implemented" ); return false; + } @@ -427,3 +437,3 @@ bool Zaurus::setDisplayBrightness( int bright ) { - qDebug( "ODevice handling for non-embedix kernels not yet implemented" ); + qDebug( "Zaurus::setDisplayBrightness: ODevice handling for non-embedix kernels not yet implemented" ); } @@ -447,3 +457,3 @@ bool Zaurus::setDisplayStatus( bool on ) { - qDebug( "ODevice handling for non-embedix kernels not yet implemented" ); + qDebug( "Zaurus::setDisplayStatus: ODevice handling for non-embedix kernels not yet implemented" ); } @@ -491,2 +501,3 @@ Transformation Zaurus::rotation() const switch ( d->m_model ) { + case Model_Zaurus_SLC3000: // fallthrough case Model_Zaurus_SLC7x0: @@ -505,4 +516,5 @@ Transformation Zaurus::rotation() const break; - case Model_Zaurus_SLA300: + case Model_Zaurus_SL6000: case Model_Zaurus_SLB600: + case Model_Zaurus_SLA300: case Model_Zaurus_SL5500: @@ -522,2 +534,3 @@ ODirection Zaurus::direction() const switch ( d->m_model ) { + case Model_Zaurus_SLC3000: // fallthrough case Model_Zaurus_SLC7x0: @@ -535,2 +548,3 @@ ODirection Zaurus::direction() const break; + case Model_Zaurus_SL6000: case Model_Zaurus_SLA300: @@ -556,3 +570,3 @@ int Zaurus::displayBrightnessResolution() const { - qDebug( "ODevice handling for non-embedix kernels not yet implemented" ); + qDebug( "Zaurus::displayBrightnessResolution: ODevice handling for non-embedix kernels not yet implemented" ); return 1; @@ -563,3 +577,3 @@ bool Zaurus::hasHingeSensor() const { - return d->m_model == Model_Zaurus_SLC7x0; + return d->m_model == Model_Zaurus_SLC7x0 || d->m_model == Model_Zaurus_SLC3000; } @@ -568,2 +582,4 @@ OHingeStatus Zaurus::readHingeSensor() { + if (m_embedix) + { int handle = ::open("/dev/apm_bios", O_RDWR|O_NONBLOCK); @@ -590 +606,7 @@ OHingeStatus Zaurus::readHingeSensor() } + else + { + qDebug( "Zaurus::readHingeSensor: ODevice handling for non-embedix kernels not yet implemented" ); + return CASE_UNKNOWN; + } +} diff --git a/libopie2/opiecore/device/odevice_zaurus.h b/libopie2/opiecore/device/odevice_zaurus.h index 37ab876..ed9cf67 100644 --- a/libopie2/opiecore/device/odevice_zaurus.h +++ b/libopie2/opiecore/device/odevice_zaurus.h @@ -88,2 +88,3 @@ namespace Core { namespace Internal { + class Zaurus : public ODevice |