From 5690f78fb23ec66aeadf5ecf8200b5610b3e59d2 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sat, 4 Jun 2005 23:15:52 +0000 Subject: Multiple choice LED configuration instead of HAVE_LED. Removes erroneous MMC icon display on iriver, and saves some code on Ondio. Removed invert_led() as it is no longer used. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6568 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/ata.h | 2 ++ firmware/export/config-fmrecorder.h | 4 ++-- firmware/export/config-gmini120.h | 3 ++- firmware/export/config-gminisp.h | 3 ++- firmware/export/config-ondiofm.h | 3 +++ firmware/export/config-ondiosp.h | 3 +++ firmware/export/config-player.h | 4 ++-- firmware/export/config-recorder.h | 4 ++-- firmware/export/config-recorderv2.h | 4 ++-- firmware/export/config.h | 5 +++++ firmware/export/led.h | 3 +-- 11 files changed, 26 insertions(+), 12 deletions(-) (limited to 'firmware/export') diff --git a/firmware/export/ata.h b/firmware/export/ata.h index 2043de915a..e9dc54c6fe 100644 --- a/firmware/export/ata.h +++ b/firmware/export/ata.h @@ -61,7 +61,9 @@ extern int ata_write_sectors(IF_MV2(int drive,) unsigned long start, int count, extern void ata_delayed_write(unsigned long sector, const void* buf); extern void ata_flush(void); extern void ata_spin(void); +#if CONFIG_LED == LED_REAL extern void ata_set_led_enabled(bool enabled); +#endif extern unsigned short* ata_get_identify(void); extern long last_disk_activity; diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h index ec410cb02a..b7f8621f67 100644 --- a/firmware/export/config-fmrecorder.h +++ b/firmware/export/config-fmrecorder.h @@ -67,8 +67,8 @@ /* The start address index for ROM builds */ #define ROM_START 0x14010 -/* Define this for programmable LED available */ -#define HAVE_LED +/* Software controlled LED */ +#define CONFIG_LED LED_REAL /* Define this for LCD backlight available */ #define CONFIG_BACKLIGHT BL_RTC /* on I2C controlled RTC port */ diff --git a/firmware/export/config-gmini120.h b/firmware/export/config-gmini120.h index 473f1cfa7f..f1c20ee240 100644 --- a/firmware/export/config-gmini120.h +++ b/firmware/export/config-gmini120.h @@ -54,7 +54,8 @@ #define GMINI_ARCH -#define HAVE_LED +/* Software controlled LED */ +#define CONFIG_LED LED_REAL /* Define this if you have adjustable CPU frequency */ #define HAVE_ADJUSTABLE_CPU_FREQ diff --git a/firmware/export/config-gminisp.h b/firmware/export/config-gminisp.h index 431cf2f3ef..5cf8a76204 100644 --- a/firmware/export/config-gminisp.h +++ b/firmware/export/config-gminisp.h @@ -48,7 +48,8 @@ #define GMINI_ARCH -#define HAVE_LED +/* Software controlled LED */ +#define CONFIG_LED LED_REAL /* Define this if you have adjustable CPU frequency */ #define HAVE_ADJUSTABLE_CPU_FREQ diff --git a/firmware/export/config-ondiofm.h b/firmware/export/config-ondiofm.h index cce88e591b..2380f220c0 100644 --- a/firmware/export/config-ondiofm.h +++ b/firmware/export/config-ondiofm.h @@ -85,6 +85,9 @@ /* define this if media can be exchanged on the fly */ #define HAVE_HOTSWAP +/* Virtual LED (icon) */ +#define CONFIG_LED LED_VIRTUAL + #define CONFIG_LCD LCD_SSD1815 #define BOOTFILE_EXT ".ajz" diff --git a/firmware/export/config-ondiosp.h b/firmware/export/config-ondiosp.h index 58cb4085ae..66062fa0f3 100644 --- a/firmware/export/config-ondiosp.h +++ b/firmware/export/config-ondiosp.h @@ -73,6 +73,9 @@ /* define this if media can be exchanged on the fly */ #define HAVE_HOTSWAP +/* Virtual LED (icon) */ +#define CONFIG_LED LED_VIRTUAL + #define CONFIG_LCD LCD_SSD1815 #define BOOTFILE_EXT ".ajz" diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h index 8b85bfdfae..eee9e97530 100644 --- a/firmware/export/config-player.h +++ b/firmware/export/config-player.h @@ -60,8 +60,8 @@ /* The start address index for ROM builds */ #define ROM_START 0xD010 -/* Define this for programmable LED available */ -#define HAVE_LED +/* Software controlled LED */ +#define CONFIG_LED LED_REAL /* Define this for LCD backlight available */ #define CONFIG_BACKLIGHT BL_PA14_LO /* port PA14, low active */ diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h index a3a354feea..61c76d480d 100644 --- a/firmware/export/config-recorder.h +++ b/firmware/export/config-recorder.h @@ -61,8 +61,8 @@ /* The start address index for ROM builds */ #define ROM_START 0x11010 -/* Define this for programmable LED available */ -#define HAVE_LED +/* Software controlled LED */ +#define CONFIG_LED LED_REAL /* Define this for LCD backlight available */ #define CONFIG_BACKLIGHT BL_RTC /* on I2C controlled RTC port */ diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h index b9a011802c..e042a78ead 100644 --- a/firmware/export/config-recorderv2.h +++ b/firmware/export/config-recorderv2.h @@ -67,8 +67,8 @@ /* The start address index for ROM builds */ #define ROM_START 0x12010 -/* Define this for programmable LED available */ -#define HAVE_LED +/* Software controlled LED */ +#define CONFIG_LED LED_REAL /* Define this for LCD backlight available */ #define CONFIG_BACKLIGHT BL_RTC /* on I2C controlled RTC port */ diff --git a/firmware/export/config.h b/firmware/export/config.h index 56001e32ad..6faaa49ffa 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -74,6 +74,11 @@ #define I2C_GMINI 2 /* Gmini style */ #define I2C_H100 3 /* iRiver h100 style */ +/* CONFIG_LED */ +#define LED_REAL 1 /* SW controlled LED (Archos recorders, player, Gmini) */ +#define LED_VIRTUAL 2 /* Virtual LED (icon) (Archos Ondio) */ +/* else HW controlled LED (iRiver H1x0) */ + /* now go and pick yours */ #if defined(ARCHOS_PLAYER) #include "config-player.h" diff --git a/firmware/export/led.h b/firmware/export/led.h index 052da2633b..f1b3b95447 100644 --- a/firmware/export/led.h +++ b/firmware/export/led.h @@ -23,8 +23,7 @@ #include extern void led( bool on ); -extern void invert_led( bool on ); -#ifndef HAVE_LED +#if CONFIG_LED == LED_VIRTUAL extern bool led_read(int delayticks); /* read for status bar */ #endif -- cgit v1.2.3