mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 21:25:19 -05:00
HDD1630/HDD6330/SA9200: Integration of the clicker with the "Keyclick" menu.
Change-Id: Ieb26f2252c1f2613cc9bd83c8349f49113f46d87
This commit is contained in:
parent
73a780265a
commit
bcca111438
9 changed files with 99 additions and 54 deletions
|
|
@ -29,19 +29,6 @@
|
|||
|
||||
static int int_btn = BUTTON_NONE;
|
||||
|
||||
/*
|
||||
* Generate a click sound from the player (not in headphones yet)
|
||||
* TODO: integrate this with the "key click" option
|
||||
*/
|
||||
static void button_click(void)
|
||||
{
|
||||
GPIOF_ENABLE |= 0x08;
|
||||
GPIOF_OUTPUT_VAL |= 0x08;
|
||||
GPIOF_OUTPUT_EN |= 0x08;
|
||||
udelay(1000);
|
||||
GPIOF_OUTPUT_VAL &= ~0x08;
|
||||
}
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
static bool hold_button_old = false;
|
||||
|
||||
|
|
@ -148,7 +135,6 @@ bool button_hold(void)
|
|||
*/
|
||||
int button_read_device(void)
|
||||
{
|
||||
static int btn_old = BUTTON_NONE;
|
||||
int btn = int_btn;
|
||||
bool hold = !(GPIOL_INPUT_VAL & 0x40);
|
||||
|
||||
|
|
@ -168,9 +154,6 @@ int button_read_device(void)
|
|||
if (!(GPIOF_INPUT_VAL & 0x10)) btn |= BUTTON_VOL_UP;
|
||||
if (!(GPIOF_INPUT_VAL & 0x04)) btn |= BUTTON_VOL_DOWN;
|
||||
|
||||
if ((btn != btn_old) && (btn != BUTTON_NONE)) button_click();
|
||||
btn_old = btn;
|
||||
|
||||
return btn;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue