summaryrefslogtreecommitdiff
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
parent9bb648800b38e6c5b2db27ab1cff1917e34d6e33 (diff)
downloadrockbox-c45d54b4672482cf251bacbfcac7ef404b160d67.tar.gz
rockbox-c45d54b4672482cf251bacbfcac7ef404b160d67.zip
no double negation, define present features, not absent
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5058 a1c6a512-1295-4272-9138-f99709370657
-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 @@
22#include "led.h" 22#include "led.h"
23#include "system.h" 23#include "system.h"
24 24
25#ifndef HAVE_NO_LED
26
27static bool xor; 25static bool xor;
28static bool current; 26static bool current;
29 27
28#ifdef HAVE_LED
29
30void led(bool on) 30void 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
58void led(bool on)
59{
60 (void)on;
61}
62
63void 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 */
29extern void led( bool on ); 25extern void led( bool on );
30extern void invert_led( bool on ); 26extern void invert_led( bool on );
31#endif
32 27
33#endif 28#endif