button-target.h : move prototypes to button.h

no need to define BUTTON_REMOTE anymore

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31620 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2012-01-08 00:07:19 +00:00
parent 63ead774d5
commit 95cf63b294
68 changed files with 27 additions and 502 deletions

View file

@ -28,8 +28,26 @@
#include "button-target.h" #include "button-target.h"
#endif #endif
#ifndef BUTTON_REMOTE
# define BUTTON_REMOTE 0
#endif
extern struct event_queue button_queue; extern struct event_queue button_queue;
void button_init_device(void);
#ifdef HAVE_BUTTON_DATA
int button_read_device(int *);
#else
int button_read_device(void);
#endif
#ifdef HAS_BUTTON_HOLD
bool button_hold(void);
#endif
#ifdef HAS_REMOTE_BUTTON_HOLD
bool remote_button_hold(void);
#endif
void button_init (void) INIT_ATTR; void button_init (void) INIT_ATTR;
void button_close(void); void button_close(void);
int button_queue_count(void); int button_queue_count(void);

View file

@ -22,12 +22,6 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
void button_init_device(void);
int button_read_device(void);
/* Main unit's buttons */ /* Main unit's buttons */
#define BUTTON_ON 0x00000001 #define BUTTON_ON 0x00000001

View file

@ -21,7 +21,7 @@
* *
****************************************************************************/ ****************************************************************************/
#include "system.h" #include "system.h"
#include "button-target.h" #include "button.h"
#include "as3525v2.h" #include "as3525v2.h"
#ifndef BOOTLOADER #ifndef BOOTLOADER
#include "backlight.h" #include "backlight.h"

View file

@ -23,7 +23,7 @@
#include "config.h" #include "config.h"
#include "system.h" #include "system.h"
#include "button.h" #include "button.h"
#include "button-target.h" #include "button.h"
#include "backlight.h" #include "backlight.h"
#include "dbop-as3525.h" #include "dbop-as3525.h"

View file

@ -21,7 +21,6 @@
#include "config.h" #include "config.h"
#include "system.h" #include "system.h"
#include "button-target.h"
#include "button.h" #include "button.h"
#include "backlight.h" #include "backlight.h"
#include "dbop-as3525.h" #include "dbop-as3525.h"

View file

@ -22,15 +22,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
/* Sandisk Sansa c200 button codes */ /* Sandisk Sansa c200 button codes */
/* Main unit's buttons */ /* Main unit's buttons */
@ -46,9 +39,6 @@ int button_read_device(void);
#define BUTTON_MAIN 0x00000fff #define BUTTON_MAIN 0x00000fff
/* No Remote control */
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -22,15 +22,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
void button_init_device(void);
int button_read_device(void);
bool button_hold(void);
/* Main unit's buttons */ /* Main unit's buttons */
#define BUTTON_HOME 0x00000001 #define BUTTON_HOME 0x00000001
@ -50,8 +43,6 @@ bool button_hold(void);
|BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT|BUTTON_RIGHT\ |BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT|BUTTON_RIGHT\
|BUTTON_SELECT|BUTTON_POWER) |BUTTON_SELECT|BUTTON_POWER)
#define BUTTON_REMOTE 0
/* Software power-off */ /* Software power-off */
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -19,7 +19,7 @@
* KIND, either express or implied. * KIND, either express or implied.
* *
****************************************************************************/ ****************************************************************************/
#include "button-target.h" #include "button.h"
#include "as3525v2.h" #include "as3525v2.h"
#include "kernel.h" #include "kernel.h"

View file

@ -22,12 +22,6 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
void button_init_device(void);
int button_read_device(void);
/* Main unit's buttons */ /* Main unit's buttons */
#define BUTTON_HOME 0x00000001 #define BUTTON_HOME 0x00000001
@ -47,8 +41,6 @@ int button_read_device(void);
|BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT|BUTTON_RIGHT\ |BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT|BUTTON_RIGHT\
|BUTTON_SELECT|BUTTON_POWER) |BUTTON_SELECT|BUTTON_POWER)
#define BUTTON_REMOTE 0
/* Software power-off */ /* Software power-off */
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -22,15 +22,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
void button_init_device(void);
int button_read_device(void);
bool button_hold(void);
/* Main unit's buttons */ /* Main unit's buttons */
#define BUTTON_HOME 0x00000001 #define BUTTON_HOME 0x00000001
@ -50,8 +43,6 @@ bool button_hold(void);
|BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT|BUTTON_RIGHT\ |BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT|BUTTON_RIGHT\
|BUTTON_SELECT|BUTTON_POWER) |BUTTON_SELECT|BUTTON_POWER)
#define BUTTON_REMOTE 0
/* Software power-off */ /* Software power-off */
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -21,7 +21,7 @@
****************************************************************************/ ****************************************************************************/
#include "config.h" #include "config.h"
#include "button-target.h" #include "button.h"
#include "as3525v2.h" #include "as3525v2.h"
#include "system.h" #include "system.h"
#include "kernel.h" #include "kernel.h"

View file

@ -22,11 +22,6 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include "config.h"
void button_init_device(void);
int button_read_device(void);
/* Main unit's buttons */ /* Main unit's buttons */
#define BUTTON_HOME 0x00000001 #define BUTTON_HOME 0x00000001
@ -46,8 +41,6 @@ int button_read_device(void);
|BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT|BUTTON_RIGHT\ |BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT|BUTTON_RIGHT\
|BUTTON_SELECT|BUTTON_POWER) |BUTTON_SELECT|BUTTON_POWER)
#define BUTTON_REMOTE 0
/* Software power-off */ /* Software power-off */
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -22,14 +22,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
unsigned short button_read_dbop(void); unsigned short button_read_dbop(void);
#define get_scrollwheel button_read_dbop #define get_scrollwheel button_read_dbop
@ -54,9 +48,6 @@ unsigned short button_read_dbop(void);
#define BUTTON_MAIN 0x00000fff #define BUTTON_MAIN 0x00000fff
/* No Remote control */
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -22,14 +22,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
void button_init_device(void);
bool button_hold(void);
int button_read_device(void);
unsigned short button_read_dbop(void); unsigned short button_read_dbop(void);
#define get_scrollwheel button_read_dbop #define get_scrollwheel button_read_dbop
@ -61,9 +55,6 @@ unsigned short button_read_dbop(void);
|BUTTON_SCROLL_BACK|BUTTON_SCROLL_FWD \ |BUTTON_SCROLL_BACK|BUTTON_SCROLL_FWD \
|BUTTON_HOLD) |BUTTON_HOLD)
/* No Remote control */
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -22,14 +22,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
void button_init_device(void);
bool button_hold(void);
int button_read_device(void);
/* Sandisk Sansa Fuze button codes */ /* Sandisk Sansa Fuze button codes */
/* Main unit's buttons - mapped for optimal reading */ /* Main unit's buttons - mapped for optimal reading */
@ -52,9 +46,6 @@ int button_read_device(void);
|BUTTON_SCROLL_BACK|BUTTON_SCROLL_FWD \ |BUTTON_SCROLL_BACK|BUTTON_SCROLL_FWD \
|BUTTON_HOLD) |BUTTON_HOLD)
/* No Remote control */
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -22,15 +22,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
void button_init_device(void);
int button_read_device(void);
bool button_hold(void);
/* Main unit's buttons */ /* Main unit's buttons */
#define BUTTON_POWER 0x00000001 #define BUTTON_POWER 0x00000001
#define BUTTON_VOL_UP 0x00000002 #define BUTTON_VOL_UP 0x00000002
@ -46,8 +39,6 @@ bool button_hold(void);
|BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT\ |BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT\
|BUTTON_RIGHT|BUTTON_SELECT|BUTTON_HOLD) |BUTTON_RIGHT|BUTTON_SELECT|BUTTON_HOLD)
#define BUTTON_REMOTE 0
/* Software power-off */ /* Software power-off */
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 40 #define POWEROFF_COUNT 40

View file

@ -29,7 +29,7 @@
#include "dma-target.h" #include "dma-target.h"
#include "clock-target.h" #include "clock-target.h"
#include "fmradio_i2c.h" #include "fmradio_i2c.h"
#include "button-target.h" #include "button.h"
#include "backlight-target.h" #include "backlight-target.h"
#include "lcd.h" #include "lcd.h"

View file

@ -22,9 +22,6 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define BUTTON_SELECT 0x00000001 #define BUTTON_SELECT 0x00000001
#define BUTTON_MENU 0x00000002 #define BUTTON_MENU 0x00000002
#define BUTTON_PLAY 0x00000004 #define BUTTON_PLAY 0x00000004
@ -38,11 +35,5 @@
#define BUTTON_MAIN (BUTTON_UP|BUTTON_DOWN|BUTTON_RIGHT|BUTTON_LEFT \ #define BUTTON_MAIN (BUTTON_UP|BUTTON_DOWN|BUTTON_RIGHT|BUTTON_LEFT \
|BUTTON_SELECT|BUTTON_MENU|BUTTON_PLAY \ |BUTTON_SELECT|BUTTON_MENU|BUTTON_PLAY \
|BUTTON_STOP) |BUTTON_STOP)
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
/* No Remote control */
#define BUTTON_REMOTE 0
#endif /* _BUTTON_TARGET_H_ */ #endif /* _BUTTON_TARGET_H_ */

View file

@ -21,11 +21,6 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
void button_init_device(void);
int button_read_device(void);
bool button_debug_screen(void); bool button_debug_screen(void);
/* Main unit's buttons */ /* Main unit's buttons */
@ -49,8 +44,6 @@ bool button_debug_screen(void);
BUTTON_PLAYPAUSE|BUTTON_BACK| \ BUTTON_PLAYPAUSE|BUTTON_BACK| \
BUTTON_BOTTOMRIGHT|BUTTON_BOTTOMLEFT) BUTTON_BOTTOMRIGHT|BUTTON_BOTTOMLEFT)
#define BUTTON_REMOTE 0
/* Software power-off */ /* Software power-off */
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -21,7 +21,6 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h" #include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
@ -30,10 +29,7 @@
#define BUTTON_DRIVER_CLOSE #define BUTTON_DRIVER_CLOSE
#endif #endif
bool button_hold(void);
void button_init_device(void);
void button_close_device(void); void button_close_device(void);
int button_read_device(void);
void button_power_event(void); void button_power_event(void);
void headphone_detect_event(void); void headphone_detect_event(void);
void headphone_init(void); void headphone_init(void);

View file

@ -21,15 +21,10 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h" #include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
void ipod_mini_button_int(void); void ipod_mini_button_int(void);
void ipod_3g_button_int(void); void ipod_3g_button_int(void);
void ipod_4g_button_int(void); void ipod_4g_button_int(void);
@ -63,8 +58,6 @@ void ipod_4g_button_int(void);
#define BUTTON_REMOTE (BUTTON_RC_PLAY|BUTTON_RC_STOP\ #define BUTTON_REMOTE (BUTTON_RC_PLAY|BUTTON_RC_STOP\
|BUTTON_RC_LEFT|BUTTON_RC_RIGHT\ |BUTTON_RC_LEFT|BUTTON_RC_RIGHT\
|BUTTON_RC_VOL_UP|BUTTON_RC_VOL_DOWN) |BUTTON_RC_VOL_UP|BUTTON_RC_VOL_DOWN)
#else
#define BUTTON_REMOTE 0
#endif #endif
/* This is for later /* This is for later

View file

@ -24,17 +24,9 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
#define HAS_REMOTE_BUTTON_HOLD #define HAS_REMOTE_BUTTON_HOLD
bool button_hold(void);
bool remote_button_hold(void);
void button_init_device(void);
int button_read_device(void);
/* iriver H10 specific button codes */ /* iriver H10 specific button codes */
/* Main unit's buttons */ /* Main unit's buttons */

View file

@ -22,17 +22,12 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h" #include "config.h"
#define MEP_BUTTON_HEADER 0x1a #define MEP_BUTTON_HEADER 0x1a
#define MEP_BUTTON_ID 0x09 #define MEP_BUTTON_ID 0x09
#define MEP_ABSOLUTE_HEADER 0x0b #define MEP_ABSOLUTE_HEADER 0x0b
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
#ifndef BOOTLOADER #ifndef BOOTLOADER
void button_int(void); void button_int(void);
#endif #endif
@ -60,7 +55,6 @@ void button_int(void);
#ifdef HAVE_REMOTE_LCD #ifdef HAVE_REMOTE_LCD
void headphones_int(void); void headphones_int(void);
bool remote_button_hold(void);
/* Remote control's buttons */ /* Remote control's buttons */
#define BUTTON_RC_PLAY 0x00010000 #define BUTTON_RC_PLAY 0x00010000
@ -77,8 +71,6 @@ bool remote_button_hold(void);
#define HAS_REMOTE_BUTTON_HOLD #define HAS_REMOTE_BUTTON_HOLD
#define RC_POWEROFF_BUTTON BUTTON_RC_PLAY #define RC_POWEROFF_BUTTON BUTTON_RC_PLAY
#else
#define BUTTON_REMOTE 0
#endif /* HAVE_REMOTE_LCD */ #endif /* HAVE_REMOTE_LCD */
#endif /* _BUTTON_TARGET_H_ */ #endif /* _BUTTON_TARGET_H_ */

View file

@ -21,7 +21,6 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h" #include "config.h"
#define MEP_BUTTON_HEADER 0x19 #define MEP_BUTTON_HEADER 0x19
@ -31,10 +30,6 @@
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
#ifndef BOOTLOADER #ifndef BOOTLOADER
void button_int(void); void button_int(void);
#endif #endif
@ -57,8 +52,6 @@ void button_int(void);
#define BUTTON_MAIN 0x00000fff #define BUTTON_MAIN 0x00000fff
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -22,7 +22,6 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h" #include "config.h"
#define MEP_BUTTON_HEADER 0x19 #define MEP_BUTTON_HEADER 0x19
@ -31,10 +30,6 @@
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
#ifndef BOOTLOADER #ifndef BOOTLOADER
void button_int(void); void button_int(void);
#endif #endif
@ -54,9 +49,6 @@ void button_int(void);
#define BUTTON_MAIN 0x00000fff #define BUTTON_MAIN 0x00000fff
/* No Remote control */
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -22,7 +22,6 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h" #include "config.h"
#define MEP_BUTTON_HEADER 0x19 #define MEP_BUTTON_HEADER 0x19
@ -33,10 +32,6 @@
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
#ifndef BOOTLOADER #ifndef BOOTLOADER
void button_int(void); void button_int(void);
#endif #endif
@ -57,9 +52,6 @@ void button_int(void);
#define BUTTON_TAP 0x00001000 #define BUTTON_TAP 0x00001000
#define BUTTON_MAIN 0x00001fff #define BUTTON_MAIN 0x00001fff
/* No Remote control */
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -22,18 +22,12 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define MEP_BUTTON_HEADER 0x1a #define MEP_BUTTON_HEADER 0x1a
#define MEP_BUTTON_ID 0x09 #define MEP_BUTTON_ID 0x09
#define MEP_ABSOLUTE_HEADER 0x0b #define MEP_ABSOLUTE_HEADER 0x0b
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
void button_int(void); void button_int(void);
/* Main unit's buttons */ /* Main unit's buttons */
@ -51,9 +45,6 @@ void button_int(void);
#define BUTTON_MAIN 0x00000fff #define BUTTON_MAIN 0x00000fff
/* No Remote control */
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -24,15 +24,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
/* iriver IFP7XX specific button codes */ /* iriver IFP7XX specific button codes */
#define BUTTON_PLAY 0x00000001 #define BUTTON_PLAY 0x00000001
@ -50,8 +43,6 @@ int button_read_device(void);
|BUTTON_LEFT|BUTTON_RIGHT|BUTTON_UP|BUTTON_DOWN\ |BUTTON_LEFT|BUTTON_RIGHT|BUTTON_UP|BUTTON_DOWN\
|BUTTON_MODE|BUTTON_EQ) |BUTTON_MODE|BUTTON_EQ)
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_PLAY #define POWEROFF_BUTTON BUTTON_PLAY
#define POWEROFF_COUNT 40 #define POWEROFF_COUNT 40

View file

@ -21,23 +21,12 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
void button_init_device(void);
int button_read_device(void);
#define BUTTON_UP 0x00000001 #define BUTTON_UP 0x00000001
#define BUTTON_DOWN 0x00000004 #define BUTTON_DOWN 0x00000004
#define BUTTON_LEFT 0x00000008 #define BUTTON_LEFT 0x00000008
#define BUTTON_RIGHT 0x00000010 #define BUTTON_RIGHT 0x00000010
#define BUTTON_PLAY 0x00000020 #define BUTTON_PLAY 0x00000020
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON 0x02 #define POWEROFF_BUTTON 0x02
#define POWEROFF_COUNT 30 #define POWEROFF_COUNT 30

View file

@ -21,13 +21,6 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
void button_init_device(void);
int button_read_device(void);
#define BUTTON_UP 0x00000001 #define BUTTON_UP 0x00000001
#define BUTTON_DOWN 0x00000004 #define BUTTON_DOWN 0x00000004
#define BUTTON_LEFT 0x00000008 #define BUTTON_LEFT 0x00000008
@ -37,10 +30,6 @@ int button_read_device(void);
#define BUTTON_PREV 0x00000080 #define BUTTON_PREV 0x00000080
#define BUTTON_PLAY 0x00000100 #define BUTTON_PLAY 0x00000100
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON 0x02 #define POWEROFF_BUTTON 0x02
#define POWEROFF_COUNT 30 #define POWEROFF_COUNT 30

View file

@ -21,12 +21,6 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
void button_init_device(void);
int button_read_device(void);
/* Main unit's buttons */ /* Main unit's buttons */
/* values assigned corespond to GPIOs numbers */ /* values assigned corespond to GPIOs numbers */
#define BUTTON_PLAY 0x00000002 #define BUTTON_PLAY 0x00000002
@ -40,8 +34,6 @@ int button_read_device(void);
#define BUTTON_RIGHT BUTTON_FF #define BUTTON_RIGHT BUTTON_FF
#define BUTTON_ON BUTTON_PLAY #define BUTTON_ON BUTTON_PLAY
#define BUTTON_REMOTE 0
#define BUTTON_MAIN (BUTTON_PLAY|BUTTON_REW|BUTTON_FF|\ #define BUTTON_MAIN (BUTTON_PLAY|BUTTON_REW|BUTTON_FF|\
BUTTON_VOL|BUTTON_M) BUTTON_VOL|BUTTON_M)

View file

@ -21,14 +21,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
void touchpad_set_sensitivity(int level); void touchpad_set_sensitivity(int level);
/* Toshiba Gigabeat specific button codes */ /* Toshiba Gigabeat specific button codes */

View file

@ -21,13 +21,6 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
bool button_hold(void);
void button_init_device(void);
int button_read_device(int*);
void touchpad_set_sensitivity(int level); void touchpad_set_sensitivity(int level);
/* Mini2440 specific button codes */ /* Mini2440 specific button codes */
@ -76,8 +69,6 @@ void touchpad_set_sensitivity(int level);
BUTTON_UP |BUTTON_DOWN|BUTTON_SELECT | \ BUTTON_UP |BUTTON_DOWN|BUTTON_SELECT | \
BUTTON_A |BUTTON_POWER ) BUTTON_A |BUTTON_POWER )
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_MENU #define POWEROFF_BUTTON BUTTON_MENU
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -21,15 +21,10 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h" #include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
void ipod_mini_button_int(void); void ipod_mini_button_int(void);
void ipod_3g_button_int(void); void ipod_3g_button_int(void);
void ipod_4g_button_int(void); void ipod_4g_button_int(void);
@ -63,8 +58,6 @@ void ipod_4g_button_int(void);
#define BUTTON_REMOTE (BUTTON_RC_PLAY|BUTTON_RC_STOP\ #define BUTTON_REMOTE (BUTTON_RC_PLAY|BUTTON_RC_STOP\
|BUTTON_RC_LEFT|BUTTON_RC_RIGHT\ |BUTTON_RC_LEFT|BUTTON_RC_RIGHT\
|BUTTON_RC_VOL_UP|BUTTON_RC_VOL_DOWN) |BUTTON_RC_VOL_UP|BUTTON_RC_VOL_DOWN)
#else
#define BUTTON_REMOTE 0
#endif #endif
/* This is for later /* This is for later

View file

@ -21,14 +21,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
/* Meizu M3 specific button codes */ /* Meizu M3 specific button codes */
#define BUTTON_PREVNEXT 0x00000001 #define BUTTON_PREVNEXT 0x00000001
#define BUTTON_MENU 0x00000002 #define BUTTON_MENU 0x00000002
@ -40,8 +34,6 @@ int button_read_device(void);
#define BUTTON_MAIN (BUTTON_PREVNEXT|BUTTON_MENU|BUTTON_PLAY) #define BUTTON_MAIN (BUTTON_PREVNEXT|BUTTON_MENU|BUTTON_PLAY)
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_PLAY #define POWEROFF_BUTTON BUTTON_PLAY
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -21,15 +21,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
/* Toshiba Gigabeat specific button codes */ /* Toshiba Gigabeat specific button codes */
#define BUTTON_LEFT 0x00000001 #define BUTTON_LEFT 0x00000001
@ -46,8 +39,6 @@ int button_read_device(void);
#define BUTTON_MAIN (BUTTON_MENU|BUTTON_LEFT|BUTTON_RIGHT\ #define BUTTON_MAIN (BUTTON_MENU|BUTTON_LEFT|BUTTON_RIGHT\
|BUTTON_UP|BUTTON_DOWN|BUTTON_SELECT|BUTTON_PLAY) |BUTTON_UP|BUTTON_DOWN|BUTTON_SELECT|BUTTON_PLAY)
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_PLAY #define POWEROFF_BUTTON BUTTON_PLAY
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -21,15 +21,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
/* Meizu M6 specific button codes */ /* Meizu M6 specific button codes */
#define BUTTON_LEFT 0x00000001 #define BUTTON_LEFT 0x00000001
@ -43,8 +36,6 @@ int button_read_device(void);
#define BUTTON_MAIN (BUTTON_LEFT|BUTTON_RIGHT|BUTTON_PLAY|BUTTON_MENU\ #define BUTTON_MAIN (BUTTON_LEFT|BUTTON_RIGHT|BUTTON_PLAY|BUTTON_MENU\
|BUTTON_SELECT|BUTTON_ENTER) |BUTTON_SELECT|BUTTON_ENTER)
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_PLAY #define POWEROFF_BUTTON BUTTON_PLAY
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -21,14 +21,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
#define BUTTON_BACK 0x00000001 #define BUTTON_BACK 0x00000001
#define BUTTON_MENU 0x00000002 #define BUTTON_MENU 0x00000002
#define BUTTON_UP 0x00000004 #define BUTTON_UP 0x00000004
@ -41,10 +35,7 @@ int button_read_device(void);
#define BUTTON_MAIN (BUTTON_BACK|BUTTON_MENU|BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT|\ #define BUTTON_MAIN (BUTTON_BACK|BUTTON_MENU|BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT|\
BUTTON_RIGHT|BUTTON_SELECT) BUTTON_RIGHT|BUTTON_SELECT)
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10
#endif /* _BUTTON_TARGET_H_ */ #endif /* _BUTTON_TARGET_H_ */

