-rw-r--r-- | libopie/odevice.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 29c8ad2..713cc90 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp | |||
@@ -1021,259 +1021,271 @@ bool iPAQ::setDisplayBrightness ( int bright ) | |||
1021 | bright = 255; | 1021 | bright = 255; |
1022 | if ( bright < 0 ) | 1022 | if ( bright < 0 ) |
1023 | bright = 0; | 1023 | bright = 0; |
1024 | 1024 | ||
1025 | if (( fd = ::open ( "/dev/touchscreen/0", O_WRONLY )) >= 0 ) { | 1025 | if (( fd = ::open ( "/dev/touchscreen/0", O_WRONLY )) >= 0 ) { |
1026 | FLITE_IN bl; | 1026 | FLITE_IN bl; |
1027 | bl. mode = 1; | 1027 | bl. mode = 1; |
1028 | bl. pwr = bright ? 1 : 0; | 1028 | bl. pwr = bright ? 1 : 0; |
1029 | bl. brightness = ( bright * ( displayBrightnessResolution ( ) - 1 ) + 127 ) / 255; | 1029 | bl. brightness = ( bright * ( displayBrightnessResolution ( ) - 1 ) + 127 ) / 255; |
1030 | res = ( ::ioctl ( fd, FLITE_ON, &bl ) == 0 ); | 1030 | res = ( ::ioctl ( fd, FLITE_ON, &bl ) == 0 ); |
1031 | ::close ( fd ); | 1031 | ::close ( fd ); |
1032 | } | 1032 | } |
1033 | return res; | 1033 | return res; |
1034 | } | 1034 | } |
1035 | 1035 | ||
1036 | int iPAQ::displayBrightnessResolution ( ) const | 1036 | int iPAQ::displayBrightnessResolution ( ) const |
1037 | { | 1037 | { |
1038 | switch ( model ( )) { | 1038 | switch ( model ( )) { |
1039 | case Model_iPAQ_H31xx: | 1039 | case Model_iPAQ_H31xx: |
1040 | case Model_iPAQ_H36xx: | 1040 | case Model_iPAQ_H36xx: |
1041 | case Model_iPAQ_H37xx: | 1041 | case Model_iPAQ_H37xx: |
1042 | return 128; // really 256, but >128 could damage the LCD | 1042 | return 128; // really 256, but >128 could damage the LCD |
1043 | 1043 | ||
1044 | case Model_iPAQ_H38xx: | 1044 | case Model_iPAQ_H38xx: |
1045 | case Model_iPAQ_H39xx: | 1045 | case Model_iPAQ_H39xx: |
1046 | return 64; | 1046 | return 64; |
1047 | 1047 | ||
1048 | default: | 1048 | default: |
1049 | return 2; | 1049 | return 2; |
1050 | } | 1050 | } |
1051 | } | 1051 | } |
1052 | 1052 | ||
1053 | 1053 | ||
1054 | bool iPAQ::hasLightSensor ( ) const | 1054 | bool iPAQ::hasLightSensor ( ) const |
1055 | { | 1055 | { |
1056 | return true; | 1056 | return true; |
1057 | } | 1057 | } |
1058 | 1058 | ||
1059 | int iPAQ::readLightSensor ( ) | 1059 | int iPAQ::readLightSensor ( ) |
1060 | { | 1060 | { |
1061 | int fd; | 1061 | int fd; |
1062 | int val = -1; | 1062 | int val = -1; |
1063 | 1063 | ||
1064 | if (( fd = ::open ( "/proc/hal/light_sensor", O_RDONLY )) >= 0 ) { | 1064 | if (( fd = ::open ( "/proc/hal/light_sensor", O_RDONLY )) >= 0 ) { |
1065 | char buffer [8]; | 1065 | char buffer [8]; |
1066 | 1066 | ||
1067 | if ( ::read ( fd, buffer, 5 ) == 5 ) { | 1067 | if ( ::read ( fd, buffer, 5 ) == 5 ) { |
1068 | char *endptr; | 1068 | char *endptr; |
1069 | 1069 | ||
1070 | buffer [4] = 0; | 1070 | buffer [4] = 0; |
1071 | val = ::strtol ( buffer + 2, &endptr, 16 ); | 1071 | val = ::strtol ( buffer + 2, &endptr, 16 ); |
1072 | 1072 | ||
1073 | if ( *endptr != 0 ) | 1073 | if ( *endptr != 0 ) |
1074 | val = -1; | 1074 | val = -1; |
1075 | } | 1075 | } |
1076 | ::close ( fd ); | 1076 | ::close ( fd ); |
1077 | } | 1077 | } |
1078 | 1078 | ||
1079 | return val; | 1079 | return val; |
1080 | } | 1080 | } |
1081 | 1081 | ||
1082 | int iPAQ::lightSensorResolution ( ) const | 1082 | int iPAQ::lightSensorResolution ( ) const |
1083 | { | 1083 | { |
1084 | return 256; | 1084 | return 256; |
1085 | } | 1085 | } |
1086 | 1086 | ||
1087 | /************************************************** | 1087 | /************************************************** |
1088 | * | 1088 | * |
1089 | * Zaurus | 1089 | * Zaurus |
1090 | * | 1090 | * |
1091 | **************************************************/ | 1091 | **************************************************/ |
1092 | 1092 | ||
1093 | 1093 | ||
1094 | 1094 | ||
1095 | void Zaurus::init ( ) | 1095 | void Zaurus::init ( ) |
1096 | { | 1096 | { |
1097 | d-> m_vendorstr = "Sharp"; | 1097 | d-> m_vendorstr = "Sharp"; |
1098 | d-> m_vendor = Vendor_Sharp; | 1098 | d-> m_vendor = Vendor_Sharp; |
1099 | 1099 | ||
1100 | QFile f ( "/proc/filesystems" ); | 1100 | QFile f ( "/proc/filesystems" ); |
1101 | 1101 | ||
1102 | if ( f. open ( IO_ReadOnly ) && ( QTextStream ( &f ). read ( ). find ( "\tjffs2\n" ) >= 0 )) { | 1102 | if ( f. open ( IO_ReadOnly ) && ( QTextStream ( &f ). read ( ). find ( "\tjffs2\n" ) >= 0 )) { |
1103 | d-> m_vendorstr = "OpenZaurus Team"; | 1103 | d-> m_vendorstr = "OpenZaurus Team"; |
1104 | d-> m_systemstr = "OpenZaurus"; | 1104 | d-> m_systemstr = "OpenZaurus"; |
1105 | d-> m_system = System_OpenZaurus; | 1105 | d-> m_system = System_OpenZaurus; |
1106 | 1106 | ||
1107 | f. close ( ); | 1107 | f. close ( ); |
1108 | 1108 | ||
1109 | f. setName ( "/etc/oz_version" ); | 1109 | f. setName ( "/etc/oz_version" ); |
1110 | if ( f. open ( IO_ReadOnly )) { | 1110 | if ( f. open ( IO_ReadOnly )) { |
1111 | QTextStream ts ( &f ); | 1111 | QTextStream ts ( &f ); |
1112 | d-> m_sysverstr = ts. readLine ( );//. mid ( 10 ); | 1112 | d-> m_sysverstr = ts. readLine ( );//. mid ( 10 ); |
1113 | f. close ( ); | 1113 | f. close ( ); |
1114 | } | 1114 | } |
1115 | } | 1115 | } |
1116 | else { | 1116 | else { |
1117 | d-> m_systemstr = "Zaurus"; | 1117 | d-> m_systemstr = "Zaurus"; |
1118 | d-> m_system = System_Zaurus; | 1118 | d-> m_system = System_Zaurus; |
1119 | } | 1119 | } |
1120 | 1120 | ||
1121 | f. setName ( "/proc/deviceinfo/product" ); | 1121 | f. setName ( "/proc/deviceinfo/product" ); |
1122 | if ( f. open ( IO_ReadOnly ) ) { | 1122 | if ( f. open ( IO_ReadOnly ) ) { |
1123 | QTextStream ts ( &f ); | 1123 | QTextStream ts ( &f ); |
1124 | QString model = ts. readLine ( ); | 1124 | QString model = ts. readLine ( ); |
1125 | f. close ( ); | 1125 | f. close ( ); |
1126 | 1126 | ||
1127 | d-> m_modelstr = QString("Zaurus ") + model; | 1127 | d-> m_modelstr = QString("Zaurus ") + model; |
1128 | if ( model == "SL-5500" ) | 1128 | if ( model == "SL-5500" ) |
1129 | d-> m_model = Model_Zaurus_SL5500; | 1129 | d-> m_model = Model_Zaurus_SL5500; |
1130 | else if ( model == "SL-C700" ) | 1130 | else if ( model == "SL-C700" ) |
1131 | d-> m_model = Model_Zaurus_SLC700; | 1131 | d-> m_model = Model_Zaurus_SLC700; |
1132 | else if ( model == "SL-A300" ) | 1132 | else if ( model == "SL-A300" ) |
1133 | d-> m_model = Model_Zaurus_SLA300; | 1133 | d-> m_model = Model_Zaurus_SLA300; |
1134 | else if ( model == "SL-B600" || model == "SL-5600" ) | 1134 | else if ( model == "SL-B600" || model == "SL-5600" ) |
1135 | d-> m_model = Model_Zaurus_SLB600; | 1135 | d-> m_model = Model_Zaurus_SLB600; |
1136 | else | 1136 | else |
1137 | d-> m_model = Model_Zaurus_SL5000; | 1137 | d-> m_model = Model_Zaurus_SL5000; |
1138 | } | 1138 | } |
1139 | else { | 1139 | else { |
1140 | d-> m_model = Model_Zaurus_SL5000; | 1140 | d-> m_model = Model_Zaurus_SL5000; |
1141 | d-> m_modelstr = "Zaurus (model unknown)"; | 1141 | d-> m_modelstr = "Zaurus (model unknown)"; |
1142 | } | 1142 | } |
1143 | 1143 | ||
1144 | switch ( d-> m_model ) { | 1144 | switch ( d-> m_model ) { |
1145 | case Model_Zaurus_SLA300: | 1145 | case Model_Zaurus_SLA300: |
1146 | d-> m_rotation = Rot0; | 1146 | d-> m_rotation = Rot0; |
1147 | break; | 1147 | break; |
1148 | case Model_Zaurus_SLC700: | 1148 | case Model_Zaurus_SLC700: |
1149 | /* note for C700, we must check the display rotation | 1149 | bool flipstate = false; |
1150 | * sensor to set an appropriate value | 1150 | // Note: need to 1) set flipstate based on physical screen orientation |
1151 | */ | 1151 | // and 2) check to see if the user overrode the rotation direction |
1152 | // using appearance, and if so, remove that item from the Config to | ||
1153 | // ensure the rotate applet flips us back to the previous state. | ||
1154 | if ( flipstate ) { | ||
1155 | // 480x640 | ||
1156 | d-> m_rotation = Rot0; | ||
1157 | d-> m_direction = CW; | ||
1158 | } else { | ||
1159 | // 640x480 | ||
1160 | d-> m_rotation = Rot270; | ||
1161 | d-> m_direction = CCW; | ||
1162 | } | ||
1163 | break; | ||
1152 | case Model_Zaurus_SLB600: | 1164 | case Model_Zaurus_SLB600: |
1153 | case Model_Zaurus_SL5500: | 1165 | case Model_Zaurus_SL5500: |
1154 | case Model_Zaurus_SL5000: | 1166 | case Model_Zaurus_SL5000: |
1155 | default: | 1167 | default: |
1156 | d-> m_rotation = Rot270; | 1168 | d-> m_rotation = Rot270; |
1157 | break; | 1169 | break; |
1158 | } | 1170 | } |
1159 | m_leds [0] = Led_Off; | 1171 | m_leds [0] = Led_Off; |
1160 | } | 1172 | } |
1161 | 1173 | ||
1162 | void Zaurus::initButtons ( ) | 1174 | void Zaurus::initButtons ( ) |
1163 | { | 1175 | { |
1164 | if ( d-> m_buttons ) | 1176 | if ( d-> m_buttons ) |
1165 | return; | 1177 | return; |
1166 | 1178 | ||
1167 | d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false; | 1179 | d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false; |
1168 | 1180 | ||
1169 | d-> m_buttons = new QValueList <ODeviceButton>; | 1181 | d-> m_buttons = new QValueList <ODeviceButton>; |
1170 | 1182 | ||
1171 | for ( uint i = 0; i < ( sizeof( z_buttons ) / sizeof( z_button )); i++ ) { | 1183 | for ( uint i = 0; i < ( sizeof( z_buttons ) / sizeof( z_button )); i++ ) { |
1172 | z_button *zb = z_buttons + i; | 1184 | z_button *zb = z_buttons + i; |
1173 | ODeviceButton b; | 1185 | ODeviceButton b; |
1174 | 1186 | ||
1175 | b. setKeycode ( zb-> code ); | 1187 | b. setKeycode ( zb-> code ); |
1176 | b. setUserText ( QObject::tr ( "Button", zb-> utext )); | 1188 | b. setUserText ( QObject::tr ( "Button", zb-> utext )); |
1177 | b. setPixmap ( Resource::loadPixmap ( zb-> pix )); | 1189 | b. setPixmap ( Resource::loadPixmap ( zb-> pix )); |
1178 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( zb-> fpressedservice ), zb-> fpressedaction )); | 1190 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( zb-> fpressedservice ), zb-> fpressedaction )); |
1179 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( zb-> fheldservice ), zb-> fheldaction )); | 1191 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( zb-> fheldservice ), zb-> fheldaction )); |
1180 | 1192 | ||
1181 | d-> m_buttons-> append ( b ); | 1193 | d-> m_buttons-> append ( b ); |
1182 | } | 1194 | } |
1183 | 1195 | ||
1184 | reloadButtonMapping ( ); | 1196 | reloadButtonMapping ( ); |
1185 | 1197 | ||
1186 | QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); | 1198 | QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); |
1187 | connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); | 1199 | connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); |
1188 | } | 1200 | } |
1189 | 1201 | ||
1190 | #include <unistd.h> | 1202 | #include <unistd.h> |
1191 | #include <fcntl.h> | 1203 | #include <fcntl.h> |
1192 | #include <sys/ioctl.h> | 1204 | #include <sys/ioctl.h> |
1193 | 1205 | ||
1194 | //#include <asm/sharp_char.h> // including kernel headers is evil ... | 1206 | //#include <asm/sharp_char.h> // including kernel headers is evil ... |
1195 | 1207 | ||
1196 | #define SHARP_DEV_IOCTL_COMMAND_START 0x5680 | 1208 | #define SHARP_DEV_IOCTL_COMMAND_START 0x5680 |
1197 | 1209 | ||
1198 | #defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) | 1210 | #defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) |
1199 | #define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) | 1211 | #define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) |
1200 | 1212 | ||
1201 | #define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ | 1213 | #define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ |
1202 | #define SHARP_BUZ_KEYSOUND 2 /* key sound */ | 1214 | #define SHARP_BUZ_KEYSOUND 2 /* key sound */ |
1203 | #define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ | 1215 | #define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ |
1204 | 1216 | ||
1205 | /* --- for SHARP_BUZZER device --- */ | 1217 | /* --- for SHARP_BUZZER device --- */ |
1206 | 1218 | ||
1207 | //#defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) | 1219 | //#defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) |
1208 | //#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) | 1220 | //#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) |
1209 | 1221 | ||
1210 | #define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1) | 1222 | #define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1) |
1211 | #define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2) | 1223 | #define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2) |
1212 | #define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3) | 1224 | #define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3) |
1213 | #define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4) | 1225 | #define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4) |
1214 | #define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5) | 1226 | #define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5) |
1215 | 1227 | ||
1216 | //#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ | 1228 | //#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ |
1217 | //#define SHARP_BUZ_KEYSOUND 2 /* key sound */ | 1229 | //#define SHARP_BUZ_KEYSOUND 2 /* key sound */ |
1218 | 1230 | ||
1219 | //#define SHARP_PDA_ILLCLICKSOUND 3 /* illegal click */ | 1231 | //#define SHARP_PDA_ILLCLICKSOUND 3 /* illegal click */ |
1220 | //#define SHARP_PDA_WARNSOUND 4 /* warning occurred */ | 1232 | //#define SHARP_PDA_WARNSOUND 4 /* warning occurred */ |
1221 | //#define SHARP_PDA_ERRORSOUND 5 /* error occurred */ | 1233 | //#define SHARP_PDA_ERRORSOUND 5 /* error occurred */ |
1222 | //#define SHARP_PDA_CRITICALSOUND 6 /* critical error occurred */ | 1234 | //#define SHARP_PDA_CRITICALSOUND 6 /* critical error occurred */ |
1223 | //#define SHARP_PDA_SYSSTARTSOUND 7 /* system start */ | 1235 | //#define SHARP_PDA_SYSSTARTSOUND 7 /* system start */ |
1224 | //#define SHARP_PDA_SYSTEMENDSOUND 8 /* system shutdown */ | 1236 | //#define SHARP_PDA_SYSTEMENDSOUND 8 /* system shutdown */ |
1225 | //#define SHARP_PDA_APPSTART 9 /* application start */ | 1237 | //#define SHARP_PDA_APPSTART 9 /* application start */ |
1226 | //#define SHARP_PDA_APPQUIT 10 /* application ends */ | 1238 | //#define SHARP_PDA_APPQUIT 10 /* application ends */ |
1227 | 1239 | ||
1228 | //#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ | 1240 | //#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ |
1229 | //#define SHARP_BUZ_DAILY_ALARM 12 /* daily alarm */ | 1241 | //#define SHARP_BUZ_DAILY_ALARM 12 /* daily alarm */ |
1230 | //#define SHARP_BUZ_GOT_PHONE_CALL 13 /* phone call sound */ | 1242 | //#define SHARP_BUZ_GOT_PHONE_CALL 13 /* phone call sound */ |
1231 | //#define SHARP_BUZ_GOT_MAIL 14 /* mail sound */ | 1243 | //#define SHARP_BUZ_GOT_MAIL 14 /* mail sound */ |
1232 | // | 1244 | // |
1233 | 1245 | ||
1234 | #defineSHARP_LED_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) | 1246 | #defineSHARP_LED_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) |
1235 | #define SHARP_LED_SETSTATUS (SHARP_LED_IOCTL_START+1) | 1247 | #define SHARP_LED_SETSTATUS (SHARP_LED_IOCTL_START+1) |
1236 | 1248 | ||
1237 | typedef struct sharp_led_status { | 1249 | typedef struct sharp_led_status { |
1238 | int which; /* select which LED status is wanted. */ | 1250 | int which; /* select which LED status is wanted. */ |
1239 | int status; /* set new led status if you call SHARP_LED_SETSTATUS */ | 1251 | int status; /* set new led status if you call SHARP_LED_SETSTATUS */ |
1240 | } sharp_led_status; | 1252 | } sharp_led_status; |
1241 | 1253 | ||
1242 | #define SHARP_LED_MAIL_EXISTS 9 /* mail status (exists or not) */ | 1254 | #define SHARP_LED_MAIL_EXISTS 9 /* mail status (exists or not) */ |
1243 | 1255 | ||
1244 | #define LED_MAIL_NO_UNREAD_MAIL 0 /* for SHARP_LED_MAIL_EXISTS */ | 1256 | #define LED_MAIL_NO_UNREAD_MAIL 0 /* for SHARP_LED_MAIL_EXISTS */ |
1245 | #define LED_MAIL_NEWMAIL_EXISTS 1 /* for SHARP_LED_MAIL_EXISTS */ | 1257 | #define LED_MAIL_NEWMAIL_EXISTS 1 /* for SHARP_LED_MAIL_EXISTS */ |
1246 | #define LED_MAIL_UNREAD_MAIL_EX 2 /* for SHARP_LED_MAIL_EXISTS */ | 1258 | #define LED_MAIL_UNREAD_MAIL_EX 2 /* for SHARP_LED_MAIL_EXISTS */ |
1247 | 1259 | ||
1248 | // #include <asm/sharp_apm.h> // including kernel headers is evil ... | 1260 | // #include <asm/sharp_apm.h> // including kernel headers is evil ... |
1249 | 1261 | ||
1250 | #define APM_IOCGEVTSRC OD_IOR( 'A', 203, int ) | 1262 | #define APM_IOCGEVTSRC OD_IOR( 'A', 203, int ) |
1251 | #define APM_IOCSEVTSRC OD_IORW( 'A', 204, int ) | 1263 | #define APM_IOCSEVTSRC OD_IORW( 'A', 204, int ) |
1252 | #define APM_EVT_POWER_BUTTON (1 << 0) | 1264 | #define APM_EVT_POWER_BUTTON (1 << 0) |
1253 | 1265 | ||
1254 | #define FL_IOCTL_STEP_CONTRAST 100 | 1266 | #define FL_IOCTL_STEP_CONTRAST 100 |
1255 | 1267 | ||
1256 | 1268 | ||
1257 | void Zaurus::buzzer ( int sound ) | 1269 | void Zaurus::buzzer ( int sound ) |
1258 | { | 1270 | { |
1259 | static int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK ); | 1271 | static int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK ); |
1260 | 1272 | ||
1261 | if ( fd >= 0 ) { | 1273 | if ( fd >= 0 ) { |
1262 | ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ); | 1274 | ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ); |
1263 | ::close ( fd ); | 1275 | ::close ( fd ); |
1264 | } | 1276 | } |
1265 | } | 1277 | } |
1266 | 1278 | ||
1267 | 1279 | ||
1268 | void Zaurus::alarmSound ( ) | 1280 | void Zaurus::alarmSound ( ) |
1269 | { | 1281 | { |
1270 | buzzer ( SHARP_BUZ_SCHEDULE_ALARM ); | 1282 | buzzer ( SHARP_BUZ_SCHEDULE_ALARM ); |
1271 | } | 1283 | } |
1272 | 1284 | ||
1273 | void Zaurus::touchSound ( ) | 1285 | void Zaurus::touchSound ( ) |
1274 | { | 1286 | { |
1275 | buzzer ( SHARP_BUZ_TOUCHSOUND ); | 1287 | buzzer ( SHARP_BUZ_TOUCHSOUND ); |
1276 | } | 1288 | } |
1277 | 1289 | ||
1278 | void Zaurus::keySound ( ) | 1290 | void Zaurus::keySound ( ) |
1279 | { | 1291 | { |