diff --git a/firmware/export/button.h b/firmware/export/button.h index 3847d2ac9f..3f6052a309 100644 --- a/firmware/export/button.h +++ b/firmware/export/button.h @@ -28,8 +28,26 @@ #include "button-target.h" #endif +#ifndef BUTTON_REMOTE +# define BUTTON_REMOTE 0 +#endif + 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_close(void); int button_queue_count(void); diff --git a/firmware/target/arm/archos/av300/button-target.h b/firmware/target/arm/archos/av300/button-target.h index bda6a341cd..a4c439690f 100644 --- a/firmware/target/arm/archos/av300/button-target.h +++ b/firmware/target/arm/archos/av300/button-target.h @@ -22,12 +22,6 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - -void button_init_device(void); -int button_read_device(void); - /* Main unit's buttons */ #define BUTTON_ON 0x00000001 diff --git a/firmware/target/arm/as3525/button-clip.c b/firmware/target/arm/as3525/button-clip.c index 04be8450fd..18bac8aa01 100644 --- a/firmware/target/arm/as3525/button-clip.c +++ b/firmware/target/arm/as3525/button-clip.c @@ -21,7 +21,7 @@ * ****************************************************************************/ #include "system.h" -#include "button-target.h" +#include "button.h" #include "as3525v2.h" #ifndef BOOTLOADER #include "backlight.h" diff --git a/firmware/target/arm/as3525/button-e200v2-fuze.c b/firmware/target/arm/as3525/button-e200v2-fuze.c index 2cbdcf5130..13bd461bb6 100644 --- a/firmware/target/arm/as3525/button-e200v2-fuze.c +++ b/firmware/target/arm/as3525/button-e200v2-fuze.c @@ -23,7 +23,7 @@ #include "config.h" #include "system.h" #include "button.h" -#include "button-target.h" +#include "button.h" #include "backlight.h" #include "dbop-as3525.h" diff --git a/firmware/target/arm/as3525/sansa-c200v2/button-c200v2.c b/firmware/target/arm/as3525/sansa-c200v2/button-c200v2.c index 378b3131f2..36ef43d32b 100644 --- a/firmware/target/arm/as3525/sansa-c200v2/button-c200v2.c +++ b/firmware/target/arm/as3525/sansa-c200v2/button-c200v2.c @@ -21,7 +21,6 @@ #include "config.h" #include "system.h" -#include "button-target.h" #include "button.h" #include "backlight.h" #include "dbop-as3525.h" diff --git a/firmware/target/arm/as3525/sansa-c200v2/button-target.h b/firmware/target/arm/as3525/sansa-c200v2/button-target.h index 5f3c72521e..d5b22583c4 100644 --- a/firmware/target/arm/as3525/sansa-c200v2/button-target.h +++ b/firmware/target/arm/as3525/sansa-c200v2/button-target.h @@ -22,15 +22,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_BUTTON_HOLD -bool button_hold(void); -void button_init_device(void); -int button_read_device(void); - /* Sandisk Sansa c200 button codes */ /* Main unit's buttons */ @@ -46,9 +39,6 @@ int button_read_device(void); #define BUTTON_MAIN 0x00000fff -/* No Remote control */ -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/as3525/sansa-clip/button-target.h b/firmware/target/arm/as3525/sansa-clip/button-target.h index 238fd1dee5..85d5a477e1 100644 --- a/firmware/target/arm/as3525/sansa-clip/button-target.h +++ b/firmware/target/arm/as3525/sansa-clip/button-target.h @@ -22,15 +22,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_BUTTON_HOLD -void button_init_device(void); -int button_read_device(void); -bool button_hold(void); - /* Main unit's buttons */ #define BUTTON_HOME 0x00000001 @@ -50,8 +43,6 @@ bool button_hold(void); |BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT|BUTTON_RIGHT\ |BUTTON_SELECT|BUTTON_POWER) -#define BUTTON_REMOTE 0 - /* Software power-off */ #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/as3525/sansa-clipplus/button-clip.c b/firmware/target/arm/as3525/sansa-clipplus/button-clip.c index 6514346654..60b8c8f7a3 100644 --- a/firmware/target/arm/as3525/sansa-clipplus/button-clip.c +++ b/firmware/target/arm/as3525/sansa-clipplus/button-clip.c @@ -19,7 +19,7 @@ * KIND, either express or implied. * ****************************************************************************/ -#include "button-target.h" +#include "button.h" #include "as3525v2.h" #include "kernel.h" diff --git a/firmware/target/arm/as3525/sansa-clipplus/button-target.h b/firmware/target/arm/as3525/sansa-clipplus/button-target.h index c341a94220..8176382ba2 100644 --- a/firmware/target/arm/as3525/sansa-clipplus/button-target.h +++ b/firmware/target/arm/as3525/sansa-clipplus/button-target.h @@ -22,12 +22,6 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - -void button_init_device(void); -int button_read_device(void); - /* Main unit's buttons */ #define BUTTON_HOME 0x00000001 @@ -47,8 +41,6 @@ int button_read_device(void); |BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT|BUTTON_RIGHT\ |BUTTON_SELECT|BUTTON_POWER) -#define BUTTON_REMOTE 0 - /* Software power-off */ #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/as3525/sansa-clipv2/button-target.h b/firmware/target/arm/as3525/sansa-clipv2/button-target.h index 238fd1dee5..85d5a477e1 100644 --- a/firmware/target/arm/as3525/sansa-clipv2/button-target.h +++ b/firmware/target/arm/as3525/sansa-clipv2/button-target.h @@ -22,15 +22,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_BUTTON_HOLD -void button_init_device(void); -int button_read_device(void); -bool button_hold(void); - /* Main unit's buttons */ #define BUTTON_HOME 0x00000001 @@ -50,8 +43,6 @@ bool button_hold(void); |BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT|BUTTON_RIGHT\ |BUTTON_SELECT|BUTTON_POWER) -#define BUTTON_REMOTE 0 - /* Software power-off */ #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/as3525/sansa-clipzip/button-clipzip.c b/firmware/target/arm/as3525/sansa-clipzip/button-clipzip.c index c22c5e24e9..4fdb87fc1d 100644 --- a/firmware/target/arm/as3525/sansa-clipzip/button-clipzip.c +++ b/firmware/target/arm/as3525/sansa-clipzip/button-clipzip.c @@ -21,7 +21,7 @@ ****************************************************************************/ #include "config.h" -#include "button-target.h" +#include "button.h" #include "as3525v2.h" #include "system.h" #include "kernel.h" diff --git a/firmware/target/arm/as3525/sansa-clipzip/button-target.h b/firmware/target/arm/as3525/sansa-clipzip/button-target.h index 8a93d45daa..8176382ba2 100644 --- a/firmware/target/arm/as3525/sansa-clipzip/button-target.h +++ b/firmware/target/arm/as3525/sansa-clipzip/button-target.h @@ -22,11 +22,6 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include "config.h" - -void button_init_device(void); -int button_read_device(void); - /* Main unit's buttons */ #define BUTTON_HOME 0x00000001 @@ -46,8 +41,6 @@ int button_read_device(void); |BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT|BUTTON_RIGHT\ |BUTTON_SELECT|BUTTON_POWER) -#define BUTTON_REMOTE 0 - /* Software power-off */ #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/as3525/sansa-e200v2/button-target.h b/firmware/target/arm/as3525/sansa-e200v2/button-target.h index 7a0e9e50f1..4c41a4b6df 100644 --- a/firmware/target/arm/as3525/sansa-e200v2/button-target.h +++ b/firmware/target/arm/as3525/sansa-e200v2/button-target.h @@ -22,14 +22,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_BUTTON_HOLD -bool button_hold(void); -void button_init_device(void); -int button_read_device(void); unsigned short button_read_dbop(void); #define get_scrollwheel button_read_dbop @@ -54,9 +48,6 @@ unsigned short button_read_dbop(void); #define BUTTON_MAIN 0x00000fff -/* No Remote control */ -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/as3525/sansa-fuze/button-target.h b/firmware/target/arm/as3525/sansa-fuze/button-target.h index 2cee93723e..1bcc739413 100644 --- a/firmware/target/arm/as3525/sansa-fuze/button-target.h +++ b/firmware/target/arm/as3525/sansa-fuze/button-target.h @@ -22,14 +22,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_BUTTON_HOLD -void button_init_device(void); -bool button_hold(void); -int button_read_device(void); unsigned short button_read_dbop(void); #define get_scrollwheel button_read_dbop @@ -61,9 +55,6 @@ unsigned short button_read_dbop(void); |BUTTON_SCROLL_BACK|BUTTON_SCROLL_FWD \ |BUTTON_HOLD) -/* No Remote control */ -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/as3525/sansa-fuzev2/button-target.h b/firmware/target/arm/as3525/sansa-fuzev2/button-target.h index 596ac01262..6ea1a9616e 100644 --- a/firmware/target/arm/as3525/sansa-fuzev2/button-target.h +++ b/firmware/target/arm/as3525/sansa-fuzev2/button-target.h @@ -22,14 +22,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_BUTTON_HOLD -void button_init_device(void); -bool button_hold(void); -int button_read_device(void); /* Sandisk Sansa Fuze button codes */ /* Main unit's buttons - mapped for optimal reading */ @@ -52,9 +46,6 @@ int button_read_device(void); |BUTTON_SCROLL_BACK|BUTTON_SCROLL_FWD \ |BUTTON_HOLD) -/* No Remote control */ -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/as3525/sansa-m200v4/button-target.h b/firmware/target/arm/as3525/sansa-m200v4/button-target.h index 49a7409a6b..00876c4a3d 100644 --- a/firmware/target/arm/as3525/sansa-m200v4/button-target.h +++ b/firmware/target/arm/as3525/sansa-m200v4/button-target.h @@ -22,15 +22,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_BUTTON_HOLD -void button_init_device(void); -int button_read_device(void); -bool button_hold(void); - /* Main unit's buttons */ #define BUTTON_POWER 0x00000001 #define BUTTON_VOL_UP 0x00000002 @@ -46,8 +39,6 @@ bool button_hold(void); |BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT\ |BUTTON_RIGHT|BUTTON_SELECT|BUTTON_HOLD) -#define BUTTON_REMOTE 0 - /* Software power-off */ #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 40 diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c index 965030ecc3..89a07939b6 100644 --- a/firmware/target/arm/as3525/system-as3525.c +++ b/firmware/target/arm/as3525/system-as3525.c @@ -29,7 +29,7 @@ #include "dma-target.h" #include "clock-target.h" #include "fmradio_i2c.h" -#include "button-target.h" +#include "button.h" #include "backlight-target.h" #include "lcd.h" diff --git a/firmware/target/arm/at91sam/lyre_proto1/button-target.h b/firmware/target/arm/at91sam/lyre_proto1/button-target.h index e05f9f294f..bfba483df1 100644 --- a/firmware/target/arm/at91sam/lyre_proto1/button-target.h +++ b/firmware/target/arm/at91sam/lyre_proto1/button-target.h @@ -22,9 +22,6 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define BUTTON_SELECT 0x00000001 #define BUTTON_MENU 0x00000002 #define BUTTON_PLAY 0x00000004 @@ -38,11 +35,5 @@ #define BUTTON_MAIN (BUTTON_UP|BUTTON_DOWN|BUTTON_RIGHT|BUTTON_LEFT \ |BUTTON_SELECT|BUTTON_MENU|BUTTON_PLAY \ |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_ */ diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/button-target.h b/firmware/target/arm/imx233/sansa-fuzeplus/button-target.h index 1536dbe1ab..89088b5d01 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/button-target.h +++ b/firmware/target/arm/imx233/sansa-fuzeplus/button-target.h @@ -21,11 +21,6 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - -void button_init_device(void); -int button_read_device(void); bool button_debug_screen(void); /* Main unit's buttons */ @@ -49,8 +44,6 @@ bool button_debug_screen(void); BUTTON_PLAYPAUSE|BUTTON_BACK| \ BUTTON_BOTTOMRIGHT|BUTTON_BOTTOMLEFT) -#define BUTTON_REMOTE 0 - /* Software power-off */ #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/imx31/gigabeat-s/button-target.h b/firmware/target/arm/imx31/gigabeat-s/button-target.h index 940ebac2f2..ce624ed6cc 100644 --- a/firmware/target/arm/imx31/gigabeat-s/button-target.h +++ b/firmware/target/arm/imx31/gigabeat-s/button-target.h @@ -21,7 +21,6 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include #include "config.h" #define HAS_BUTTON_HOLD @@ -30,10 +29,7 @@ #define BUTTON_DRIVER_CLOSE #endif -bool button_hold(void); -void button_init_device(void); void button_close_device(void); -int button_read_device(void); void button_power_event(void); void headphone_detect_event(void); void headphone_init(void); diff --git a/firmware/target/arm/ipod/button-target.h b/firmware/target/arm/ipod/button-target.h index 67bdc72955..82f600d302 100644 --- a/firmware/target/arm/ipod/button-target.h +++ b/firmware/target/arm/ipod/button-target.h @@ -21,15 +21,10 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include #include "config.h" #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_3g_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\ |BUTTON_RC_LEFT|BUTTON_RC_RIGHT\ |BUTTON_RC_VOL_UP|BUTTON_RC_VOL_DOWN) -#else -#define BUTTON_REMOTE 0 #endif /* This is for later diff --git a/firmware/target/arm/iriver/h10/button-target.h b/firmware/target/arm/iriver/h10/button-target.h index c2d7165ac0..2cd4a1454c 100644 --- a/firmware/target/arm/iriver/h10/button-target.h +++ b/firmware/target/arm/iriver/h10/button-target.h @@ -24,17 +24,9 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_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 */ /* Main unit's buttons */ diff --git a/firmware/target/arm/olympus/mrobe-100/button-target.h b/firmware/target/arm/olympus/mrobe-100/button-target.h index 93d42d62fb..050fc8de1a 100644 --- a/firmware/target/arm/olympus/mrobe-100/button-target.h +++ b/firmware/target/arm/olympus/mrobe-100/button-target.h @@ -22,17 +22,12 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include #include "config.h" #define MEP_BUTTON_HEADER 0x1a #define MEP_BUTTON_ID 0x09 #define MEP_ABSOLUTE_HEADER 0x0b -bool button_hold(void); -void button_init_device(void); -int button_read_device(void); - #ifndef BOOTLOADER void button_int(void); #endif @@ -60,7 +55,6 @@ void button_int(void); #ifdef HAVE_REMOTE_LCD void headphones_int(void); -bool remote_button_hold(void); /* Remote control's buttons */ #define BUTTON_RC_PLAY 0x00010000 @@ -77,8 +71,6 @@ bool remote_button_hold(void); #define HAS_REMOTE_BUTTON_HOLD #define RC_POWEROFF_BUTTON BUTTON_RC_PLAY -#else -#define BUTTON_REMOTE 0 #endif /* HAVE_REMOTE_LCD */ #endif /* _BUTTON_TARGET_H_ */ diff --git a/firmware/target/arm/pbell/vibe500/button-target.h b/firmware/target/arm/pbell/vibe500/button-target.h index fa29c275c0..93c8da42bd 100644 --- a/firmware/target/arm/pbell/vibe500/button-target.h +++ b/firmware/target/arm/pbell/vibe500/button-target.h @@ -21,7 +21,6 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include #include "config.h" #define MEP_BUTTON_HEADER 0x19 @@ -31,10 +30,6 @@ #define HAS_BUTTON_HOLD -bool button_hold(void); -void button_init_device(void); -int button_read_device(void); - #ifndef BOOTLOADER void button_int(void); #endif @@ -57,8 +52,6 @@ void button_int(void); #define BUTTON_MAIN 0x00000fff -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/philips/hdd1630/button-target.h b/firmware/target/arm/philips/hdd1630/button-target.h index b7fc21aca2..28364c6b53 100644 --- a/firmware/target/arm/philips/hdd1630/button-target.h +++ b/firmware/target/arm/philips/hdd1630/button-target.h @@ -22,7 +22,6 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include #include "config.h" #define MEP_BUTTON_HEADER 0x19 @@ -31,10 +30,6 @@ #define HAS_BUTTON_HOLD -bool button_hold(void); -void button_init_device(void); -int button_read_device(void); - #ifndef BOOTLOADER void button_int(void); #endif @@ -54,9 +49,6 @@ void button_int(void); #define BUTTON_MAIN 0x00000fff -/* No Remote control */ -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/philips/hdd6330/button-target.h b/firmware/target/arm/philips/hdd6330/button-target.h index 8d4ed5ef5f..f8eaa82b22 100644 --- a/firmware/target/arm/philips/hdd6330/button-target.h +++ b/firmware/target/arm/philips/hdd6330/button-target.h @@ -22,7 +22,6 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include #include "config.h" #define MEP_BUTTON_HEADER 0x19 @@ -33,10 +32,6 @@ #define HAS_BUTTON_HOLD -bool button_hold(void); -void button_init_device(void); -int button_read_device(void); - #ifndef BOOTLOADER void button_int(void); #endif @@ -57,9 +52,6 @@ void button_int(void); #define BUTTON_TAP 0x00001000 #define BUTTON_MAIN 0x00001fff -/* No Remote control */ -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/philips/sa9200/button-target.h b/firmware/target/arm/philips/sa9200/button-target.h index 7d060157c6..1c86a75ce2 100644 --- a/firmware/target/arm/philips/sa9200/button-target.h +++ b/firmware/target/arm/philips/sa9200/button-target.h @@ -22,18 +22,12 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define MEP_BUTTON_HEADER 0x1a #define MEP_BUTTON_ID 0x09 #define MEP_ABSOLUTE_HEADER 0x0b #define HAS_BUTTON_HOLD -bool button_hold(void); -void button_init_device(void); -int button_read_device(void); void button_int(void); /* Main unit's buttons */ @@ -51,9 +45,6 @@ void button_int(void); #define BUTTON_MAIN 0x00000fff -/* No Remote control */ -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/pnx0101/iriver-ifp7xx/button-target.h b/firmware/target/arm/pnx0101/iriver-ifp7xx/button-target.h index 0fabc65396..6932b8956f 100644 --- a/firmware/target/arm/pnx0101/iriver-ifp7xx/button-target.h +++ b/firmware/target/arm/pnx0101/iriver-ifp7xx/button-target.h @@ -24,15 +24,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_BUTTON_HOLD -bool button_hold(void); -void button_init_device(void); -int button_read_device(void); - /* iriver IFP7XX specific button codes */ #define BUTTON_PLAY 0x00000001 @@ -50,8 +43,6 @@ int button_read_device(void); |BUTTON_LEFT|BUTTON_RIGHT|BUTTON_UP|BUTTON_DOWN\ |BUTTON_MODE|BUTTON_EQ) -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_PLAY #define POWEROFF_COUNT 40 diff --git a/firmware/target/arm/rk27xx/hm60x/button-target.h b/firmware/target/arm/rk27xx/hm60x/button-target.h index 0209e0637d..9165a99f75 100644 --- a/firmware/target/arm/rk27xx/hm60x/button-target.h +++ b/firmware/target/arm/rk27xx/hm60x/button-target.h @@ -21,23 +21,12 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - -void button_init_device(void); -int button_read_device(void); - - #define BUTTON_UP 0x00000001 #define BUTTON_DOWN 0x00000004 #define BUTTON_LEFT 0x00000008 #define BUTTON_RIGHT 0x00000010 #define BUTTON_PLAY 0x00000020 - -#define BUTTON_REMOTE 0 - - #define POWEROFF_BUTTON 0x02 #define POWEROFF_COUNT 30 diff --git a/firmware/target/arm/rk27xx/hm801/button-target.h b/firmware/target/arm/rk27xx/hm801/button-target.h index 4af054b07c..4449266217 100644 --- a/firmware/target/arm/rk27xx/hm801/button-target.h +++ b/firmware/target/arm/rk27xx/hm801/button-target.h @@ -21,13 +21,6 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - -void button_init_device(void); -int button_read_device(void); - - #define BUTTON_UP 0x00000001 #define BUTTON_DOWN 0x00000004 #define BUTTON_LEFT 0x00000008 @@ -37,10 +30,6 @@ int button_read_device(void); #define BUTTON_PREV 0x00000080 #define BUTTON_PLAY 0x00000100 - -#define BUTTON_REMOTE 0 - - #define POWEROFF_BUTTON 0x02 #define POWEROFF_COUNT 30 diff --git a/firmware/target/arm/rk27xx/rk27generic/button-target.h b/firmware/target/arm/rk27xx/rk27generic/button-target.h index cc14dfc32b..55169b06f6 100644 --- a/firmware/target/arm/rk27xx/rk27generic/button-target.h +++ b/firmware/target/arm/rk27xx/rk27generic/button-target.h @@ -21,12 +21,6 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - -void button_init_device(void); -int button_read_device(void); - /* Main unit's buttons */ /* values assigned corespond to GPIOs numbers */ #define BUTTON_PLAY 0x00000002 @@ -40,8 +34,6 @@ int button_read_device(void); #define BUTTON_RIGHT BUTTON_FF #define BUTTON_ON BUTTON_PLAY -#define BUTTON_REMOTE 0 - #define BUTTON_MAIN (BUTTON_PLAY|BUTTON_REW|BUTTON_FF|\ BUTTON_VOL|BUTTON_M) diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/button-target.h b/firmware/target/arm/s3c2440/gigabeat-fx/button-target.h index e43ad27764..6852e733ef 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/button-target.h +++ b/firmware/target/arm/s3c2440/gigabeat-fx/button-target.h @@ -21,14 +21,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_BUTTON_HOLD -bool button_hold(void); -void button_init_device(void); -int button_read_device(void); void touchpad_set_sensitivity(int level); /* Toshiba Gigabeat specific button codes */ diff --git a/firmware/target/arm/s3c2440/mini2440/button-target.h b/firmware/target/arm/s3c2440/mini2440/button-target.h index 66419b464a..685af7270f 100644 --- a/firmware/target/arm/s3c2440/mini2440/button-target.h +++ b/firmware/target/arm/s3c2440/mini2440/button-target.h @@ -21,13 +21,6 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - - -bool button_hold(void); -void button_init_device(void); -int button_read_device(int*); void touchpad_set_sensitivity(int level); /* Mini2440 specific button codes */ @@ -76,8 +69,6 @@ void touchpad_set_sensitivity(int level); BUTTON_UP |BUTTON_DOWN|BUTTON_SELECT | \ BUTTON_A |BUTTON_POWER ) -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_MENU #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/s5l8700/ipodnano2g/button-target.h b/firmware/target/arm/s5l8700/ipodnano2g/button-target.h index 67bdc72955..82f600d302 100644 --- a/firmware/target/arm/s5l8700/ipodnano2g/button-target.h +++ b/firmware/target/arm/s5l8700/ipodnano2g/button-target.h @@ -21,15 +21,10 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include #include "config.h" #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_3g_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\ |BUTTON_RC_LEFT|BUTTON_RC_RIGHT\ |BUTTON_RC_VOL_UP|BUTTON_RC_VOL_DOWN) -#else -#define BUTTON_REMOTE 0 #endif /* This is for later diff --git a/firmware/target/arm/s5l8700/meizu-m3/button-target.h b/firmware/target/arm/s5l8700/meizu-m3/button-target.h index 8aaca17a54..93f102c410 100644 --- a/firmware/target/arm/s5l8700/meizu-m3/button-target.h +++ b/firmware/target/arm/s5l8700/meizu-m3/button-target.h @@ -21,14 +21,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include - #define HAS_BUTTON_HOLD -bool button_hold(void); -void button_init_device(void); -int button_read_device(void); - /* Meizu M3 specific button codes */ #define BUTTON_PREVNEXT 0x00000001 #define BUTTON_MENU 0x00000002 @@ -40,8 +34,6 @@ int button_read_device(void); #define BUTTON_MAIN (BUTTON_PREVNEXT|BUTTON_MENU|BUTTON_PLAY) -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_PLAY #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/s5l8700/meizu-m6sl/button-target.h b/firmware/target/arm/s5l8700/meizu-m6sl/button-target.h index 7fab9c4d64..022a0b61f1 100644 --- a/firmware/target/arm/s5l8700/meizu-m6sl/button-target.h +++ b/firmware/target/arm/s5l8700/meizu-m6sl/button-target.h @@ -21,15 +21,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_BUTTON_HOLD -bool button_hold(void); -void button_init_device(void); -int button_read_device(void); - /* Toshiba Gigabeat specific button codes */ #define BUTTON_LEFT 0x00000001 @@ -46,8 +39,6 @@ int button_read_device(void); #define BUTTON_MAIN (BUTTON_MENU|BUTTON_LEFT|BUTTON_RIGHT\ |BUTTON_UP|BUTTON_DOWN|BUTTON_SELECT|BUTTON_PLAY) -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_PLAY #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/s5l8700/meizu-m6sp/button-target.h b/firmware/target/arm/s5l8700/meizu-m6sp/button-target.h index db6445fe30..58d19d177c 100644 --- a/firmware/target/arm/s5l8700/meizu-m6sp/button-target.h +++ b/firmware/target/arm/s5l8700/meizu-m6sp/button-target.h @@ -21,15 +21,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_BUTTON_HOLD -bool button_hold(void); -void button_init_device(void); -int button_read_device(void); - /* Meizu M6 specific button codes */ #define BUTTON_LEFT 0x00000001 @@ -43,8 +36,6 @@ int button_read_device(void); #define BUTTON_MAIN (BUTTON_LEFT|BUTTON_RIGHT|BUTTON_PLAY|BUTTON_MENU\ |BUTTON_SELECT|BUTTON_ENTER) -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_PLAY #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/s5l8700/yps3/button-target.h b/firmware/target/arm/s5l8700/yps3/button-target.h index 86e8488857..4b3ffa4a76 100644 --- a/firmware/target/arm/s5l8700/yps3/button-target.h +++ b/firmware/target/arm/s5l8700/yps3/button-target.h @@ -21,14 +21,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include - #define HAS_BUTTON_HOLD -bool button_hold(void); -void button_init_device(void); -int button_read_device(void); - #define BUTTON_BACK 0x00000001 #define BUTTON_MENU 0x00000002 #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|\ BUTTON_RIGHT|BUTTON_SELECT) -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 #endif /* _BUTTON_TARGET_H_ */ - diff --git a/firmware/target/arm/s5l8702/ipod6g/button-target.h b/firmware/target/arm/s5l8702/ipod6g/button-target.h index 0bd89d1d2a..ed17fc4baa 100644 --- a/firmware/target/arm/s5l8702/ipod6g/button-target.h +++ b/firmware/target/arm/s5l8702/ipod6g/button-target.h @@ -21,15 +21,10 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include #include "config.h" #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_3g_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\ |BUTTON_RC_LEFT|BUTTON_RC_RIGHT\ |BUTTON_RC_VOL_UP|BUTTON_RC_VOL_DOWN) -#else -#define BUTTON_REMOTE 0 #endif /* This is for later diff --git a/firmware/target/arm/samsung/button-target.h b/firmware/target/arm/samsung/button-target.h index 035010a9c8..61561dc86d 100644 --- a/firmware/target/arm/samsung/button-target.h +++ b/firmware/target/arm/samsung/button-target.h @@ -22,15 +22,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #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 */ /* Main unit's buttons */ @@ -46,9 +39,6 @@ int button_read_device(void); #define BUTTON_MAIN 0x000000ff -/* No Remote control */ -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_PLAY #define POWEROFF_COUNT 15 diff --git a/firmware/target/arm/sandisk/sansa-c200/button-target.h b/firmware/target/arm/sandisk/sansa-c200/button-target.h index cc668c4015..1b352975e5 100644 --- a/firmware/target/arm/sandisk/sansa-c200/button-target.h +++ b/firmware/target/arm/sandisk/sansa-c200/button-target.h @@ -22,15 +22,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_BUTTON_HOLD -bool button_hold(void); -void button_init_device(void); -int button_read_device(void); - /* Sandisk Sansa c200 button codes */ /* Main unit's buttons */ @@ -46,9 +39,6 @@ int button_read_device(void); #define BUTTON_MAIN 0x00000fff -/* No Remote control */ -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/sandisk/sansa-e200/button-target.h b/firmware/target/arm/sandisk/sansa-e200/button-target.h index b392851d50..162254746b 100644 --- a/firmware/target/arm/sandisk/sansa-e200/button-target.h +++ b/firmware/target/arm/sandisk/sansa-e200/button-target.h @@ -22,14 +22,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_BUTTON_HOLD -bool button_hold(void); -void button_init_device(void); -int button_read_device(void); void clickwheel_int(void); void button_int(void); @@ -49,9 +43,6 @@ void button_int(void); #define BUTTON_MAIN 0x00000fff -/* No Remote control */ -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/sandisk/sansa-view/button-target.h b/firmware/target/arm/sandisk/sansa-view/button-target.h index 18931da700..6b49f9053b 100644 --- a/firmware/target/arm/sandisk/sansa-view/button-target.h +++ b/firmware/target/arm/sandisk/sansa-view/button-target.h @@ -22,14 +22,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_BUTTON_HOLD -void button_init_device(void); -bool button_hold(void); -int button_read_device(void); /* Sandisk Sansa View button codes */ /* Main unit's buttons */ @@ -53,9 +47,6 @@ int button_read_device(void); |BUTTON_SCROLL_BACK|BUTTON_SCROLL_FWD \ |BUTTON_HOLD) -/* No Remote control */ -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/tatung/tpj1022/button-target.h b/firmware/target/arm/tatung/tpj1022/button-target.h index 979cf88936..1143c1b1da 100644 --- a/firmware/target/arm/tatung/tpj1022/button-target.h +++ b/firmware/target/arm/tatung/tpj1022/button-target.h @@ -24,11 +24,6 @@ #define HAS_BUTTON_HOLD -#define button_init_device() - -bool button_hold(void); -int button_read_device(void); - /* Main unit's buttons */ #define BUTTON_VOL_DOWN 0x00000001 @@ -50,9 +45,6 @@ int button_read_device(void); #define BUTTON_MAIN 0x00000FFF -/* No Remote control */ -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/tcc77x/c100/button-target.h b/firmware/target/arm/tcc77x/c100/button-target.h index 73c04b6ed6..0e8b7e8f1c 100644 --- a/firmware/target/arm/tcc77x/c100/button-target.h +++ b/firmware/target/arm/tcc77x/c100/button-target.h @@ -22,15 +22,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_BUTTON_HOLD -void button_init_device(void); -int button_read_device(void); -bool button_hold(void); - /* Main unit's buttons */ #define BUTTON_POWER 0x00000001 #define BUTTON_VOLUP 0x00000002 @@ -45,8 +38,6 @@ bool button_hold(void); |BUTTON_UP|BUTTON_DOWN|BUTTON_LEFT\ |BUTTON_RIGHT|BUTTON_SELECT) -#define BUTTON_REMOTE 0 - /* Software power-off */ #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 40 diff --git a/firmware/target/arm/tcc77x/iaudio7/button-target.h b/firmware/target/arm/tcc77x/iaudio7/button-target.h index fafaf4a303..9d232d9ae8 100644 --- a/firmware/target/arm/tcc77x/iaudio7/button-target.h +++ b/firmware/target/arm/tcc77x/iaudio7/button-target.h @@ -21,15 +21,8 @@ #ifndef _IAUDIO7_BUTTON_TARGET_H_ #define _IAUDIO7_BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_BUTTON_HOLD -bool button_hold(void); -void button_init_device(void); -int button_read_device(void); - /* Main unit's buttons */ #define BUTTON_POWER 0x00000001 #define BUTTON_VOLUP 0x00000002 @@ -47,9 +40,6 @@ int button_read_device(void); BUTTON_MENU|BUTTON_LEFT|BUTTON_RIGHT| \ BUTTON_PLAY|BUTTON_STOP) -/* No remote */ -#define BUTTON_REMOTE 0 - /* Software power-off */ #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/tcc77x/logikdax/button-target.h b/firmware/target/arm/tcc77x/logikdax/button-target.h index 4146745cdc..505fe438ed 100644 --- a/firmware/target/arm/tcc77x/logikdax/button-target.h +++ b/firmware/target/arm/tcc77x/logikdax/button-target.h @@ -22,12 +22,6 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - -void button_init_device(void); -int button_read_device(void); - /* Main unit's buttons */ #define BUTTON_POWERPLAY 0x00000001 #define BUTTON_MODE 0x00000002 @@ -44,8 +38,6 @@ int button_read_device(void); |BUTTON_REC|BUTTON_PRESET|BUTTON_LEFT\ |BUTTON_RIGHT|BUTTON_UP|BUTTON_DOWN|BUTTON_SELECT) -#define BUTTON_REMOTE 0 - /* Software power-off */ #define POWEROFF_BUTTON BUTTON_POWERPLAY #define POWEROFF_COUNT 40 diff --git a/firmware/target/arm/tcc77x/m200/button-target.h b/firmware/target/arm/tcc77x/m200/button-target.h index acf80b2ed7..b96df22edc 100644 --- a/firmware/target/arm/tcc77x/m200/button-target.h +++ b/firmware/target/arm/tcc77x/m200/button-target.h @@ -22,15 +22,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_BUTTON_HOLD -void button_init_device(void); -int button_read_device(void); -bool button_hold(void); - /* Main unit's buttons */ #define BUTTON_MENU 0x00000001 #define BUTTON_VOLUP 0x00000002 @@ -45,8 +38,6 @@ bool button_hold(void); |BUTTON_PLAYPAUSE|BUTTON_REPEATAB|BUTTON_LEFT\ |BUTTON_RIGHT|BUTTON_SELECT) -#define BUTTON_REMOTE 0 - /* Software power-off */ #define POWEROFF_BUTTON BUTTON_MENU #define POWEROFF_COUNT 40 diff --git a/firmware/target/arm/tcc780x/cowond2/button-target.h b/firmware/target/arm/tcc780x/cowond2/button-target.h index 7d3736fe67..cca1021957 100644 --- a/firmware/target/arm/tcc780x/cowond2/button-target.h +++ b/firmware/target/arm/tcc780x/cowond2/button-target.h @@ -22,15 +22,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_BUTTON_HOLD -bool button_hold(void); -void button_init_device(void); -int button_read_device(int *data); - /* Main unit's buttons */ #define BUTTON_POWER 0x00000001 #define BUTTON_PLUS 0x00000002 @@ -56,9 +49,6 @@ int button_read_device(int *data); #define BUTTON_MAIN 0x1FFF -/* No remote */ -#define BUTTON_REMOTE 0 - /* Software power-off */ #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/arm/tms320dm320/creative-zvm/button-target.h b/firmware/target/arm/tms320dm320/creative-zvm/button-target.h index 173d98bf30..50a182a210 100644 --- a/firmware/target/arm/tms320dm320/creative-zvm/button-target.h +++ b/firmware/target/arm/tms320dm320/creative-zvm/button-target.h @@ -47,8 +47,6 @@ #define BUTTON_VOL_DOWN (1 << 14) #endif -#define BUTTON_REMOTE 0 - #ifndef CREATIVE_ZV #define BUTTON_MAIN ( BUTTON_BACK | BUTTON_MENU | BUTTON_LEFT | BUTTON_RIGHT \ | BUTTON_UP | BUTTON_DOWN | BUTTON_SELECT | BUTTON_POWER \ @@ -65,12 +63,6 @@ #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); -int get_debug_info(int choice); - #endif /* _BUTTON_TARGET_H_ */ diff --git a/firmware/target/arm/tms320dm320/mrobe-500/button-target.h b/firmware/target/arm/tms320dm320/mrobe-500/button-target.h index cd746dbb5b..7349387041 100644 --- a/firmware/target/arm/tms320dm320/mrobe-500/button-target.h +++ b/firmware/target/arm/tms320dm320/mrobe-500/button-target.h @@ -22,14 +22,10 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include "config.h" +#include #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 */ void touch_read_coord(void); diff --git a/firmware/target/arm/tms320dm320/sansa-connect/button-target.h b/firmware/target/arm/tms320dm320/sansa-connect/button-target.h index 2eb571ae68..5dddfc68d3 100644 --- a/firmware/target/arm/tms320dm320/sansa-connect/button-target.h +++ b/firmware/target/arm/tms320dm320/sansa-connect/button-target.h @@ -22,10 +22,6 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include "config.h" - -#define BUTTON_REMOTE 0 - /* these definitions match the avr hid reply */ #define BUTTON_LEFT (1 << 2) #define BUTTON_UP (1 << 3) @@ -43,8 +39,6 @@ #define BUTTON_SCROLL_FWD (1 << 7) #define BUTTON_SCROLL_BACK (1 << 8) - -#define BUTTON_REMOTE 0 #define BUTTON_MAIN (BUTTON_LEFT | BUTTON_UP | BUTTON_RIGHT | BUTTON_DOWN |\ BUTTON_SELECT | BUTTON_VOL_UP | BUTTON_VOL_DOWN |\ BUTTON_NEXT | BUTTON_PREV | BUTTON_POWER |\ @@ -55,10 +49,4 @@ #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_ */ diff --git a/firmware/target/coldfire/iaudio/button-target.h b/firmware/target/coldfire/iaudio/button-target.h index 0259ea2134..655a172404 100644 --- a/firmware/target/coldfire/iaudio/button-target.h +++ b/firmware/target/coldfire/iaudio/button-target.h @@ -21,16 +21,9 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_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); bool button_scan_enabled(void); diff --git a/firmware/target/coldfire/iaudio/m3/button-target.h b/firmware/target/coldfire/iaudio/m3/button-target.h index 66457fe07c..8409cf6075 100644 --- a/firmware/target/coldfire/iaudio/m3/button-target.h +++ b/firmware/target/coldfire/iaudio/m3/button-target.h @@ -22,17 +22,9 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_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 */ /* Main unit's buttons */ diff --git a/firmware/target/coldfire/iriver/button-target.h b/firmware/target/coldfire/iriver/button-target.h index 4c15630e34..a677d042b3 100644 --- a/firmware/target/coldfire/iriver/button-target.h +++ b/firmware/target/coldfire/iriver/button-target.h @@ -24,17 +24,12 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include #include "config.h" +#include #define HAS_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 void button_enable_scan(bool enable); bool button_scan_enabled(void); diff --git a/firmware/target/coldfire/iriver/h100/button-h100.c b/firmware/target/coldfire/iriver/h100/button-h100.c index c32b979a00..dbaefdcf2a 100644 --- a/firmware/target/coldfire/iriver/h100/button-h100.c +++ b/firmware/target/coldfire/iriver/h100/button-h100.c @@ -39,7 +39,7 @@ bool button_hold(void) 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) return adc_scan(ADC_REMOTE)<0x0d; /* hold should be 0x00 */ diff --git a/firmware/target/coldfire/iriver/h300/button-h300.c b/firmware/target/coldfire/iriver/h300/button-h300.c index 43f5250191..74c14fb144 100644 --- a/firmware/target/coldfire/iriver/h300/button-h300.c +++ b/firmware/target/coldfire/iriver/h300/button-h300.c @@ -55,7 +55,7 @@ bool button_hold(void) 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) return adc_scan(ADC_REMOTE)<0x0d; /* hold should be 0x00 */ diff --git a/firmware/target/coldfire/mpio/hd200/button-target.h b/firmware/target/coldfire/mpio/hd200/button-target.h index b7c31f8c59..3370935a45 100644 --- a/firmware/target/coldfire/mpio/hd200/button-target.h +++ b/firmware/target/coldfire/mpio/hd200/button-target.h @@ -21,17 +21,9 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_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 */ /* Main unit's buttons - flags as in original firmware*/ #define BUTTON_PLAY 0x00000001 diff --git a/firmware/target/coldfire/mpio/hd300/button-target.h b/firmware/target/coldfire/mpio/hd300/button-target.h index 5cb2ae8bf2..7f902b0ecf 100644 --- a/firmware/target/coldfire/mpio/hd300/button-target.h +++ b/firmware/target/coldfire/mpio/hd300/button-target.h @@ -21,15 +21,7 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #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 */ #define BUTTON_PLAY 0x00000001 diff --git a/firmware/target/hosted/android/app/button-target.h b/firmware/target/hosted/android/app/button-target.h index b532c94f47..326d65872d 100644 --- a/firmware/target/hosted/android/app/button-target.h +++ b/firmware/target/hosted/android/app/button-target.h @@ -23,11 +23,7 @@ #define _BUTTON_TARGET_H_ #include -#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 dpad_to_button(int keyboard_key); void android_ignore_back_button(bool yes); @@ -61,8 +57,5 @@ void android_ignore_back_button(bool yes); #define BUTTON_BOTTOMRIGHT 0x00100000 #define BUTTON_FORCE_REDRAW 0x00200000 - -/* No remote */ -#define BUTTON_REMOTE 0 #endif /* _BUTTON_TARGET_H_ */ diff --git a/firmware/target/hosted/sdl/app/button-target.h b/firmware/target/hosted/sdl/app/button-target.h index d4396fd0d5..26d0fedcc5 100644 --- a/firmware/target/hosted/sdl/app/button-target.h +++ b/firmware/target/hosted/sdl/app/button-target.h @@ -22,21 +22,6 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#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 */ #define BUTTON_UP 0x00000001 #define BUTTON_DOWN 0x00000002 @@ -61,9 +46,6 @@ int button_read_device(void); #define BUTTON_MAIN 0x1FFF -/* No remote */ -#define BUTTON_REMOTE 0 - /* Software power-off */ #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/hosted/ypr0/button-target.h b/firmware/target/hosted/ypr0/button-target.h index beddc66c67..d7b95de785 100644 --- a/firmware/target/hosted/ypr0/button-target.h +++ b/firmware/target/hosted/ypr0/button-target.h @@ -22,14 +22,7 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - -bool headphones_inserted(void); - -void button_init_device(void); void button_close_device(void); -int button_read_device(void); /* Logical buttons key codes */ #define BUTTON_UP 0x00000001 @@ -44,9 +37,6 @@ int button_read_device(void); #define BUTTON_MAIN 0x1FF /* all buttons */ -/* No remote */ -#define BUTTON_REMOTE 0 - /* Software power-off */ #define POWEROFF_BUTTON BUTTON_POWER /* About 3 seconds */ diff --git a/firmware/target/mips/ingenic_jz47xx/onda_vx747/button-target.h b/firmware/target/mips/ingenic_jz47xx/onda_vx747/button-target.h index 47982a0ba9..994b9b09fa 100644 --- a/firmware/target/mips/ingenic_jz47xx/onda_vx747/button-target.h +++ b/firmware/target/mips/ingenic_jz47xx/onda_vx747/button-target.h @@ -27,9 +27,6 @@ #define HAS_BUTTON_HOLD #endif -bool button_hold(void); -void button_init_device(void); -int button_read_device(int *data); void button_set_touch_available(void); /* Main unit's buttons */ @@ -72,9 +69,6 @@ void button_set_touch_available(void); BUTTON_BOTTOMRIGHT) #endif -/* No remote */ -#define BUTTON_REMOTE 0 - /* Software power-off */ #define POWEROFF_BUTTON BUTTON_POWER #define POWEROFF_COUNT 10 diff --git a/firmware/target/mips/ingenic_jz47xx/onda_vx767/button-target.h b/firmware/target/mips/ingenic_jz47xx/onda_vx767/button-target.h index 8c0393b9f6..04b46f85c7 100644 --- a/firmware/target/mips/ingenic_jz47xx/onda_vx767/button-target.h +++ b/firmware/target/mips/ingenic_jz47xx/onda_vx767/button-target.h @@ -21,15 +21,8 @@ #ifndef BUTTON_TARGET_H #define BUTTON_TARGET_H -#include -#include "config.h" - #define HAS_BUTTON_HOLD -bool button_hold(void); -void button_init_device(void); -int button_read_device(void); - /* Main unit's buttons */ #define BUTTON_SELECT 0x00000001 #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 \ BUTTON_MENU | BUTTON_BACK | BUTTON_REWIND | BUTTON_FAST_FWD) -/* No remote */ -#define BUTTON_REMOTE 0 - #define BUTTON_POWER 0 /* HACK */ /* Software power-off */ diff --git a/firmware/target/sh/archos/fm_v2/button-target.h b/firmware/target/sh/archos/fm_v2/button-target.h index 5330324141..47eb48c32d 100644 --- a/firmware/target/sh/archos/fm_v2/button-target.h +++ b/firmware/target/sh/archos/fm_v2/button-target.h @@ -22,12 +22,6 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - -void button_init_device(void); -int button_read_device(void); - /* Main unit's buttons */ #define BUTTON_ON 0x00000001 #define BUTTON_OFF 0x00000002 @@ -46,8 +40,6 @@ int button_read_device(void); #define BUTTON_MAIN (BUTTON_ON|BUTTON_OFF|BUTTON_LEFT|BUTTON_RIGHT\ |BUTTON_UP|BUTTON_DOWN|BUTTON_PLAY\ |BUTTON_F1|BUTTON_F2|BUTTON_F3) - -#define BUTTON_REMOTE 0 #define POWEROFF_BUTTON BUTTON_OFF #define POWEROFF_COUNT 10 diff --git a/firmware/target/sh/archos/ondio/button-target.h b/firmware/target/sh/archos/ondio/button-target.h index cf605b19bd..b23d157b6d 100644 --- a/firmware/target/sh/archos/ondio/button-target.h +++ b/firmware/target/sh/archos/ondio/button-target.h @@ -22,11 +22,7 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define button_init_device() -int button_read_device(void); #define BUTTON_OFF 0x00000001 #define BUTTON_MENU 0x00000002 @@ -39,8 +35,6 @@ int button_read_device(void); #define BUTTON_MAIN (BUTTON_OFF|BUTTON_MENU|BUTTON_LEFT|BUTTON_RIGHT\ |BUTTON_UP|BUTTON_DOWN) -#define BUTTON_REMOTE 0 - #define POWEROFF_BUTTON BUTTON_OFF #define POWEROFF_COUNT 10 diff --git a/firmware/target/sh/archos/player/button-target.h b/firmware/target/sh/archos/player/button-target.h index 11722ce1d0..dd85d731be 100644 --- a/firmware/target/sh/archos/player/button-target.h +++ b/firmware/target/sh/archos/player/button-target.h @@ -22,14 +22,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_SERIAL_REMOTE -void button_init_device(void); -int button_read_device(void); - /* Main unit's buttons */ #define BUTTON_ON 0x00000001 #define BUTTON_STOP 0x00000002 diff --git a/firmware/target/sh/archos/recorder/button-target.h b/firmware/target/sh/archos/recorder/button-target.h index bcaf3f0049..f387fafe10 100644 --- a/firmware/target/sh/archos/recorder/button-target.h +++ b/firmware/target/sh/archos/recorder/button-target.h @@ -22,14 +22,8 @@ #ifndef _BUTTON_TARGET_H_ #define _BUTTON_TARGET_H_ -#include -#include "config.h" - #define HAS_SERIAL_REMOTE -void button_init_device(void); -int button_read_device(void); - /* Main unit's buttons */ #define BUTTON_ON 0x00000001 #define BUTTON_OFF 0x00000002