mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
Samsung YP-S3: implement headphones detection
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22099 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
64b227e3ba
commit
0f0bf7b258
1 changed files with 8 additions and 0 deletions
|
|
@ -48,6 +48,9 @@ void button_init_device(void)
|
||||||
/* P0.5/P1.0 power switch input */
|
/* P0.5/P1.0 power switch input */
|
||||||
PCON0 &= ~(3 << 10);
|
PCON0 &= ~(3 << 10);
|
||||||
PCON1 &= ~0x0000000F;
|
PCON1 &= ~0x0000000F;
|
||||||
|
|
||||||
|
/* P1.3 headphones detect input */
|
||||||
|
PCON1 &= ~0x0000F000;
|
||||||
|
|
||||||
/* P1.5 DATA, P1.6 DRDY inputs (touch key controller) */
|
/* P1.5 DATA, P1.6 DRDY inputs (touch key controller) */
|
||||||
PCON1 &= ~0x0FF00000;
|
PCON1 &= ~0x0FF00000;
|
||||||
|
|
@ -144,3 +147,8 @@ bool button_hold(void)
|
||||||
return (PDAT4 & (1 << 3));
|
return (PDAT4 & (1 << 3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool headphones_inserted(void)
|
||||||
|
{
|
||||||
|
return ((PDAT1 & (1 << 3)) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue