author | mickeyl <mickeyl> | 2005-01-01 17:34:32 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-01-01 17:34:32 (UTC) |
commit | a62cf9bfb9814a6f5ce5aa8d59fbe5b0cfb8414a (patch) (unidiff) | |
tree | ce7f0961815c32782c92009efc197a606b0ab86b /libopie2/opiecore/device/odevice_zaurus.h | |
parent | 8467a23d6a7f4b52619b60462c8ba80d8a736a9e (diff) | |
download | opie-a62cf9bfb9814a6f5ce5aa8d59fbe5b0cfb8414a.zip opie-a62cf9bfb9814a6f5ce5aa8d59fbe5b0cfb8414a.tar.gz opie-a62cf9bfb9814a6f5ce5aa8d59fbe5b0cfb8414a.tar.bz2 |
clean up a bit and start w/ introducing SL-6000 support
Diffstat (limited to 'libopie2/opiecore/device/odevice_zaurus.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.h | 47 |
1 files changed, 43 insertions, 4 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.h b/libopie2/opiecore/device/odevice_zaurus.h index 76a40d6..dc21546 100644 --- a/libopie2/opiecore/device/odevice_zaurus.h +++ b/libopie2/opiecore/device/odevice_zaurus.h | |||
@@ -1,10 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) The Opie Team <opie-devel@handhelds.org> | 3 | Copyright (C) The Opie Team <opie-devel@handhelds.org> |
4 | =. | 4 | =. Copyright (C) 2003-2005 Michael 'Mickey' Lauer <mickey@Vanille.de> |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
@@ -34,27 +34,66 @@ | |||
34 | 34 | ||
35 | #ifndef ARRAY_SIZE | 35 | #ifndef ARRAY_SIZE |
36 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | 36 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | // _IO and friends are only defined in kernel headers ... | 39 | // _IO and friends are only defined in kernel headers ... |
40 | |||
41 | #define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) | 40 | #define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) |
42 | |||
43 | #define OD_IO(type,number) OD_IOC(0,type,number,0) | 41 | #define OD_IO(type,number) OD_IOC(0,type,number,0) |
44 | #define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) | 42 | #define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) |
45 | #define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) | 43 | #define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) |
46 | #define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) | 44 | #define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) |
47 | 45 | ||
46 | // Audio | ||
47 | #define SHARP_DEV_IOCTL_COMMAND_START 0x5680 | ||
48 | |||
49 | #define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) | ||
50 | #define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) | ||
51 | |||
52 | #define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ | ||
53 | #define SHARP_BUZ_KEYSOUND 2 /* key sound */ | ||
54 | #define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ | ||
55 | |||
56 | #define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1) | ||
57 | #define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2) | ||
58 | #define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3) | ||
59 | #define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4) | ||
60 | #define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5) | ||
61 | |||
62 | // LED | ||
63 | #define SHARP_LED_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) | ||
64 | #define SHARP_LED_SETSTATUS (SHARP_LED_IOCTL_START+1) | ||
65 | #define SHARP_LED_MAIL_EXISTS 9 /* mail status (exists or not) */ | ||
66 | |||
67 | #define LED_MAIL_NO_UNREAD_MAIL 0 /* for SHARP_LED_MAIL_EXISTS */ | ||
68 | #define LED_MAIL_NEWMAIL_EXISTS 1 /* for SHARP_LED_MAIL_EXISTS */ | ||
69 | #define LED_MAIL_UNREAD_MAIL_EX 2 /* for SHARP_LED_MAIL_EXISTS */ | ||
70 | |||
71 | // Rotation and Power Management | ||
72 | #define SHARP_IOCTL_GET_ROTATION 0x413c | ||
73 | |||
74 | #define APM_IOCGEVTSRC OD_IOR( 'A', 203, int ) | ||
75 | #define APM_IOCSEVTSRC OD_IORW( 'A', 204, int ) | ||
76 | #define APM_EVT_POWER_BUTTON (1 << 0) | ||
77 | |||
78 | // Brightness | ||
79 | #define FL_IOCTL_STEP_CONTRAST 100 | ||
80 | |||
81 | #define CORGI_TOSA_BL_IOCTL_ON 1 | ||
82 | #define CORGI_TOSA_BL_IOCTL_OFF 2 | ||
83 | #define CORGI_TOSA_BL_IOCTL_STEP_CONTRAST 100 | ||
84 | #define CORGI_TOSA_BL_IOCTL_GET_STEP_CONTRAST 101 | ||
85 | #define CORGI_TOSA_BL_IOCTL_GET_STEP 102 | ||
86 | #define CORGI_BL_PROC_DEVICE corgi-bl | ||
87 | #define TOSA_BL_PROC_DEVICE tosa-bl | ||
48 | 88 | ||
49 | namespace Opie { | 89 | namespace Opie { |
50 | namespace Core { | 90 | namespace Core { |
51 | namespace Internal { | 91 | namespace Internal { |
52 | class Zaurus : public ODevice | 92 | class Zaurus : public ODevice |
53 | { | 93 | { |
54 | |||
55 | protected: | 94 | protected: |
56 | virtual void init(const QString&); | 95 | virtual void init(const QString&); |
57 | virtual void initButtons(); | 96 | virtual void initButtons(); |
58 | 97 | ||
59 | public: | 98 | public: |
60 | virtual bool setSoftSuspend ( bool soft ); | 99 | virtual bool setSoftSuspend ( bool soft ); |