author | mickeyl <mickeyl> | 2005-01-29 18:37:14 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-01-29 18:37:14 (UTC) |
commit | 3f25fb92b1dde002ea0c2a3aedffd3912054c380 (patch) (side-by-side diff) | |
tree | bb3b92f37236e516952c44fc31c16815505dd8f4 | |
parent | e6c61408933a3473f25f89d9ba58aceb0b2a2bee (diff) | |
download | opie-3f25fb92b1dde002ea0c2a3aedffd3912054c380.zip opie-3f25fb92b1dde002ea0c2a3aedffd3912054c380.tar.gz opie-3f25fb92b1dde002ea0c2a3aedffd3912054c380.tar.bz2 |
use FB_BLANK_UNBLANK and FB_BLANK_POWERDOWN for the 2.6 interface
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.h | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index 2128d46..59f1592 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp @@ -458,9 +458,9 @@ bool Zaurus::setDisplayStatus( bool on ) int fd = ::open( "/sys/class/backlight/corgi-bl/power", O_WRONLY|O_NONBLOCK ); if ( fd ) { char buf[10]; - buf[0] = on ? '1' : '0'; + buf[0] = on ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN; buf[1] = '\0'; res = ( ::write( fd, &buf[0], 2 ) == 0 ); ::close( fd ); } diff --git a/libopie2/opiecore/device/odevice_zaurus.h b/libopie2/opiecore/device/odevice_zaurus.h index 04e73c4..80593ce 100644 --- a/libopie2/opiecore/device/odevice_zaurus.h +++ b/libopie2/opiecore/device/odevice_zaurus.h @@ -74,16 +74,20 @@ #define APM_IOCGEVTSRC OD_IOR( 'A', 203, int ) #define APM_IOCSEVTSRC OD_IORW( 'A', 204, int ) #define APM_EVT_POWER_BUTTON (1 << 0) -// Brightness +// Brightness Embedix #define SHARP_FL_IOCTL_DEVICE "/dev/sharp_fl" #define SHARP_FL_IOCTL_ON 1 #define SHARP_FL_IOCTL_OFF 2 #define SHARP_FL_IOCTL_STEP_CONTRAST 100 #define SHARP_FL_IOCTL_GET_STEP_CONTRAST 101 #define SHARP_FL_IOCTL_GET_STEP 102 +// Vesa Standard +#define FB_BLANK_UNBLANK 0 +#define FB_BLANK_POWERDOWN 4 + namespace Opie { namespace Core { namespace Internal { |