diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/led.c | 18 | ||||
-rw-r--r-- | firmware/export/button.h | 3 | ||||
-rw-r--r-- | firmware/export/config-fmrecorder.h | 7 | ||||
-rw-r--r-- | firmware/export/config-neo35.h | 6 | ||||
-rw-r--r-- | firmware/export/config-ondiofm.h | 4 | ||||
-rw-r--r-- | firmware/export/config-ondiosp.h | 4 | ||||
-rw-r--r-- | firmware/export/config-player.h | 7 | ||||
-rw-r--r-- | firmware/export/config-recorder.h | 7 | ||||
-rw-r--r-- | firmware/export/config-recorderv2.h | 7 | ||||
-rw-r--r-- | firmware/export/led.h | 5 |
10 files changed, 52 insertions, 16 deletions
diff --git a/firmware/drivers/led.c b/firmware/drivers/led.c index c67df9a83f..182f30f4e0 100644 --- a/firmware/drivers/led.c +++ b/firmware/drivers/led.c | |||
@@ -22,11 +22,11 @@ | |||
22 | #include "led.h" | 22 | #include "led.h" |
23 | #include "system.h" | 23 | #include "system.h" |
24 | 24 | ||
25 | #ifndef HAVE_NO_LED | ||
26 | |||
27 | static bool xor; | 25 | static bool xor; |
28 | static bool current; | 26 | static bool current; |
29 | 27 | ||
28 | #ifdef HAVE_LED | ||
29 | |||
30 | void led(bool on) | 30 | void led(bool on) |
31 | { | 31 | { |
32 | current = on; | 32 | current = on; |
@@ -53,4 +53,16 @@ void invert_led(bool on) | |||
53 | led(current); | 53 | led(current); |
54 | } | 54 | } |
55 | 55 | ||
56 | #endif // #ifndef HAVE_NO_LED | 56 | #else /* no LED, just dummies */ |
57 | |||
58 | void led(bool on) | ||
59 | { | ||
60 | (void)on; | ||
61 | } | ||
62 | |||
63 | void invert_led(bool on) | ||
64 | { | ||
65 | (void)on; | ||
66 | } | ||
67 | |||
68 | #endif // #ifdef HAVE_LED | ||
diff --git a/firmware/export/button.h b/firmware/export/button.h index 0b6a08a78b..7f4998f48d 100644 --- a/firmware/export/button.h +++ b/firmware/export/button.h | |||
@@ -123,6 +123,9 @@ void button_set_flip(bool flip); /* turn 180 degrees */ | |||
123 | #define BUTTON_STOP BUTTON_DOWN | 123 | #define BUTTON_STOP BUTTON_DOWN |
124 | /* ON is also interpreted as OFF, let's see if that helps a bit */ | 124 | /* ON is also interpreted as OFF, let's see if that helps a bit */ |
125 | #define BUTTON_OFF BUTTON_ON | 125 | #define BUTTON_OFF BUTTON_ON |
126 | #define BUTTON_F1 0x0100 /* unreacheable */ | ||
127 | #define BUTTON_F2 0x0200 /* unreacheable */ | ||
128 | #define BUTTON_F3 0x0400 /* unreacheable */ | ||
126 | 129 | ||
127 | #endif /* HAVE_RECORDER/PLAYER/ONDIO_KEYPAD */ | 130 | #endif /* HAVE_RECORDER/PLAYER/ONDIO_KEYPAD */ |
128 | 131 | ||
diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h index 440614df85..b72eb9794a 100644 --- a/firmware/export/config-fmrecorder.h +++ b/firmware/export/config-fmrecorder.h | |||
@@ -57,3 +57,10 @@ | |||
57 | 57 | ||
58 | /* The start address index for ROM builds */ | 58 | /* The start address index for ROM builds */ |
59 | #define ROM_START 0x14010 | 59 | #define ROM_START 0x14010 |
60 | |||
61 | /* Define this for programmable LED available */ | ||
62 | #define HAVE_LED | ||
63 | |||
64 | /* Define this for LCD backlight available */ | ||
65 | #define HAVE_BACKLIGHT | ||
66 | |||
diff --git a/firmware/export/config-neo35.h b/firmware/export/config-neo35.h index ae4d74c57a..0f50724c52 100644 --- a/firmware/export/config-neo35.h +++ b/firmware/export/config-neo35.h | |||
@@ -41,3 +41,9 @@ | |||
41 | /* If this is a Neo-style memory architecture platform */ | 41 | /* If this is a Neo-style memory architecture platform */ |
42 | #define NEO_MEMORY 1 | 42 | #define NEO_MEMORY 1 |
43 | 43 | ||
44 | /* Define this for programmable LED available */ | ||
45 | #define HAVE_LED | ||
46 | |||
47 | /* Define this for LCD backlight available */ | ||
48 | #define HAVE_BACKLIGHT | ||
49 | |||
diff --git a/firmware/export/config-ondiofm.h b/firmware/export/config-ondiofm.h index 4bd291099f..44742a62f9 100644 --- a/firmware/export/config-ondiofm.h +++ b/firmware/export/config-ondiofm.h | |||
@@ -54,7 +54,3 @@ | |||
54 | 54 | ||
55 | /* Define this for different I2C pinout */ | 55 | /* Define this for different I2C pinout */ |
56 | #define HAVE_ONDIO_I2C | 56 | #define HAVE_ONDIO_I2C |
57 | |||
58 | /* Define this for no LED available */ | ||
59 | #define HAVE_NO_LED | ||
60 | |||
diff --git a/firmware/export/config-ondiosp.h b/firmware/export/config-ondiosp.h index c8aaf56459..8907d465ab 100644 --- a/firmware/export/config-ondiosp.h +++ b/firmware/export/config-ondiosp.h | |||
@@ -54,7 +54,3 @@ | |||
54 | 54 | ||
55 | /* Define this for different I2C pinout */ | 55 | /* Define this for different I2C pinout */ |
56 | #define HAVE_ONDIO_I2C | 56 | #define HAVE_ONDIO_I2C |
57 | |||
58 | /* Define this for no LED available */ | ||
59 | #define HAVE_NO_LED | ||
60 | |||
diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h index 45eb1e4f9b..2e50a2fc85 100644 --- a/firmware/export/config-player.h +++ b/firmware/export/config-player.h | |||
@@ -37,3 +37,10 @@ | |||
37 | 37 | ||
38 | /* Define this if the platform has batteries */ | 38 | /* Define this if the platform has batteries */ |
39 | #define HAVE_BATTERIES 1 | 39 | #define HAVE_BATTERIES 1 |
40 | |||
41 | /* Define this for programmable LED available */ | ||
42 | #define HAVE_LED | ||
43 | |||
44 | /* Define this for LCD backlight available */ | ||
45 | #define HAVE_BACKLIGHT | ||
46 | |||
diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h index 8cf025e15b..b228dea285 100644 --- a/firmware/export/config-recorder.h +++ b/firmware/export/config-recorder.h | |||
@@ -48,3 +48,10 @@ | |||
48 | 48 | ||
49 | /* The start address index for ROM builds */ | 49 | /* The start address index for ROM builds */ |
50 | #define ROM_START 0x11010 | 50 | #define ROM_START 0x11010 |
51 | |||
52 | /* Define this for programmable LED available */ | ||
53 | #define HAVE_LED | ||
54 | |||
55 | /* Define this for LCD backlight available */ | ||
56 | #define HAVE_BACKLIGHT | ||
57 | |||
diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h index 3187038906..1066ece536 100644 --- a/firmware/export/config-recorderv2.h +++ b/firmware/export/config-recorderv2.h | |||
@@ -57,3 +57,10 @@ | |||
57 | 57 | ||
58 | /* The start address index for ROM builds */ | 58 | /* The start address index for ROM builds */ |
59 | #define ROM_START 0x12010 | 59 | #define ROM_START 0x12010 |
60 | |||
61 | /* Define this for programmable LED available */ | ||
62 | #define HAVE_LED | ||
63 | |||
64 | /* Define this for LCD backlight available */ | ||
65 | #define HAVE_BACKLIGHT | ||
66 | |||
diff --git a/firmware/export/led.h b/firmware/export/led.h index 492ead11b2..cc035b9345 100644 --- a/firmware/export/led.h +++ b/firmware/export/led.h | |||
@@ -22,12 +22,7 @@ | |||
22 | 22 | ||
23 | #include <stdbool.h> | 23 | #include <stdbool.h> |
24 | 24 | ||
25 | #ifdef HAVE_NO_LED /* dummies if no LED available */ | ||
26 | #define led(on) | ||
27 | #define invert_led(on) | ||
28 | #else /* normal hardware */ | ||
29 | extern void led( bool on ); | 25 | extern void led( bool on ); |
30 | extern void invert_led( bool on ); | 26 | extern void invert_led( bool on ); |
31 | #endif | ||
32 | 27 | ||
33 | #endif | 28 | #endif |