author | mickeyl <mickeyl> | 2005-01-10 14:58:14 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-01-10 14:58:14 (UTC) |
commit | 6e3873eab783661c1d476106f588f2dab961dd21 (patch) (side-by-side diff) | |
tree | 14cac38bca6da58545ce4a882f17bc4ad4b98228 | |
parent | 2e897183d1b9373cefaf19dfb272bf1e7bfe50c7 (diff) | |
download | opie-6e3873eab783661c1d476106f588f2dab961dd21.zip opie-6e3873eab783661c1d476106f588f2dab961dd21.tar.gz opie-6e3873eab783661c1d476106f588f2dab961dd21.tar.bz2 |
make the SL-C3000 (Sharp Spitz) known to ODevice
-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 @@ -81,4 +81,5 @@ enum OModel { Model_Zaurus_SLC7x0 = ( Model_Zaurus | 0x000005 ), Model_Zaurus_SL6000 = ( Model_Zaurus | 0x000006 ), + Model_Zaurus_SLC3000 = ( Model_Zaurus | 0x000007 ), Model_SIMpad = ( 3 << 24 ), 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 @@ -170,4 +170,7 @@ void Zaurus::init(const QString& cpu_info) d->m_model = Model_Zaurus_SLC7x0; 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" ) { d->m_model = Model_Zaurus_SLB600; @@ -179,7 +182,10 @@ void Zaurus::init(const QString& cpu_info) d->m_model = Model_Zaurus_SL6000; 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"; } @@ -190,4 +196,5 @@ void Zaurus::init(const QString& cpu_info) d->m_rotation = Rot0; break; + case Model_Zaurus_SLC3000: // fallthrough case Model_Zaurus_SLC7x0: d->m_rotation = rotation(); @@ -195,6 +202,6 @@ void Zaurus::init(const QString& cpu_info) break; case Model_Zaurus_SLB600: // fallthrough + case Model_Zaurus_SL5000: // fallthrough case Model_Zaurus_SL5500: // fallthrough - case Model_Zaurus_SL5000: default: d->m_rotation = Rot270; @@ -254,8 +261,7 @@ void Zaurus::buzzer( int sound ) Sound *snd = 0; - // 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 ) { switch ( sound ){ @@ -340,6 +346,10 @@ OLedState Zaurus::ledState ( OLed which ) const 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; + } static int fd = ::open ( "/dev/sharp_led", O_RDWR|O_NONBLOCK ); @@ -426,5 +436,5 @@ bool Zaurus::setDisplayBrightness( int bright ) else { - qDebug( "ODevice handling for non-embedix kernels not yet implemented" ); + qDebug( "Zaurus::setDisplayBrightness: ODevice handling for non-embedix kernels not yet implemented" ); } return res; @@ -446,5 +456,5 @@ bool Zaurus::setDisplayStatus( bool on ) else { - qDebug( "ODevice handling for non-embedix kernels not yet implemented" ); + qDebug( "Zaurus::setDisplayStatus: ODevice handling for non-embedix kernels not yet implemented" ); } return res; @@ -490,4 +500,5 @@ Transformation Zaurus::rotation() const switch ( d->m_model ) { + case Model_Zaurus_SLC3000: // fallthrough case Model_Zaurus_SLC7x0: handle = ::open("/dev/apm_bios", O_RDWR|O_NONBLOCK); @@ -504,6 +515,7 @@ 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: case Model_Zaurus_SL5000: @@ -521,4 +533,5 @@ ODirection Zaurus::direction() const int retval = 0; switch ( d->m_model ) { + case Model_Zaurus_SLC3000: // fallthrough case Model_Zaurus_SLC7x0: handle = ::open( "/dev/apm_bios", O_RDWR|O_NONBLOCK ); @@ -534,4 +547,5 @@ ODirection Zaurus::direction() const } break; + case Model_Zaurus_SL6000: case Model_Zaurus_SLA300: case Model_Zaurus_SLB600: @@ -555,5 +569,5 @@ int Zaurus::displayBrightnessResolution() const else { - qDebug( "ODevice handling for non-embedix kernels not yet implemented" ); + qDebug( "Zaurus::displayBrightnessResolution: ODevice handling for non-embedix kernels not yet implemented" ); return 1; } @@ -562,9 +576,11 @@ int Zaurus::displayBrightnessResolution() const bool Zaurus::hasHingeSensor() const { - return d->m_model == Model_Zaurus_SLC7x0; + return d->m_model == Model_Zaurus_SLC7x0 || d->m_model == Model_Zaurus_SLC3000; } OHingeStatus Zaurus::readHingeSensor() { + if (m_embedix) + { int handle = ::open("/dev/apm_bios", O_RDWR|O_NONBLOCK); if (handle == -1) @@ -589,2 +605,8 @@ 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 @@ -87,4 +87,5 @@ namespace Opie { namespace Core { namespace Internal { + class Zaurus : public ODevice { |