mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
Meizu M3: implement rudimentary button driver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21787 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a5e25cc2a8
commit
5db8098bfd
2 changed files with 79 additions and 15 deletions
|
|
@ -22,7 +22,6 @@
|
|||
#define _BUTTON_TARGET_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "config.h"
|
||||
|
||||
#define HAS_BUTTON_HOLD
|
||||
|
||||
|
|
@ -30,25 +29,21 @@ bool button_hold(void);
|
|||
void button_init_device(void);
|
||||
int button_read_device(void);
|
||||
|
||||
/* Toshiba Gigabeat specific button codes */
|
||||
/* Meizu M3 specific button codes */
|
||||
#define BUTTON_PREVNEXT 0x00000001
|
||||
#define BUTTON_MENU 0x00000002
|
||||
#define BUTTON_PLAY 0x00000004
|
||||
|
||||
#define BUTTON_LEFT 0x00000001
|
||||
#define BUTTON_RIGHT 0x00000002
|
||||
#define BUTTON_UP 0x00000004
|
||||
#define BUTTON_DOWN 0x00000008
|
||||
/* there are no LEFT/RIGHT buttons, but other parts of the code expect them */
|
||||
#define BUTTON_LEFT 0
|
||||
#define BUTTON_RIGHT 0
|
||||
|
||||
#define BUTTON_SELECT 0x00000010
|
||||
#define BUTTON_MAIN (BUTTON_PREVNEXT|BUTTON_MENU|BUTTON_PLAY)
|
||||
|
||||
#define BUTTON_MENU 0x00000020
|
||||
#define BUTTON_PLAY 0x00000040
|
||||
|
||||
|
||||
#define BUTTON_MAIN (BUTTON_MENU|BUTTON_LEFT|BUTTON_RIGHT\
|
||||
|BUTTON_UP|BUTTON_DOWN|BUTTON_SELECT|BUTTON_PLAY)
|
||||
|
||||
#define BUTTON_REMOTE 0
|
||||
#define BUTTON_REMOTE 0
|
||||
|
||||
#define POWEROFF_BUTTON BUTTON_PLAY
|
||||
#define POWEROFF_COUNT 10
|
||||
|
||||
#endif /* _BUTTON_TARGET_H_ */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue