1
0
Fork 0
forked from len0rd/rockbox

Patch #881887 by Gerald Vanbaren. The red LED is now ON when recording and blinking when waiting to record (and when paused).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4790 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2004-06-22 10:52:39 +00:00
parent 5c8a2f5835
commit fafd2093e3
4 changed files with 51 additions and 2 deletions

View file

@ -22,9 +22,13 @@
#include "led.h"
#include "system.h"
static bool xor;
static bool current;
void led(bool on)
{
if ( on )
current = on;
if ( on ^ xor )
{
or_b(0x40, &PBDRL);
}
@ -33,3 +37,17 @@ void led(bool on)
and_b(~0x40, &PBDRL);
}
}
void invert_led(bool on)
{
if ( on )
{
xor = 1;
}
else
{
xor = 0;
}
led(current);
}