From c45d54b4672482cf251bacbfcac7ef404b160d67 Mon Sep 17 00:00:00 2001 From: Jörg Hohensohn Date: Fri, 10 Sep 2004 12:55:55 +0000 Subject: no double negation, define present features, not absent git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5058 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/led.c | 18 +++++++++++++++--- firmware/export/button.h | 3 +++ firmware/export/config-fmrecorder.h | 7 +++++++ firmware/export/config-neo35.h | 6 ++++++ firmware/export/config-ondiofm.h | 4 ---- firmware/export/config-ondiosp.h | 4 ---- firmware/export/config-player.h | 7 +++++++ firmware/export/config-recorder.h | 7 +++++++ firmware/export/config-recorderv2.h | 7 +++++++ 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 @@ #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 -#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 -- cgit v1.2.3