author | llornkcor <llornkcor> | 2002-04-24 19:37:47 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-04-24 19:37:47 (UTC) |
commit | feaa245515b0746f6f70f590411c38e0a54c88ee (patch) (unidiff) | |
tree | 352ab6e61ea8e773d9f08f77db0ca36984c62c1d | |
parent | 17eb865ad8248b1f47c565b074b9b6bbbd44935b (diff) | |
download | opie-feaa245515b0746f6f70f590411c38e0a54c88ee.zip opie-feaa245515b0746f6f70f590411c38e0a54c88ee.tar.gz opie-feaa245515b0746f6f70f590411c38e0a54c88ee.tar.bz2 |
enable keyclicks and touchsound on zaurus
-rw-r--r-- | library/custom-sharp.h | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/library/custom-sharp.h b/library/custom-sharp.h index f65d474..08f8a6f 100644 --- a/library/custom-sharp.h +++ b/library/custom-sharp.h | |||
@@ -41,3 +41,3 @@ | |||
41 | /* --- for SHARP_BUZZER device --- */ | 41 | /* --- for SHARP_BUZZER device --- */ |
42 | #defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) | 42 | #define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) |
43 | #define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) | 43 | #define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) |
@@ -72,2 +72,5 @@ | |||
72 | #define CUSTOM_SOUND_ALARM CUSTOM_BUZZER( SHARP_BUZ_SCHEDULE_ALARM ) | 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 | |||
73 | 76 | ||
@@ -99,10 +102,10 @@ static void sig_handler(int sig) \ | |||
99 | case SIGHUP: \ | 102 | case SIGHUP: \ |
100 | memstate = VeryLow; \ | 103 | memstate = VeryLow; \ |
101 | break; \ | 104 | break; \ |
102 | case SIGUSR1: \ | 105 | case SIGUSR1: \ |
103 | memstate = Normal; \ | 106 | memstate = Normal; \ |
104 | break; \ | 107 | break; \ |
105 | case SIGUSR2: \ | 108 | case SIGUSR2: \ |
106 | memstate = Low; \ | 109 | memstate = Low; \ |
107 | break; \ | 110 | break; \ |
108 | } \ | 111 | } \ |
@@ -116,9 +119,9 @@ static void initMemalerter() \ | |||
116 | if (sigaction(SIGHUP, &sa, NULL) < 0) { \ | 119 | if (sigaction(SIGHUP, &sa, NULL) < 0) { \ |
117 | return; \ | 120 | return; \ |
118 | } \ | 121 | } \ |
119 | if (sigaction(SIGUSR1, &sa, NULL) < 0) { \ | 122 | if (sigaction(SIGUSR1, &sa, NULL) < 0) { \ |
120 | return; \ | 123 | return; \ |
121 | } \ | 124 | } \ |
122 | if (sigaction(SIGUSR2, &sa, NULL) < 0) { \ | 125 | if (sigaction(SIGUSR2, &sa, NULL) < 0) { \ |
123 | return; \ | 126 | return; \ |
124 | } \ | 127 | } \ |
@@ -138,8 +141,8 @@ static void initMemalerter() \ | |||
138 | if( dev >= 0 ) { \ | 141 | if( dev >= 0 ) { \ |
139 | memset(&st, 0, sizeof(st)); \ | 142 | memset(&st, 0, sizeof(st)); \ |
140 | st.which = 3; \ | 143 | st.which = 3; \ |
141 | int ret = ioctl(dev, SHARP_KBDCTL_GETMODIFSTAT, (char*)&st); \ | 144 | int ret = ioctl(dev, SHARP_KBDCTL_GETMODIFSTAT, (char*)&st); \ |
142 | if( !ret ) \ | 145 | if( !ret ) \ |
143 | numLock = (bool)st.stat; \ | 146 | numLock = (bool)st.stat; \ |
144 | ::close(dev); \ | 147 | ::close(dev); \ |
145 | } \ | 148 | } \ |