summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2004-09-10 12:55:55 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2004-09-10 12:55:55 +0000
commitc45d54b4672482cf251bacbfcac7ef404b160d67 (patch)
tree7665bf9642f564175f6c7ec6ad4a0bf3eccd46d0 /firmware
parent9bb648800b38e6c5b2db27ab1cff1917e34d6e33 (diff)
no double negation, define present features, not absent
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5058 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/led.c18
-rw-r--r--firmware/export/button.h3
-rw-r--r--firmware/export/config-fmrecorder.h7
-rw-r--r--firmware/export/config-neo35.h6
-rw-r--r--firmware/export/config-ondiofm.h4
-rw-r--r--firmware/export/config-ondiosp.h4
-rw-r--r--firmware/export/config-player.h7
-rw-r--r--firmware/export/config-recorder.h7
-rw-r--r--firmware/export/config-recorderv2.h7
-rw-r--r--firmware/export/led.h5
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 @@
#include "led.h"
#include "system.h"
-#ifndef HAVE_NO_LED
-
static bool xor;
static bool current;
+#ifdef HAVE_LED
+
void led(bool on)
{
current = on;
@@ -53,4 +53,16 @@ void invert_led(bool on)
led(current);
}
-#endif // #ifndef HAVE_NO_LED
+#else /* no LED, just dummies */
+
+void led(bool on)
+{
+ (void)on;
+}
+
+void invert_led(bool on)
+{
+ (void)on;
+}
+
+#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 */
#define BUTTON_STOP BUTTON_DOWN
/* ON is also interpreted as OFF, let's see if that helps a bit */
#define BUTTON_OFF BUTTON_ON
+#define BUTTON_F1 0x0100 /* unreacheable */
+#define BUTTON_F2 0x0200 /* unreacheable */
+#define BUTTON_F3 0x0400 /* unreacheable */
#endif /* HAVE_RECORDER/PLAYER/ONDIO_KEYPAD */
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 @@
/* The start address index for ROM builds */
#define ROM_START 0x14010
+
+/* Define this for programmable LED available */
+#define HAVE_LED
+
+/* Define this for LCD backlight available */
+#define HAVE_BACKLIGHT
+
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 @@
/* If this is a Neo-style memory architecture platform */
#define NEO_MEMORY 1
+/* Define this for programmable LED available */
+#define HAVE_LED
+
+/* Define this for LCD backlight available */
+#define HAVE_BACKLIGHT
+
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 @@
/* Define this for different I2C pinout */
#define HAVE_ONDIO_I2C
-
-/* Define this for no LED available */
-#define HAVE_NO_LED
-
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 @@
/* Define this for different I2C pinout */
#define HAVE_ONDIO_I2C
-
-/* Define this for no LED available */
-#define HAVE_NO_LED
-
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 @@
/* Define this if the platform has batteries */
#define HAVE_BATTERIES 1
+
+/* Define this for programmable LED available */
+#define HAVE_LED
+
+/* Define this for LCD backlight available */
+#define HAVE_BACKLIGHT
+
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 @@
/* The start address index for ROM builds */
#define ROM_START 0x11010
+
+/* Define this for programmable LED available */
+#define HAVE_LED
+
+/* Define this for LCD backlight available */
+#define HAVE_BACKLIGHT
+
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 @@
/* The start address index for ROM builds */
#define ROM_START 0x12010
+
+/* Define this for programmable LED available */
+#define HAVE_LED
+
+/* Define this for LCD backlight available */
+#define HAVE_BACKLIGHT
+
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 @@
#include <stdbool.h>
-#ifdef HAVE_NO_LED /* dummies if no LED available */
-#define led(on)
-#define invert_led(on)
-#else /* normal hardware */
extern void led( bool on );
extern void invert_led( bool on );
-#endif
#endif