forked from len0rd/rockbox
USB detect pin is GPIO D3 on Mini G2, and almost for sure also on G4 grayscale, Color, and Mini G1.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15778 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f98a0a97f6
commit
d508ce0681
1 changed files with 7 additions and 1 deletions
|
@ -85,7 +85,13 @@ void usb_enable(bool on)
|
|||
|
||||
bool usb_pin_detect(void)
|
||||
{
|
||||
#if defined(IPOD_ARCH)
|
||||
#if defined(IPOD_4G) || defined(IPOD_COLOR) \
|
||||
|| defined(IPOD_MINI) || defined(IPOD_MINI2G)
|
||||
/* GPIO D bit 3 is usb detect */
|
||||
if (GPIOD_INPUT_VAL & 0x08)
|
||||
return true;
|
||||
|
||||
#elif defined(IPOD_NANO) || defined(IPOD_VIDEO)
|
||||
/* GPIO L bit 4 is usb detect */
|
||||
if (GPIOL_INPUT_VAL & 0x10)
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue