summaryrefslogtreecommitdiff
path: root/apps/recorder
diff options
context:
space:
mode:
Diffstat (limited to 'apps/recorder')
-rw-r--r--apps/recorder/radio.c12
-rw-r--r--apps/recorder/radio.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c
index 0459ff3d74..ab0c1eb004 100644
--- a/apps/recorder/radio.c
+++ b/apps/recorder/radio.c
@@ -74,6 +74,18 @@ void radio_stop(void)
74 74
75} 75}
76 76
77bool radio_hardware_present(void)
78{
79 int val;
80
81 fmradio_set(2, 0x140885); /* 5kHz, 7.2MHz crystal, test mode 1 */
82 val = fmradio_read(0);
83 if(val == 0x140885)
84 return true;
85 else
86 return false;
87}
88
77void radio_set_frequency(int freq) 89void radio_set_frequency(int freq)
78{ 90{
79 /* We add the standard Intermediate Frequency 10.7MHz before calculating 91 /* We add the standard Intermediate Frequency 10.7MHz before calculating
diff --git a/apps/recorder/radio.h b/apps/recorder/radio.h
index 45942a9990..5ddbf13d6b 100644
--- a/apps/recorder/radio.h
+++ b/apps/recorder/radio.h
@@ -22,6 +22,7 @@
22#ifdef HAVE_FMRADIO 22#ifdef HAVE_FMRADIO
23bool radio_screen(void); 23bool radio_screen(void);
24void radio_stop(void); 24void radio_stop(void);
25bool radio_hardware_present(void);
25 26
26struct fmstation 27struct fmstation
27{ 28{