View file

@ -21,15 +21,10 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h" #include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
void ipod_mini_button_int(void); void ipod_mini_button_int(void);
void ipod_3g_button_int(void); void ipod_3g_button_int(void);
void ipod_4g_button_int(void); void ipod_4g_button_int(void);
@ -63,8 +58,6 @@ void ipod_4g_button_int(void);
#define BUTTON_REMOTE (BUTTON_RC_PLAY|BUTTON_RC_STOP\ #define BUTTON_REMOTE (BUTTON_RC_PLAY|BUTTON_RC_STOP\
|BUTTON_RC_LEFT|BUTTON_RC_RIGHT\ |BUTTON_RC_LEFT|BUTTON_RC_RIGHT\
|BUTTON_RC_VOL_UP|BUTTON_RC_VOL_DOWN) |BUTTON_RC_VOL_UP|BUTTON_RC_VOL_DOWN)
#else
#define BUTTON_REMOTE 0
#endif #endif
/* This is for later /* This is for later

View file

@ -22,15 +22,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
/* Button codes for Samsung YH-820, 920, 925 */ /* Button codes for Samsung YH-820, 920, 925 */
/* Main unit's buttons */ /* Main unit's buttons */
@ -46,9 +39,6 @@ int button_read_device(void);
#define BUTTON_MAIN 0x000000ff #define BUTTON_MAIN 0x000000ff
/* No Remote control */
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_PLAY #define POWEROFF_BUTTON BUTTON_PLAY
#define POWEROFF_COUNT 15 #define POWEROFF_COUNT 15

View file

@ -22,15 +22,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
/* Sandisk Sansa c200 button codes */ /* Sandisk Sansa c200 button codes */
/* Main unit's buttons */ /* Main unit's buttons */
@ -46,9 +39,6 @@ int button_read_device(void);
#define BUTTON_MAIN 0x00000fff #define BUTTON_MAIN 0x00000fff
/* No Remote control */
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -22,14 +22,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
void clickwheel_int(void); void clickwheel_int(void);
void button_int(void); void button_int(void);
@ -49,9 +43,6 @@ void button_int(void);
#define BUTTON_MAIN 0x00000fff #define BUTTON_MAIN 0x00000fff
/* No Remote control */
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -22,14 +22,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
void button_init_device(void);
bool button_hold(void);
int button_read_device(void);
/* Sandisk Sansa View button codes */ /* Sandisk Sansa View button codes */
/* Main unit's buttons */ /* Main unit's buttons */
@ -53,9 +47,6 @@ int button_read_device(void);
|BUTTON_SCROLL_BACK|BUTTON_SCROLL_FWD \ |BUTTON_SCROLL_BACK|BUTTON_SCROLL_FWD \
|BUTTON_HOLD) |BUTTON_HOLD)
/* No Remote control */
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -24,11 +24,6 @@
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
#define button_init_device()
bool button_hold(void);
int button_read_device(void);
/* Main unit's buttons */ /* Main unit's buttons */
#define BUTTON_VOL_DOWN 0x00000001 #define BUTTON_VOL_DOWN 0x00000001
@ -50,9 +45,6 @@ int button_read_device(void);
#define BUTTON_MAIN 0x00000FFF #define BUTTON_MAIN 0x00000FFF
/* No Remote control */
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -22,15 +22,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
void button_init_device(void);
int button_read_device(void);
bool button_hold(void);
/* Main unit's buttons */ /* Main unit's buttons */
#define BUTTON_POWER 0x00000001 #define BUTTON_POWER 0x00000001
#define BUTTON_VOLUP 0x00000002 #define BUTTON_VOLUP 0x00000002
@ -45,8 +38,6 @@ bool button_hold(void);
|BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT\ |BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT\
|BUTTON_RIGHT|BUTTON_SELECT) |BUTTON_RIGHT|BUTTON_SELECT)
#define BUTTON_REMOTE 0
/* Software power-off */ /* Software power-off */
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 40 #define POWEROFF_COUNT 40

View file

