From 73681ff4ef9d31dce166497e441487523545f19f Mon Sep 17 00:00:00 2001 From: Jörg Hohensohn Date: Fri, 30 Jan 2004 23:27:44 +0000 Subject: inconsistent argument type for backlight_set_timeout() fixed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4287 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugin.h | 2 +- firmware/backlight.c | 4 ++-- firmware/export/backlight.h | 2 +- uisimulator/common/stubs.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/plugin.h b/apps/plugin.h index be08091eba..2bcdffb344 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -203,7 +203,7 @@ struct plugin_api { void (*bitswap)(unsigned char *data, int length); #endif struct user_settings* global_settings; - void (*backlight_set_timeout)(unsigned int index); + void (*backlight_set_timeout)(int index); }; /* defined by the plugin loader (plugin.c) */ diff --git a/firmware/backlight.c b/firmware/backlight.c index d3b4580daa..1e8ef3d3ab 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c @@ -126,9 +126,9 @@ int backlight_get_timeout(void) return backlight_timeout; } -void backlight_set_timeout(unsigned int index) +void backlight_set_timeout(int index) { - if(index >= sizeof(backlight_timeout_value)) + if(index >= sizeof(backlight_timeout_value) || index < 0) /* if given a weird value, use 0 */ index=0; backlight_timeout = index; /* index in the backlight_timeout_value table */ diff --git a/firmware/export/backlight.h b/firmware/export/backlight.h index d0bfc62e2e..d80f2bbe61 100644 --- a/firmware/export/backlight.h +++ b/firmware/export/backlight.h @@ -24,7 +24,7 @@ void backlight_on(void); void backlight_off(void); void backlight_tick(void); int backlight_get_timeout(void); -void backlight_set_timeout(int seconds); +void backlight_set_timeout(int index); bool backlight_get_on_when_charging(void); void backlight_set_on_when_charging(bool yesno); extern const char backlight_timeout_value[]; diff --git a/uisimulator/common/stubs.c b/uisimulator/common/stubs.c index 533b909786..23a6728db4 100644 --- a/uisimulator/common/stubs.c +++ b/uisimulator/common/stubs.c @@ -114,9 +114,9 @@ bool simulate_usb(void) return false; } -void backlight_set_timeout(int seconds) +void backlight_set_timeout(int index) { - (void)seconds; + (void)index; } void backlight_set_on_when_charging(bool beep) -- cgit v1.2.3