|
|
cvs: apps/recorder radio.c,1.15,1.16 radio.h,1.3,1.4: msg#00081
|
Subject: |
cvs: apps/recorder radio.c,1.15,1.16 radio.h,1.3,1.4 |
Update of /cvsroot/rockbox/apps/recorder
In directory sc8-pr-cvs1:/tmp/cvs-serv28678/apps/recorder
Modified Files:
radio.c radio.h
Log Message:
Automatic detection of FM radio hardware for V2 recorders
Index: radio.c
===================================================================
RCS file: /cvsroot/rockbox/apps/recorder/radio.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- radio.c 19 Dec 2003 00:38:47 -0000 1.15
+++ radio.c 19 Dec 2003 01:24:02 -0000 1.16
@@ -74,6 +74,18 @@
}
+bool radio_hardware_present(void)
+{
+ int val;
+
+ fmradio_set(2, 0x140885); /* 5kHz, 7.2MHz crystal, test mode 1 */
+ val = fmradio_read(0);
+ if(val == 0x140885)
+ return true;
+ else
+ return false;
+}
+
void radio_set_frequency(int freq)
{
/* We add the standard Intermediate Frequency 10.7MHz before calculating
Index: radio.h
===================================================================
RCS file: /cvsroot/rockbox/apps/recorder/radio.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- radio.h 9 May 2003 00:14:59 -0000 1.3
+++ radio.h 19 Dec 2003 01:24:02 -0000 1.4
@@ -22,6 +22,7 @@
#ifdef HAVE_FMRADIO
bool radio_screen(void);
void radio_stop(void);
+bool radio_hardware_present(void);
struct fmstation
{
|
| |