@ -21,15 +21,8 @@
#ifndef _IAUDIO7_BUTTON_TARGET_H_ #ifndef _IAUDIO7_BUTTON_TARGET_H_
#define _IAUDIO7_BUTTON_TARGET_H_ #define _IAUDIO7_BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
/* Main unit's buttons */ /* Main unit's buttons */
#define BUTTON_POWER 0x00000001 #define BUTTON_POWER 0x00000001
#define BUTTON_VOLUP 0x00000002 #define BUTTON_VOLUP 0x00000002
@ -47,9 +40,6 @@ int button_read_device(void);
BUTTON_MENU|BUTTON_LEFT|BUTTON_RIGHT| \ BUTTON_MENU|BUTTON_LEFT|BUTTON_RIGHT| \
BUTTON_PLAY|BUTTON_STOP) BUTTON_PLAY|BUTTON_STOP)
/* No remote */
#define BUTTON_REMOTE 0
/* Software power-off */ /* Software power-off */
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -22,12 +22,6 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
void button_init_device(void);
int button_read_device(void);
/* Main unit's buttons */ /* Main unit's buttons */
#define BUTTON_POWERPLAY 0x00000001 #define BUTTON_POWERPLAY 0x00000001
#define BUTTON_MODE 0x00000002 #define BUTTON_MODE 0x00000002
@ -44,8 +38,6 @@ int button_read_device(void);
|BUTTON_REC|BUTTON_PRESET|BUTTON_LEFT\ |BUTTON_REC|BUTTON_PRESET|BUTTON_LEFT\
|BUTTON_RIGHT|BUTTON_UP|BUTTON_DOWN|BUTTON_SELECT) |BUTTON_RIGHT|BUTTON_UP|BUTTON_DOWN|BUTTON_SELECT)
#define BUTTON_REMOTE 0
/* Software power-off */ /* Software power-off */
#define POWEROFF_BUTTON BUTTON_POWERPLAY #define POWEROFF_BUTTON BUTTON_POWERPLAY
#define POWEROFF_COUNT 40 #define POWEROFF_COUNT 40

View file

@ -22,15 +22,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
void button_init_device(void);
int button_read_device(void);
bool button_hold(void);
/* Main unit's buttons */ /* Main unit's buttons */
#define BUTTON_MENU 0x00000001 #define BUTTON_MENU 0x00000001
#define BUTTON_VOLUP 0x00000002 #define BUTTON_VOLUP 0x00000002
@ -45,8 +38,6 @@ bool button_hold(void);
|BUTTON_PLAYPAUSE|BUTTON_REPEATAB|BUTTON_LEFT\ |BUTTON_PLAYPAUSE|BUTTON_REPEATAB|BUTTON_LEFT\
|BUTTON_RIGHT|BUTTON_SELECT) |BUTTON_RIGHT|BUTTON_SELECT)
#define BUTTON_REMOTE 0
/* Software power-off */ /* Software power-off */
#define POWEROFF_BUTTON BUTTON_MENU #define POWEROFF_BUTTON BUTTON_MENU
#define POWEROFF_COUNT 40 #define POWEROFF_COUNT 40

View file

@ -22,15 +22,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(int *data);
/* Main unit's buttons */ /* Main unit's buttons */
#define BUTTON_POWER 0x00000001 #define BUTTON_POWER 0x00000001
#define BUTTON_PLUS 0x00000002 #define BUTTON_PLUS 0x00000002
@ -56,9 +49,6 @@ int button_read_device(int *data);
#define BUTTON_MAIN 0x1FFF #define BUTTON_MAIN 0x1FFF
/* No remote */
#define BUTTON_REMOTE 0
/* Software power-off */ /* Software power-off */
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -47,8 +47,6 @@
#define BUTTON_VOL_DOWN (1 << 14) #define BUTTON_VOL_DOWN (1 << 14)
#endif #endif
#define BUTTON_REMOTE 0
#ifndef CREATIVE_ZV #ifndef CREATIVE_ZV
#define BUTTON_MAIN ( BUTTON_BACK | BUTTON_MENU | BUTTON_LEFT | BUTTON_RIGHT \ #define BUTTON_MAIN ( BUTTON_BACK | BUTTON_MENU | BUTTON_LEFT | BUTTON_RIGHT \
| BUTTON_UP | BUTTON_DOWN | BUTTON_SELECT | BUTTON_POWER \ | BUTTON_UP | BUTTON_DOWN | BUTTON_SELECT | BUTTON_POWER \
@ -65,12 +63,6 @@
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
void button_init_device(void);
int button_read_device(void);
bool headphones_inserted(void);
bool button_hold(void);
bool button_usb_connected(void); bool button_usb_connected(void);
int get_debug_info(int choice);
#endif /* _BUTTON_TARGET_H_ */ #endif /* _BUTTON_TARGET_H_ */

View file

@ -22,14 +22,10 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include "config.h" #include <stdbool.h>
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(int *data);
/* This is called from the tsc2100 interupt handler in adc-mr500.c */ /* This is called from the tsc2100 interupt handler in adc-mr500.c */
void touch_read_coord(void); void touch_read_coord(void);

View file

