summaryrefslogtreecommitdiff
path: root/libopie2
Side-by-side diff
Diffstat (limited to 'libopie2') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice.h1
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp46
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.h1
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
@@ -80,6 +80,7 @@ enum OModel {
Model_Zaurus_SLB600 = ( Model_Zaurus | 0x000004 ),
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
@@ -169,6 +169,9 @@ void Zaurus::init(const QString& cpu_info)
} else if ( model == "SHARP Husky" ) {
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;
d->m_modelstr = "Zaurus SL-B500 or SL-5600";
@@ -178,9 +181,12 @@ void Zaurus::init(const QString& cpu_info)
} else if ( model == "SHARP Tosa" ) {
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";
}
// set initial rotation
@@ -189,13 +195,14 @@ void Zaurus::init(const QString& cpu_info)
case Model_Zaurus_SLA300:
d->m_rotation = Rot0;
break;
+ case Model_Zaurus_SLC3000: // fallthrough
case Model_Zaurus_SLC7x0:
d->m_rotation = rotation();
d->m_direction = direction();
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;
break;
@@ -253,10 +260,9 @@ void Zaurus::buzzer( int sound )
#ifndef QT_NO_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 ){
case SHARP_BUZ_TOUCHSOUND: {
@@ -339,8 +345,12 @@ 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 );
@@ -425,7 +435,7 @@ 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;
}
@@ -445,7 +455,7 @@ 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;
}
@@ -489,6 +499,7 @@ Transformation Zaurus::rotation() 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);
if (handle == -1) {
@@ -503,8 +514,9 @@ Transformation Zaurus::rotation() const
rot = Rot270;
}
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:
default:
@@ -520,6 +532,7 @@ ODirection Zaurus::direction() const
int handle = 0;
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 );
if (handle == -1) {
@@ -533,6 +546,7 @@ ODirection Zaurus::direction() const
dir = CW;
}
break;
+ case Model_Zaurus_SL6000:
case Model_Zaurus_SLA300:
case Model_Zaurus_SLB600:
case Model_Zaurus_SL5500:
@@ -554,18 +568,20 @@ 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;
}
}
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)
{
@@ -588,3 +604,9 @@ 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
@@ -86,6 +86,7 @@
namespace Opie {
namespace Core {
namespace Internal {
+
class Zaurus : public ODevice
{
protected: