diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2009-08-21 14:40:29 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2009-08-21 14:40:29 +0200 |
commit | 00ea82e846de6ef6e613effce7f30308cf85c22c (patch) | |
tree | 4027157a189b36bfecf620979e354f043e0fbe25 /miscutils | |
parent | 45de0746b33b3716101caa5fa08ee601221dce39 (diff) | |
download | busybox-w32-00ea82e846de6ef6e613effce7f30308cf85c22c.tar.gz busybox-w32-00ea82e846de6ef6e613effce7f30308cf85c22c.tar.bz2 busybox-w32-00ea82e846de6ef6e613effce7f30308cf85c22c.zip |
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.in | 16 | ||||
-rw-r--r-- | miscutils/beep.c | 12 |
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 | |||
25 | help | 25 | help |
26 | The beep applets beeps in a given freq/Hz. | 26 | The beep applets beeps in a given freq/Hz. |
27 | 27 | ||
28 | config FEATURE_BEEP_FREQ | ||
29 | int "default frequency" | ||
30 | range 0 2147483647 | ||
31 | default 4000 | ||
32 | depends on BEEP | ||
33 | help | ||
34 | Frequency for default beep. | ||
35 | |||
36 | config FEATURE_BEEP_LENGTH | ||
37 | int "default length" | ||
38 | range 0 2147483647 | ||
39 | default 30 | ||
40 | depends on BEEP | ||
41 | help | ||
42 | Length in ms for default beep. | ||
43 | |||
28 | config CHAT | 44 | config CHAT |
29 | bool "chat" | 45 | bool "chat" |
30 | default n | 46 | 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 @@ | |||
19 | #define OPT_d (1<<2) | 19 | #define OPT_d (1<<2) |
20 | #define OPT_r (1<<3) | 20 | #define OPT_r (1<<3) |
21 | /* defaults */ | 21 | /* defaults */ |
22 | #define FREQ (4440) | 22 | #ifndef CONFIG_FEATURE_BEEP_FREQ |
23 | #define LENGTH (50) | 23 | # define FREQ (4000) |
24 | #else | ||
25 | # define FREQ (CONFIG_FEATURE_BEEP_FREQ) | ||
26 | #endif | ||
27 | #ifndef CONFIG_FEATURE_BEEP_LENGTH | ||
28 | # define LENGTH (30) | ||
29 | #else | ||
30 | # define LENGTH (CONFIG_FEATURE_BEEP_LENGTH) | ||
31 | #endif | ||
24 | #define DELAY (0) | 32 | #define DELAY (0) |
25 | #define REPETITIONS (1) | 33 | #define REPETITIONS (1) |
26 | 34 | ||