mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
newer Fuzev2 doesn't seem to use B5 for button light
playing from µSD now works to some degree database update or copy between the 2 drives lock up git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27496 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
08c600ca07
commit
c57ba97246
2 changed files with 25 additions and 11 deletions
|
|
@ -59,14 +59,20 @@ void _backlight_off(void)
|
||||||
|
|
||||||
void _buttonlight_on(void)
|
void _buttonlight_on(void)
|
||||||
{
|
{
|
||||||
GPIOB_DIR |= 1<<5;
|
if (fuzev2_variant == 0)
|
||||||
GPIOB_PIN(5) = (1<<5);
|
{
|
||||||
buttonlight_is_on = 1;
|
GPIOB_DIR |= 1<<5;
|
||||||
|
GPIOB_PIN(5) = (1<<5);
|
||||||
|
buttonlight_is_on = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _buttonlight_off(void)
|
void _buttonlight_off(void)
|
||||||
{
|
{
|
||||||
GPIOB_PIN(5) = 0;
|
if (fuzev2_variant == 0)
|
||||||
GPIOB_DIR &= ~(1<<5);
|
{
|
||||||
buttonlight_is_on = 0;
|
GPIOB_PIN(5) = 0;
|
||||||
|
GPIOB_DIR &= ~(1<<5);
|
||||||
|
buttonlight_is_on = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -430,11 +430,14 @@ static bool send_cmd(const int drive, const int cmd, const int arg, const int fl
|
||||||
/*b31 */ | CMD_DONE_BIT;
|
/*b31 */ | CMD_DONE_BIT;
|
||||||
|
|
||||||
#ifdef SANSA_FUZEV2
|
#ifdef SANSA_FUZEV2
|
||||||
extern int buttonlight_is_on;
|
if (fuzev2_variant == 0)
|
||||||
if(buttonlight_is_on)
|
{
|
||||||
_buttonlight_on();
|
extern int buttonlight_is_on;
|
||||||
else
|
if(buttonlight_is_on)
|
||||||
_buttonlight_off();
|
_buttonlight_on();
|
||||||
|
else
|
||||||
|
_buttonlight_off();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
wakeup_wait(&command_completion_signal, TIMEOUT_BLOCK);
|
wakeup_wait(&command_completion_signal, TIMEOUT_BLOCK);
|
||||||
|
|
||||||
|
|
@ -771,6 +774,11 @@ int sd_init(void)
|
||||||
wakeup_init(&transfer_completion_signal);
|
wakeup_init(&transfer_completion_signal);
|
||||||
wakeup_init(&command_completion_signal);
|
wakeup_init(&command_completion_signal);
|
||||||
|
|
||||||
|
#ifdef SANSA_FUZEV2
|
||||||
|
if (fuzev2_variant == 1)
|
||||||
|
GPIOB_DIR |= 1 << 5;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_MULTIDRIVE
|
#ifdef HAVE_MULTIDRIVE
|
||||||
/* clear previous irq */
|
/* clear previous irq */
|
||||||
GPIOA_IC = EXT_SD_BITS;
|
GPIOA_IC = EXT_SD_BITS;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue