HDD1630/HDD6330/SA9200: Integration of the clicker with the "Keyclick" menu.

Change-Id: Ieb26f2252c1f2613cc9bd83c8349f49113f46d87
This commit is contained in:
Szymon Dziok 2014-11-08 21:12:24 +01:00
parent 73a780265a
commit bcca111438
9 changed files with 99 additions and 54 deletions

View file

@ -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;
}