summaryrefslogtreecommitdiff
path: root/library/custom-sharp.h
authorsandman <sandman>2002-06-18 12:46:11 (UTC)
committer sandman <sandman>2002-06-18 12:46:11 (UTC)
commit61e2f9e5eb634b17ef480d79bdbcbc3a715990cb (patch) (unidiff)
tree013600ee0ababcc25f37ff98cede8f67cbdc9d2a /library/custom-sharp.h
parente21322ab34a8df36344eece685e604abe4f83fc6 (diff)
downloadopie-61e2f9e5eb634b17ef480d79bdbcbc3a715990cb.zip
opie-61e2f9e5eb634b17ef480d79bdbcbc3a715990cb.tar.gz
opie-61e2f9e5eb634b17ef480d79bdbcbc3a715990cb.tar.bz2
Moved platform specific things from custom-*.h #defines to virtual methods
in libopie/odevice.{h,cpp} Minor fix in Sound + reformating
Diffstat (limited to 'library/custom-sharp.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/custom-sharp.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/library/custom-sharp.h b/library/custom-sharp.h
index 08f8a6f..3dab34f 100644
--- a/library/custom-sharp.h
+++ b/library/custom-sharp.h
@@ -36,63 +36,10 @@
36#include <fcntl.h> 36#include <fcntl.h>
37#include <sys/ioctl.h> 37#include <sys/ioctl.h>
38 38
39#define SHARP_DEV_IOCTL_COMMAND_START 0x5680
40
41/* --- for SHARP_BUZZER device --- */
42#define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START)
43#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START)
44#define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1)
45#define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2)
46#define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3)
47#define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4)
48#define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5)
49
50#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */
51#define SHARP_BUZ_KEYSOUND 2 /* key sound */
52#define SHARP_PDA_ILLCLICKSOUND 3 /* illegal click */
53#define SHARP_PDA_WARNSOUND 4 /* warning occurred */
54#define SHARP_PDA_ERRORSOUND 5 /* error occurred */
55#define SHARP_PDA_CRITICALSOUND 6 /* critical error occurred */
56#define SHARP_PDA_SYSSTARTSOUND 7 /* system start */
57#define SHARP_PDA_SYSTEMENDSOUND 8 /* system shutdown */
58#define SHARP_PDA_APPSTART 9 /* application start */
59#define SHARP_PDA_APPQUIT 10 /* application ends */
60#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */
61#define SHARP_BUZ_DAILY_ALARM 12 /* daily alarm */
62#define SHARP_BUZ_GOT_PHONE_CALL 13 /* phone call sound */
63#define SHARP_BUZ_GOT_MAIL 14 /* mail sound */
64
65
66#define CUSTOM_BUZZER( sound ) \
67{ \
68 static int fd = open( "/dev/sharp_buz", O_RDWR|O_NONBLOCK ); \
69 ioctl( fd, SHARP_BUZZER_MAKESOUND, sound ); \
70}
71
72#define CUSTOM_SOUND_ALARM CUSTOM_BUZZER( SHARP_BUZ_SCHEDULE_ALARM )
73#define CUSTOM_SOUND_KEYCLICK CUSTOM_BUZZER( SHARP_BUZ_KEYSOUND )
74#define CUSTOM_SOUND_TOUCH CUSTOM_BUZZER( SHARP_BUZ_TOUCHSOUND )
75
76 39
77#include <sys/ioctl.h> 40#include <sys/ioctl.h>
78#include <asm/sharp_char.h> 41#include <asm/sharp_char.h>
79 42
80// a bit awkward, as this value is defined in emailclient.cpp aswell...
81#define LED_MAIL 0
82#define SHARP_LED_MAIL 9
83
84#define CUSTOM_LEDS( led, status ) \
85{ \
86 if ( led == LED_MAIL ) \
87 led = SHARP_LED_MAIL; \
88 static int fd = open( "/dev/sharp_led", O_RDWR|O_NONBLOCK ); \
89 sharp_led_status leds; \
90 memset(&leds, 0, sizeof(leds)); \
91 leds.which = led; \
92 leds.status = status; \
93 ioctl( fd, SHARP_LED_SETSTATUS, (char*)&leds ); \
94}
95
96#define QPE_HAVE_MEMALERTER 43#define QPE_HAVE_MEMALERTER
97 44
98#define QPE_MEMALERTER_IMPL \ 45#define QPE_MEMALERTER_IMPL \