summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 9871e80..3bc1e0c 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -504,102 +504,110 @@ bool ODeviceIPAQ::setDisplayBrightness ( int bright )
if ( bright < 0 )
bright = 0;
// 128 is the maximum if you want a decent lifetime for the LCD
bright = (int) (( ::pow ( 2, double( bright ) / 255.0 ) - 1 ) * 128.0 ); // logarithmic
// bright = ( bright + 1 ) / 2;
if ((( fd = ::open ( "/dev/ts", O_WRONLY )) >= 0 ) ||
(( fd = ::open ( "/dev/h3600_ts", O_WRONLY )) >= 0 )) {
FLITE_IN bl;
bl. mode = 1;
bl. pwr = bright ? 1 : 0;
bl. brightness = bright;
res = ( ::ioctl ( fd, FLITE_ON, &bl ) == 0 );
::close ( fd );
}
return res;
}
int ODeviceIPAQ::displayBrightnessResolution ( ) const
{
return 255; // really 128, but logarithmic control is smoother this way
}
/**************************************************
*
* Zaurus
*
**************************************************/
void ODeviceZaurus::init ( )
{
d-> m_modelstr = "Zaurus SL5000";
d-> m_model = OMODEL_Zaurus_SL5000;
d-> m_vendorstr = "Sharp";
d-> m_vendor = OVENDOR_Sharp;
QFile f ( "/proc/filesystems" );
if ( f. open ( IO_ReadOnly ) && ( QTextStream ( &f ). read ( ). find ( "\tjffs2\n" ) >= 0 )) {
d-> m_systemstr = "OpenZaurus";
d-> m_system = OSYSTEM_OpenZaurus;
f. close ( );
+
+ f. setName ( "/etc/oz_version" );
+ if ( f. open ( IO_ReadOnly )) {
+ QTextStream ts ( &f );
+ d-> m_sysverstr = ts. readLine ( ). mid ( 10 );
+ f. close ( );
+ }
}
else {
d-> m_systemstr = "Zaurus";
d-> m_system = OSYSTEM_Zaurus;
}
+
d-> m_leds [0] = OLED_Off;
}
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
//#include <asm/sharp_char.h> // including kernel headers is evil ...
#define SHARP_DEV_IOCTL_COMMAND_START 0x5680
#define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START)
#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START)
#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */
#define SHARP_BUZ_KEYSOUND 2 /* key sound */
#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */
/* --- for SHARP_BUZZER device --- */
//#define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START)
//#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START)
#define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1)
#define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2)
#define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3)
#define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4)
#define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5)
//#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */
//#define SHARP_BUZ_KEYSOUND 2 /* key sound */
//#define SHARP_PDA_ILLCLICKSOUND 3 /* illegal click */
//#define SHARP_PDA_WARNSOUND 4 /* warning occurred */
//#define SHARP_PDA_ERRORSOUND 5 /* error occurred */
//#define SHARP_PDA_CRITICALSOUND 6 /* critical error occurred */
//#define SHARP_PDA_SYSSTARTSOUND 7 /* system start */
//#define SHARP_PDA_SYSTEMENDSOUND 8 /* system shutdown */
//#define SHARP_PDA_APPSTART 9 /* application start */
//#define SHARP_PDA_APPQUIT 10 /* application ends */
//#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */
//#define SHARP_BUZ_DAILY_ALARM 12 /* daily alarm */
//#define SHARP_BUZ_GOT_PHONE_CALL 13 /* phone call sound */
//#define SHARP_BUZ_GOT_MAIL 14 /* mail sound */
//
#define SHARP_LED_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START)