diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2004-02-04 09:53:22 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2004-02-04 09:53:22 +0000 |
commit | 04f9cc79937a6939e800c646b4c8e9650898bd7e (patch) | |
tree | d9fbaa61c6740a03422113b4833aa81152c7624a /apps/recorder | |
parent | facfec0c7737b57cdaf6ef7e80d9b43571e975f1 (diff) | |
download | rockbox-04f9cc79937a6939e800c646b4c8e9650898bd7e.tar.gz rockbox-04f9cc79937a6939e800c646b4c8e9650898bd7e.zip |
Added a debug option for the FM radio detection
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4293 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder')
-rw-r--r-- | apps/recorder/radio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c index 65b8beb164..819d2a5d5b 100644 --- a/apps/recorder/radio.c +++ b/apps/recorder/radio.c | |||
@@ -64,6 +64,8 @@ static struct fmstation presets[MAX_PRESETS]; | |||
64 | 64 | ||
65 | static char default_filename[] = "/.rockbox/fm-presets-default.fmr"; | 65 | static char default_filename[] = "/.rockbox/fm-presets-default.fmr"; |
66 | 66 | ||
67 | int debug_fm_detection; | ||
68 | |||
67 | void radio_load_presets(void); | 69 | void radio_load_presets(void); |
68 | bool radio_preset_select(void); | 70 | bool radio_preset_select(void); |
69 | bool radio_menu(void); | 71 | bool radio_menu(void); |
@@ -81,6 +83,7 @@ bool radio_hardware_present(void) | |||
81 | 83 | ||
82 | fmradio_set(2, 0x140885); /* 5kHz, 7.2MHz crystal, test mode 1 */ | 84 | fmradio_set(2, 0x140885); /* 5kHz, 7.2MHz crystal, test mode 1 */ |
83 | val = fmradio_read(0); | 85 | val = fmradio_read(0); |
86 | debug_fm_detection = val; | ||
84 | if(val == 0x140885) | 87 | if(val == 0x140885) |
85 | return true; | 88 | return true; |
86 | else | 89 | else |
@@ -554,7 +557,7 @@ void radio_load_presets(void) | |||
554 | if(fd >= 0) | 557 | if(fd >= 0) |
555 | { | 558 | { |
556 | i = 0; | 559 | i = 0; |
557 | while(!done) | 560 | while(!done && num_presets < MAX_PRESETS) |
558 | { | 561 | { |
559 | rc = read_line(fd, buf, 128); | 562 | rc = read_line(fd, buf, 128); |
560 | if(rc > 0) | 563 | if(rc > 0) |