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:
parent
47f6cb30ee
commit
ef8fd8e533
3 changed files with 61 additions and 17 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#ifdef HAVE_FMRADIO
|
||||
bool radio_screen(void);
|
||||
void radio_stop(void);
|
||||
bool radio_hardware_present(void);
|
||||
|
||||
struct fmstation
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue