forked from len0rd/rockbox
Idle poweroff fix for FM radio, as suggested by Mike Holden
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3645 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
568baaf81a
commit
23b0fdaca1
4 changed files with 25 additions and 12 deletions
|
|
@ -50,17 +50,7 @@
|
|||
/* delay loop */
|
||||
#define DELAY do { int _x; for(_x=0;_x<10;_x++);} while (0)
|
||||
|
||||
static struct mutex fmradio_mtx;
|
||||
|
||||
void fmradio_begin(void)
|
||||
{
|
||||
mutex_lock(&fmradio_mtx);
|
||||
}
|
||||
|
||||
void fmradio_end(void)
|
||||
{
|
||||
mutex_unlock(&fmradio_mtx);
|
||||
}
|
||||
static int fmstatus = 0;
|
||||
|
||||
int fmradio_read(int addr)
|
||||
{
|
||||
|
|
@ -130,4 +120,14 @@ void fmradio_set(int addr, int data)
|
|||
CE_LO;
|
||||
}
|
||||
|
||||
void fmradio_set_status(int status)
|
||||
{
|
||||
fmstatus = status;
|
||||
}
|
||||
|
||||
int fmradio_get_status(void)
|
||||
{
|
||||
return fmstatus;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue