1
0
Fork 0
forked from len0rd/rockbox

Automatic detection of FM radio hardware for V2 recorders

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4165 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2003-12-19 01:24:02 +00:00
parent 47f6cb30ee
commit ef8fd8e533
3 changed files with 61 additions and 17 deletions

View file

@ -74,6 +74,18 @@ void radio_stop(void)
}
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

View file

@ -22,6 +22,7 @@
#ifdef HAVE_FMRADIO
bool radio_screen(void);
void radio_stop(void);
bool radio_hardware_present(void);
struct fmstation
{