diff options
Diffstat (limited to 'firmware/target/coldfire')
7 files changed, 3 insertions, 39 deletions
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 @@ | |||
21 | #ifndef _BUTTON_TARGET_H_ | 21 | #ifndef _BUTTON_TARGET_H_ |
22 | #define _BUTTON_TARGET_H_ | 22 | #define _BUTTON_TARGET_H_ |
23 | 23 | ||
24 | #include <stdbool.h> | ||
25 | #include "config.h" | ||
26 | |||
27 | #define HAS_BUTTON_HOLD | 24 | #define HAS_BUTTON_HOLD |
28 | #define HAS_REMOTE_BUTTON_HOLD | 25 | #define HAS_REMOTE_BUTTON_HOLD |
29 | 26 | ||
30 | bool button_hold(void); | ||
31 | bool remote_button_hold(void); | ||
32 | void button_init_device(void); | ||
33 | int button_read_device(void); | ||
34 | void button_enable_scan(bool enable); | 27 | void button_enable_scan(bool enable); |
35 | bool button_scan_enabled(void); | 28 | bool button_scan_enabled(void); |
36 | 29 | ||
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 @@ | |||
22 | #ifndef _BUTTON_TARGET_H_ | 22 | #ifndef _BUTTON_TARGET_H_ |
23 | #define _BUTTON_TARGET_H_ | 23 | #define _BUTTON_TARGET_H_ |
24 | 24 | ||
25 | #include <stdbool.h> | ||
26 | #include "config.h" | ||
27 | |||
28 | #define HAS_BUTTON_HOLD | 25 | #define HAS_BUTTON_HOLD |
29 | #define HAS_REMOTE_BUTTON_HOLD | 26 | #define HAS_REMOTE_BUTTON_HOLD |
30 | 27 | ||
31 | bool button_hold(void); | ||
32 | bool remote_button_hold(void); | ||
33 | void button_init_device(void); | ||
34 | int button_read_device(void); | ||
35 | |||
36 | /* iaudio M3 specific button codes */ | 28 | /* iaudio M3 specific button codes */ |
37 | 29 | ||
38 | /* Main unit's buttons */ | 30 | /* 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 @@ | |||
24 | #ifndef _BUTTON_TARGET_H_ | 24 | #ifndef _BUTTON_TARGET_H_ |
25 | #define _BUTTON_TARGET_H_ | 25 | #define _BUTTON_TARGET_H_ |
26 | 26 | ||
27 | #include <stdbool.h> | ||
28 | #include "config.h" | 27 | #include "config.h" |
28 | #include <stdbool.h> | ||
29 | 29 | ||
30 | #define HAS_BUTTON_HOLD | 30 | #define HAS_BUTTON_HOLD |
31 | #define HAS_REMOTE_BUTTON_HOLD | 31 | #define HAS_REMOTE_BUTTON_HOLD |
32 | 32 | ||
33 | bool button_hold(void); | ||
34 | bool remote_button_hold(void); | ||
35 | bool remote_button_hold_only(void); | ||
36 | void button_init_device(void); | ||
37 | int button_read_device(void); | ||
38 | #ifdef IRIVER_H300_SERIES | 33 | #ifdef IRIVER_H300_SERIES |
39 | void button_enable_scan(bool enable); | 34 | void button_enable_scan(bool enable); |
40 | bool button_scan_enabled(void); | 35 | 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) | |||
39 | return (GPIO1_READ & 0x00000002)?true:false; | 39 | return (GPIO1_READ & 0x00000002)?true:false; |
40 | } | 40 | } |
41 | 41 | ||
42 | bool remote_button_hold_only(void) | 42 | static bool remote_button_hold_only(void) |
43 | { | 43 | { |
44 | if(remote_type() == REMOTETYPE_H300_NONLCD) | 44 | if(remote_type() == REMOTETYPE_H300_NONLCD) |
45 | return adc_scan(ADC_REMOTE)<0x0d; /* hold should be 0x00 */ | 45 | 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) | |||
55 | return (GPIO1_READ & 0x00000002)?true:false; | 55 | return (GPIO1_READ & 0x00000002)?true:false; |
56 | } | 56 | } |
57 | 57 | ||
58 | bool remote_button_hold_only(void) | 58 | static bool remote_button_hold_only(void) |
59 | { | 59 | { |
60 | if(remote_type() == REMOTETYPE_H300_NONLCD) | 60 | if(remote_type() == REMOTETYPE_H300_NONLCD) |
61 | return adc_scan(ADC_REMOTE)<0x0d; /* hold should be 0x00 */ | 61 | 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 @@ | |||
21 | #ifndef _BUTTON_TARGET_H_ | 21 | #ifndef _BUTTON_TARGET_H_ |
22 | #define _BUTTON_TARGET_H_ | 22 | #define _BUTTON_TARGET_H_ |
23 | 23 | ||
24 | #include <stdbool.h> | ||
25 | #include "config.h" | ||
26 | |||
27 | #define HAS_BUTTON_HOLD | 24 | #define HAS_BUTTON_HOLD |
28 | #define HAS_REMOTE_BUTTON_HOLD | 25 | #define HAS_REMOTE_BUTTON_HOLD |
29 | 26 | ||
30 | bool button_hold(void); | ||
31 | bool remote_button_hold(void); | ||
32 | void button_init_device(void); | ||
33 | int button_read_device(void); | ||
34 | |||
35 | /* HD200 specific button codes */ | 27 | /* HD200 specific button codes */ |
36 | /* Main unit's buttons - flags as in original firmware*/ | 28 | /* Main unit's buttons - flags as in original firmware*/ |
37 | #define BUTTON_PLAY 0x00000001 | 29 | #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 @@ | |||
21 | #ifndef _BUTTON_TARGET_H_ | 21 | #ifndef _BUTTON_TARGET_H_ |
22 | #define _BUTTON_TARGET_H_ | 22 | #define _BUTTON_TARGET_H_ |
23 | 23 | ||
24 | #include <stdbool.h> | ||
25 | #include "config.h" | ||
26 | |||
27 | #define HAS_BUTTON_HOLD | 24 | #define HAS_BUTTON_HOLD |
28 | #define BUTTON_REMOTE 0 | ||
29 | |||
30 | bool button_hold(void); | ||
31 | void button_init_device(void); | ||
32 | int button_read_device(void); | ||
33 | 25 | ||
34 | /* HD300 specific button codes */ | 26 | /* HD300 specific button codes */ |
35 | #define BUTTON_PLAY 0x00000001 | 27 | #define BUTTON_PLAY 0x00000001 |