-rw-r--r-- | libopie/odevice.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 55ba7bd..cea4f35 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp | |||
@@ -1118,28 +1118,30 @@ typedef struct sharp_led_status { | |||
1118 | 1118 | ||
1119 | // #include <asm/sharp_apm.h> // including kernel headers is evil ... | 1119 | // #include <asm/sharp_apm.h> // including kernel headers is evil ... |
1120 | 1120 | ||
1121 | #define APM_IOCGEVTSRC OD_IOR( 'A', 203, int ) | 1121 | #define APM_IOCGEVTSRC OD_IOR( 'A', 203, int ) |
1122 | #define APM_IOCSEVTSRC OD_IORW( 'A', 204, int ) | 1122 | #define APM_IOCSEVTSRC OD_IORW( 'A', 204, int ) |
1123 | #define APM_EVT_POWER_BUTTON (1 << 0) | 1123 | #define APM_EVT_POWER_BUTTON (1 << 0) |
1124 | 1124 | ||
1125 | #define FL_IOCTL_STEP_CONTRAST 100 | 1125 | #define FL_IOCTL_STEP_CONTRAST 100 |
1126 | 1126 | ||
1127 | 1127 | ||
1128 | void Zaurus::buzzer ( int sound ) | 1128 | void Zaurus::buzzer ( int sound ) |
1129 | { | 1129 | { |
1130 | static int fd = ::open ( "/dev/sharp_buz", O_RDWR|O_NONBLOCK ); | 1130 | static int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK ); |
1131 | 1131 | ||
1132 | if ( fd >= 0 ) | 1132 | if ( fd >= 0 ) { |
1133 | ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ); | 1133 | ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ); |
1134 | ::close ( fd ); | ||
1135 | } | ||
1134 | } | 1136 | } |
1135 | 1137 | ||
1136 | 1138 | ||
1137 | void Zaurus::alarmSound ( ) | 1139 | void Zaurus::alarmSound ( ) |
1138 | { | 1140 | { |
1139 | buzzer ( SHARP_BUZ_SCHEDULE_ALARM ); | 1141 | buzzer ( SHARP_BUZ_SCHEDULE_ALARM ); |
1140 | } | 1142 | } |
1141 | 1143 | ||
1142 | void Zaurus::touchSound ( ) | 1144 | void Zaurus::touchSound ( ) |
1143 | { | 1145 | { |
1144 | buzzer ( SHARP_BUZ_TOUCHSOUND ); | 1146 | buzzer ( SHARP_BUZ_TOUCHSOUND ); |
1145 | } | 1147 | } |