@ -22,10 +22,6 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include "config.h"
#define BUTTON_REMOTE 0
/* these definitions match the avr hid reply */ /* these definitions match the avr hid reply */
#define BUTTON_LEFT (1 << 2) #define BUTTON_LEFT (1 << 2)
#define BUTTON_UP (1 << 3) #define BUTTON_UP (1 << 3)
@ -43,8 +39,6 @@
#define BUTTON_SCROLL_FWD (1 << 7) #define BUTTON_SCROLL_FWD (1 << 7)
#define BUTTON_SCROLL_BACK (1 << 8) #define BUTTON_SCROLL_BACK (1 << 8)
#define BUTTON_REMOTE 0
#define BUTTON_MAIN (BUTTON_LEFT | BUTTON_UP | BUTTON_RIGHT | BUTTON_DOWN |\ #define BUTTON_MAIN (BUTTON_LEFT | BUTTON_UP | BUTTON_RIGHT | BUTTON_DOWN |\
BUTTON_SELECT | BUTTON_VOL_UP | BUTTON_VOL_DOWN |\ BUTTON_SELECT | BUTTON_VOL_UP | BUTTON_VOL_DOWN |\
BUTTON_NEXT | BUTTON_PREV | BUTTON_POWER |\ BUTTON_NEXT | BUTTON_PREV | BUTTON_POWER |\
@ -55,10 +49,4 @@
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
void button_init_device(void);
int button_read_device(void);
bool button_hold(void);
int get_debug_info(int choice);
#endif /* _BUTTON_TARGET_H_ */ #endif /* _BUTTON_TARGET_H_ */

View file

@ -21,16 +21,9 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
#define HAS_REMOTE_BUTTON_HOLD #define HAS_REMOTE_BUTTON_HOLD
bool button_hold(void);
bool remote_button_hold(void);
void button_init_device(void);
int button_read_device(void);
void button_enable_scan(bool enable); void button_enable_scan(bool enable);
bool button_scan_enabled(void); bool button_scan_enabled(void);

View file

@ -22,17 +22,9 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
#define HAS_REMOTE_BUTTON_HOLD #define HAS_REMOTE_BUTTON_HOLD
bool button_hold(void);
bool remote_button_hold(void);
void button_init_device(void);
int button_read_device(void);
/* iaudio M3 specific button codes */ /* iaudio M3 specific button codes */
/* Main unit's buttons */ /* Main unit's buttons */

View file

@ -24,17 +24,12 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h" #include "config.h"
#include <stdbool.h>
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
#define HAS_REMOTE_BUTTON_HOLD #define HAS_REMOTE_BUTTON_HOLD
bool button_hold(void);
bool remote_button_hold(void);
bool remote_button_hold_only(void);
void button_init_device(void);
int button_read_device(void);
#ifdef IRIVER_H300_SERIES #ifdef IRIVER_H300_SERIES
void button_enable_scan(bool enable); void button_enable_scan(bool enable);
bool button_scan_enabled(void); bool button_scan_enabled(void);

View file

@ -39,7 +39,7 @@ bool button_hold(void)
return (GPIO1_READ & 0x00000002)?true:false; return (GPIO1_READ & 0x00000002)?true:false;
} }
bool remote_button_hold_only(void) static bool remote_button_hold_only(void)
{ {
if(remote_type() == REMOTETYPE_H300_NONLCD) if(remote_type() == REMOTETYPE_H300_NONLCD)
return adc_scan(ADC_REMOTE)<0x0d; /* hold should be 0x00 */ return adc_scan(ADC_REMOTE)<0x0d; /* hold should be 0x00 */

View file

@ -55,7 +55,7 @@ bool button_hold(void)
return (GPIO1_READ & 0x00000002)?true:false; return (GPIO1_READ & 0x00000002)?true:false;
} }
bool remote_button_hold_only(void) static bool remote_button_hold_only(void)
{ {
if(remote_type() == REMOTETYPE_H300_NONLCD) if(remote_type() == REMOTETYPE_H300_NONLCD)
return adc_scan(ADC_REMOTE)<0x0d; /* hold should be 0x00 */ return adc_scan(ADC_REMOTE)<0x0d; /* hold should be 0x00 */

View file

@ -21,17 +21,9 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
#define HAS_REMOTE_BUTTON_HOLD #define HAS_REMOTE_BUTTON_HOLD
bool button_hold(void);
bool remote_button_hold(void);
void button_init_device(void);
int button_read_device(void);
/* HD200 specific button codes */ /* HD200 specific button codes */
/* Main unit's buttons - flags as in original firmware*/ /* Main unit's buttons - flags as in original firmware*/
#define BUTTON_PLAY 0x00000001 #define BUTTON_PLAY 0x00000001

View file

@ -21,15 +21,7 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
#define BUTTON_REMOTE 0
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
/* HD300 specific button codes */ /* HD300 specific button codes */
#define BUTTON_PLAY 0x00000001 #define BUTTON_PLAY 0x00000001

View file

@ -23,11 +23,7 @@
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h> #include <stdbool.h>
#include "config.h"
#undef button_init_device
void button_init_device(void);
int button_read_device(int *data);
unsigned multimedia_to_button(int keyboard_key); unsigned multimedia_to_button(int keyboard_key);
unsigned dpad_to_button(int keyboard_key); unsigned dpad_to_button(int keyboard_key);
void android_ignore_back_button(bool yes); void android_ignore_back_button(bool yes);
@ -62,7 +58,4 @@ void android_ignore_back_button(bool yes);
#define BUTTON_FORCE_REDRAW 0x00200000 #define BUTTON_FORCE_REDRAW 0x00200000
/* No remote */
#define BUTTON_REMOTE 0
#endif /* _BUTTON_TARGET_H_ */ #endif /* _BUTTON_TARGET_H_ */

View file

@ -22,21 +22,6 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
/*
#define HAS_BUTTON_HOLD
bool button_hold(void);
*/
void button_init_device(void);
#ifdef HAVE_BUTTON_DATA
int button_read_device(int *data);
#else
int button_read_device(void);
#endif
/* Main unit's buttons */ /* Main unit's buttons */
#define BUTTON_UP 0x00000001 #define BUTTON_UP 0x00000001
#define BUTTON_DOWN 0x00000002 #define BUTTON_DOWN 0x00000002
@ -61,9 +46,6 @@ int button_read_device(void);
#define BUTTON_MAIN 0x1FFF #define BUTTON_MAIN 0x1FFF
/* No remote */
#define BUTTON_REMOTE 0
/* Software power-off */ /* Software power-off */
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -22,14 +22,7 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
bool headphones_inserted(void);
void button_init_device(void);
void button_close_device(void); void button_close_device(void);
int button_read_device(void);
/* Logical buttons key codes */ /* Logical buttons key codes */
#define BUTTON_UP 0x00000001 #define BUTTON_UP 0x00000001
@ -44,9 +37,6 @@ int button_read_device(void);
#define BUTTON_MAIN 0x1FF /* all buttons */ #define BUTTON_MAIN 0x1FF /* all buttons */
/* No remote */
#define BUTTON_REMOTE 0
/* Software power-off */ /* Software power-off */
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
/* About 3 seconds */ /* About 3 seconds */

View file

@ -27,9 +27,6 @@
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
#endif #endif
bool button_hold(void);
void button_init_device(void);
int button_read_device(int *data);
void button_set_touch_available(void); void button_set_touch_available(void);
/* Main unit's buttons */ /* Main unit's buttons */
@ -72,9 +69,6 @@ void button_set_touch_available(void);
BUTTON_BOTTOMRIGHT) BUTTON_BOTTOMRIGHT)
#endif #endif
/* No remote */
#define BUTTON_REMOTE 0
/* Software power-off */ /* Software power-off */
#define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_BUTTON BUTTON_POWER
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -21,15 +21,8 @@
#ifndef BUTTON_TARGET_H #ifndef BUTTON_TARGET_H
#define BUTTON_TARGET_H #define BUTTON_TARGET_H
#include <stdbool.h>
#include "config.h"
#define HAS_BUTTON_HOLD #define HAS_BUTTON_HOLD
bool button_hold(void);
void button_init_device(void);
int button_read_device(void);
/* Main unit's buttons */ /* Main unit's buttons */
#define BUTTON_SELECT 0x00000001 #define BUTTON_SELECT 0x00000001
#define BUTTON_VOL_UP 0x00000002 #define BUTTON_VOL_UP 0x00000002
@ -48,9 +41,6 @@ int button_read_device(void);
#define BUTTON_MAIN (BUTTON_SELECT | BUTTON_VOL_UP | BUTTON_VOL_DOWN | BUTTON_MENU \ #define BUTTON_MAIN (BUTTON_SELECT | BUTTON_VOL_UP | BUTTON_VOL_DOWN | BUTTON_MENU \
BUTTON_MENU | BUTTON_BACK | BUTTON_REWIND | BUTTON_FAST_FWD) BUTTON_MENU | BUTTON_BACK | BUTTON_REWIND | BUTTON_FAST_FWD)
/* No remote */
#define BUTTON_REMOTE 0
#define BUTTON_POWER 0 /* HACK */ #define BUTTON_POWER 0 /* HACK */
/* Software power-off */ /* Software power-off */

View file

@ -22,12 +22,6 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
void button_init_device(void);
int button_read_device(void);
/* Main unit's buttons */ /* Main unit's buttons */
#define BUTTON_ON 0x00000001 #define BUTTON_ON 0x00000001
#define BUTTON_OFF 0x00000002 #define BUTTON_OFF 0x00000002
@ -47,8 +41,6 @@ int button_read_device(void);
|BUTTON_UP|BUTTON_DOWN|BUTTON_PLAY\ |BUTTON_UP|BUTTON_DOWN|BUTTON_PLAY\
|BUTTON_F1|BUTTON_F2|BUTTON_F3) |BUTTON_F1|BUTTON_F2|BUTTON_F3)
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_OFF #define POWEROFF_BUTTON BUTTON_OFF
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -22,11 +22,7 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define button_init_device() #define button_init_device()
int button_read_device(void);
#define BUTTON_OFF 0x00000001 #define BUTTON_OFF 0x00000001
#define BUTTON_MENU 0x00000002 #define BUTTON_MENU 0x00000002
@ -39,8 +35,6 @@ int button_read_device(void);
#define BUTTON_MAIN (BUTTON_OFF|BUTTON_MENU|BUTTON_LEFT|BUTTON_RIGHT\ #define BUTTON_MAIN (BUTTON_OFF|BUTTON_MENU|BUTTON_LEFT|BUTTON_RIGHT\
|BUTTON_UP|BUTTON_DOWN) |BUTTON_UP|BUTTON_DOWN)
#define BUTTON_REMOTE 0
#define POWEROFF_BUTTON BUTTON_OFF #define POWEROFF_BUTTON BUTTON_OFF
#define POWEROFF_COUNT 10 #define POWEROFF_COUNT 10

View file

@ -22,14 +22,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_SERIAL_REMOTE #define HAS_SERIAL_REMOTE
void button_init_device(void);
int button_read_device(void);
/* Main unit's buttons */ /* Main unit's buttons */
#define BUTTON_ON 0x00000001 #define BUTTON_ON 0x00000001
#define BUTTON_STOP 0x00000002 #define BUTTON_STOP 0x00000002

View file

@ -22,14 +22,8 @@
#ifndef _BUTTON_TARGET_H_ #ifndef _BUTTON_TARGET_H_
#define _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_
#include <stdbool.h>
#include "config.h"
#define HAS_SERIAL_REMOTE #define HAS_SERIAL_REMOTE
void button_init_device(void);
int button_read_device(void);
/* Main unit's buttons */ /* Main unit's buttons */
#define BUTTON_ON 0x00000001 #define BUTTON_ON 0x00000001
#define BUTTON_OFF 0x00000002 #define BUTTON_OFF 0x00000002