aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-08-21 14:40:29 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2009-08-21 14:40:29 +0200
commit00ea82e846de6ef6e613effce7f30308cf85c22c (patch)
tree4027157a189b36bfecf620979e354f043e0fbe25 /miscutils
parent45de0746b33b3716101caa5fa08ee601221dce39 (diff)
downloadbusybox-00ea82e846de6ef6e613effce7f30308cf85c22c.tar.gz
add config knob for default freq and length
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/Config.in16
-rw-r--r--miscutils/beep.c12
2 files changed, 26 insertions, 2 deletions
diff --git a/miscutils/Config.in b/miscutils/Config.in
index 7209d2944..4e19bd8c4 100644
--- a/miscutils/Config.in
+++ b/miscutils/Config.in
@@ -25,6 +25,22 @@ config BEEP
help
The beep applets beeps in a given freq/Hz.
+config FEATURE_BEEP_FREQ
+ int "default frequency"
+ range 0 2147483647
+ default 4000
+ depends on BEEP
+ help
+ Frequency for default beep.
+
+config FEATURE_BEEP_LENGTH
+ int "default length"
+ range 0 2147483647
+ default 30
+ depends on BEEP
+ help
+ Length in ms for default beep.
+
config CHAT
bool "chat"
default n
diff --git a/miscutils/beep.c b/miscutils/beep.c
index d5c353197..79e75473c 100644
--- a/miscutils/beep.c
+++ b/miscutils/beep.c
@@ -19,8 +19,16 @@
#define OPT_d (1<<2)
#define OPT_r (1<<3)
/* defaults */
-#define FREQ (4440)
-#define LENGTH (50)
+#ifndef CONFIG_FEATURE_BEEP_FREQ
+# define FREQ (4000)
+#else
+# define FREQ (CONFIG_FEATURE_BEEP_FREQ)
+#endif
+#ifndef CONFIG_FEATURE_BEEP_LENGTH
+# define LENGTH (30)
+#else
+# define LENGTH (CONFIG_FEATURE_BEEP_LENGTH)
+#endif
#define DELAY (0)
#define REPETITIONS (1)