mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
Commit FS#8624 by Linus Nielsen, Ryan Press, Craig Elliott, and Kenderes Tamas. Adds preliminary support for numerous accessories that use the ipod serial port on the dock connector. See IpodAccessories for a list of tested devices.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19585 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f921f74873
commit
70e9c7aed3
24 changed files with 1283 additions and 28 deletions
|
|
@ -316,7 +316,11 @@ int button_read_device(void)
|
|||
}
|
||||
|
||||
/* The int_btn variable is set in the button interrupt handler */
|
||||
#ifdef IPOD_ACCESSORY_PROTOCOL
|
||||
return int_btn | remote_control_rx();
|
||||
#else
|
||||
return int_btn;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool button_hold(void)
|
||||
|
|
|
|||
|
|
@ -50,7 +50,22 @@ void ipod_4g_button_int(void);
|
|||
|BUTTON_LEFT|BUTTON_RIGHT|BUTTON_SCROLL_FWD\
|
||||
|BUTTON_SCROLL_BACK|BUTTON_PLAY)
|
||||
|
||||
/* Remote control's buttons */
|
||||
#ifdef IPOD_ACCESSORY_PROTOCOL
|
||||
#define BUTTON_RC_PLAY 0x00100000
|
||||
#define BUTTON_RC_STOP 0x00080000
|
||||
|
||||
#define BUTTON_RC_LEFT 0x00040000
|
||||
#define BUTTON_RC_RIGHT 0x00020000
|
||||
#define BUTTON_RC_VOL_UP 0x00010000
|
||||
#define BUTTON_RC_VOL_DOWN 0x00008000
|
||||
|
||||
#define BUTTON_REMOTE (BUTTON_RC_PLAY|BUTTON_RC_STOP\
|
||||
|BUTTON_RC_LEFT|BUTTON_RC_RIGHT\
|
||||
|BUTTON_RC_VOL_UP|BUTTON_RC_VOL_DOWN)
|
||||
#else
|
||||
#define BUTTON_REMOTE 0
|
||||
#endif
|
||||
|
||||
/* This is for later
|
||||
#define BUTTON_SCROLL_TOUCH 0x00000200
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue