Move iPod headphone detection into target tree (FS#6131 by Robert Keevil) and fix detection on 3G iPod

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11143 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Daniel Ankers 2006-10-07 12:19:34 +00:00
parent 24c3375143
commit 5c6f32af95
4 changed files with 15 additions and 12 deletions

View file

@ -951,15 +951,3 @@ void button_clear_queue(void)
{
queue_clear(&button_queue);
}
#ifdef HAVE_HEADPHONE_DETECTION
bool headphones_inserted(void)
{
#if (CONFIG_KEYPAD==IPOD_3G_PAD)
return (GPIOB_INPUT_VAL & 0x10)?true:false;
#elif (CONFIG_KEYPAD==IPOD_4G_PAD)
return (GPIOA_INPUT_VAL & 0x80)?true:false;
#endif
}
#endif

View file

@ -187,3 +187,8 @@ bool button_hold(void)
{
return (GPIOA_INPUT_VAL & 0x20)?false:true;
}
bool headphones_inserted(void)
{
return (GPIOC_INPUT_VAL & 0x1)?true:false;
}

View file

@ -235,3 +235,8 @@ bool button_hold(void)
{
return (GPIOA_INPUT_VAL & 0x20)?false:true;
}
bool headphones_inserted(void)
{
return (GPIOA_INPUT_VAL & 0x80)?true:false;
}

View file

@ -215,3 +215,8 @@ bool button_hold(void)
{
return (GPIOA_INPUT_VAL & 0x20)?false:true;
}
bool headphones_inserted(void)
{
return (GPIOA_INPUT_VAL & 0x80)?true:false;
}