summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-04-01 20:33:39 (UTC)
committer kergoth <kergoth>2003-04-01 20:33:39 (UTC)
commit76b83c2b77e626fadf1d1bbbfd19a9a8a795334b (patch) (unidiff)
tree02d425c7e185842d0a12d9fe3d0b6377005fed67
parenta7ad29eb41163eec88b3bd835108bd80140ff086 (diff)
downloadopie-76b83c2b77e626fadf1d1bbbfd19a9a8a795334b.zip
opie-76b83c2b77e626fadf1d1bbbfd19a9a8a795334b.tar.gz
opie-76b83c2b77e626fadf1d1bbbfd19a9a8a795334b.tar.bz2
Open zaurus buzzer device as write only, and close it.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp6
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
@@ -1126,12 +1126,14 @@ typedef struct sharp_led_status {
1126 1126
1127 1127
1128void Zaurus::buzzer ( int sound ) 1128void 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
1137void Zaurus::alarmSound ( ) 1139void Zaurus::alarmSound ( )