summaryrefslogtreecommitdiff
path: root/libopie
Unidiff
Diffstat (limited to 'libopie') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 5038cc9..e24e043 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -1994,112 +1994,112 @@ bool Zaurus::suspend ( )
1994 // This is needed because the iPAQ apm implementation is asynchronous and we 1994 // This is needed because the iPAQ apm implementation is asynchronous and we
1995 // can not be sure when exactly the device is really suspended 1995 // can not be sure when exactly the device is really suspended
1996 // This can be deleted as soon as a stable familiar with a synchronous apm implementation exists. 1996 // This can be deleted as soon as a stable familiar with a synchronous apm implementation exists.
1997 1997
1998 if ( res ) { 1998 if ( res ) {
1999 do { // Yes, wait 15 seconds. This APM bug sucks big time. 1999 do { // Yes, wait 15 seconds. This APM bug sucks big time.
2000 ::usleep ( 200 * 1000 ); 2000 ::usleep ( 200 * 1000 );
2001 ::gettimeofday ( &tvn, 0 ); 2001 ::gettimeofday ( &tvn, 0 );
2002 } while ((( tvn. tv_sec - tvs. tv_sec ) * 1000 + ( tvn. tv_usec - tvs. tv_usec ) / 1000 ) < 15000 ); 2002 } while ((( tvn. tv_sec - tvs. tv_sec ) * 1000 + ( tvn. tv_usec - tvs. tv_usec ) / 1000 ) < 15000 );
2003 } 2003 }
2004 2004
2005 QCopEnvelope ( "QPE/Rotation", "rotateDefault()" ); 2005 QCopEnvelope ( "QPE/Rotation", "rotateDefault()" );
2006 return res; 2006 return res;
2007} 2007}
2008 2008
2009 2009
2010Transformation Zaurus::rotation ( ) const 2010Transformation Zaurus::rotation ( ) const
2011{ 2011{
2012 Transformation rot; 2012 Transformation rot;
2013 int handle = 0; 2013 int handle = 0;
2014 int retval = 0; 2014 int retval = 0;
2015 2015
2016 switch ( d-> m_model ) { 2016 switch ( d-> m_model ) {
2017 case Model_Zaurus_SLC7x0: 2017 case Model_Zaurus_SLC7x0:
2018 handle = ::open("/dev/apm_bios", O_RDWR|O_NONBLOCK); 2018 handle = ::open("/dev/apm_bios", O_RDWR|O_NONBLOCK);
2019 if (handle == -1) { 2019 if (handle == -1) {
2020 return Rot270; 2020 return Rot270;
2021 } else { 2021 } else {
2022 retval = ::ioctl(handle, SHARP_IOCTL_GET_ROTATION); 2022 retval = ::ioctl(handle, SHARP_IOCTL_GET_ROTATION);
2023 ::close (handle); 2023 ::close (handle);
2024 2024
2025 if (retval == 2 ) 2025 if (retval == 2 )
2026 rot = Rot0; 2026 rot = Rot0;
2027 else 2027 else
2028 rot = Rot270; 2028 rot = Rot270;
2029 } 2029 }
2030 break; 2030 break;
2031 case Model_Zaurus_SLA300: 2031 case Model_Zaurus_SLA300:
2032 case Model_Zaurus_SLB600: 2032 case Model_Zaurus_SLB600:
2033 case Model_Zaurus_SL5500: 2033 case Model_Zaurus_SL5500:
2034 case Model_Zaurus_SL5000: 2034 case Model_Zaurus_SL5000:
2035 default: 2035 default:
2036 rot = d-> m_rotation; 2036 rot = d-> m_rotation;
2037 break; 2037 break;
2038 } 2038 }
2039 2039
2040 return rot; 2040 return rot;
2041} 2041}
2042ODirection Zaurus::direction ( ) const 2042ODirection Zaurus::direction ( ) const
2043{ 2043{
2044 ODirection dir; 2044 ODirection dir;
2045 int handle = 0; 2045 int handle = 0;
2046 int retval = 0; 2046 int retval = 0;
2047 switch ( d-> m_model ) { 2047 switch ( d-> m_model ) {
2048 case Model_Zaurus_SLC7x0: 2048 case Model_Zaurus_SLC7x0:
2049 handle = ::open("/dev/apm_bios", O_RDWR|O_NONBLOCK); 2049 handle = ::open("/dev/apm_bios", O_RDWR|O_NONBLOCK);
2050 if (handle == -1) { 2050 if (handle == -1) {
2051 dir = Rot270; 2051 dir = CW;
2052 } else { 2052 } else {
2053 retval = ::ioctl(handle, SHARP_IOCTL_GET_ROTATION); 2053 retval = ::ioctl(handle, SHARP_IOCTL_GET_ROTATION);
2054 ::close (handle); 2054 ::close (handle);
2055 if (retval == 2 ) 2055 if (retval == 2 )
2056 dir = CCW; 2056 dir = CCW;
2057 else 2057 else
2058 dir = CW; 2058 dir = CW;
2059 } 2059 }
2060 break; 2060 break;
2061 case Model_Zaurus_SLA300: 2061 case Model_Zaurus_SLA300:
2062 case Model_Zaurus_SLB600: 2062 case Model_Zaurus_SLB600:
2063 case Model_Zaurus_SL5500: 2063 case Model_Zaurus_SL5500:
2064 case Model_Zaurus_SL5000: 2064 case Model_Zaurus_SL5000:
2065 default: 2065 default:
2066 dir = d-> m_direction; 2066 dir = d-> m_direction;
2067 break; 2067 break;
2068 } 2068 }
2069 return dir; 2069 return dir;
2070 2070
2071} 2071}
2072 2072
2073int Zaurus::displayBrightnessResolution ( ) const 2073int Zaurus::displayBrightnessResolution ( ) const
2074{ 2074{
2075 if (m_embedix) 2075 if (m_embedix)
2076 return 5; 2076 return 5;
2077 else 2077 else
2078 return 256; 2078 return 256;
2079} 2079}
2080 2080
2081/************************************************** 2081/**************************************************
2082 * 2082 *
2083 * SIMpad 2083 * SIMpad
2084 * 2084 *
2085 **************************************************/ 2085 **************************************************/
2086 2086
2087void SIMpad::init ( ) 2087void SIMpad::init ( )
2088{ 2088{
2089 d-> m_vendorstr = "SIEMENS"; 2089 d-> m_vendorstr = "SIEMENS";
2090 d-> m_vendor = Vendor_SIEMENS; 2090 d-> m_vendor = Vendor_SIEMENS;
2091 2091
2092 QFile f ( "/proc/hal/model" ); 2092 QFile f ( "/proc/hal/model" );
2093 2093
2094 //TODO Implement model checking 2094 //TODO Implement model checking
2095 //FIXME For now we assume an SL4 2095 //FIXME For now we assume an SL4
2096 2096
2097 d-> m_modelstr = "SL4"; 2097 d-> m_modelstr = "SL4";
2098 d-> m_model = Model_SIMpad_SL4; 2098 d-> m_model = Model_SIMpad_SL4;
2099 2099
2100 switch ( d-> m_model ) { 2100 switch ( d-> m_model ) {
2101 default: 2101 default:
2102 d-> m_rotation = Rot0; 2102 d-> m_rotation = Rot0;
2103 d-> m_direction = CCW; 2103 d-> m_direction = CCW;
2104 d-> m_holdtime = 1000; // 1000ms 2104 d-> m_holdtime = 1000; // 1000ms
2105 2105