summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2015-01-09 00:22:40 +0100
committerGerrit Rockbox <gerrit@rockbox.org>2015-01-12 11:09:27 +0100
commit89ba7e818c0d96b779b02bc7b31c0c6a19294a46 (patch)
tree19f7326e1f27f4bd403c4437572b579add5b61bb /firmware/target/coldfire
parent2a3e1628a50b9de7c1462ee95eb79937795f5409 (diff)
Get rid of stupid _backlight_* function names
_remote_backlight_* and _buttonlight_* are cleaned as well Change-Id: I73653752831bbe170c26ba95d3bc04c2e3a5cf30
Diffstat (limited to 'firmware/target/coldfire')
-rw-r--r--firmware/target/coldfire/iaudio/m3/backlight-m3.c6
-rw-r--r--firmware/target/coldfire/iaudio/m3/backlight-target.h6
-rw-r--r--firmware/target/coldfire/iaudio/m5/backlight-m5.c12
-rw-r--r--firmware/target/coldfire/iaudio/m5/backlight-target.h10
-rw-r--r--firmware/target/coldfire/iaudio/x5/backlight-target.h12
-rw-r--r--firmware/target/coldfire/iaudio/x5/backlight-x5.c16
-rw-r--r--firmware/target/coldfire/iriver/h100/backlight-h100.c6
-rw-r--r--firmware/target/coldfire/iriver/h100/backlight-target.h23
-rw-r--r--firmware/target/coldfire/iriver/h300/backlight-h300.c12
-rw-r--r--firmware/target/coldfire/iriver/h300/backlight-target.h12
-rw-r--r--firmware/target/coldfire/mpio/backlight-mpio.c20
-rw-r--r--firmware/target/coldfire/mpio/backlight-target.h18
-rw-r--r--firmware/target/coldfire/mpio/hd300/button-hd300.c6
13 files changed, 77 insertions, 82 deletions
diff --git a/firmware/target/coldfire/iaudio/m3/backlight-m3.c b/firmware/target/coldfire/iaudio/m3/backlight-m3.c
index 0b4ee51275..1163d6acb7 100644
--- a/firmware/target/coldfire/iaudio/m3/backlight-m3.c
+++ b/firmware/target/coldfire/iaudio/m3/backlight-m3.c
@@ -25,7 +25,7 @@
#include "backlight.h"
#include "backlight-target.h"
-bool _backlight_init(void)
+bool backlight_hw_init(void)
{
and_l(~0x00000008, &GPIO1_OUT);
or_l(0x00000008, &GPIO1_ENABLE);
@@ -33,12 +33,12 @@ bool _backlight_init(void)
return true; /* Backlight always ON after boot. */
}
-void _backlight_on(void)
+void backlight_hw_on(void)
{
and_l(~0x00000008, &GPIO1_OUT);
}
-void _backlight_off(void)
+void backlight_hw_off(void)
{
or_l(0x00000008, &GPIO1_OUT);
}
diff --git a/firmware/target/coldfire/iaudio/m3/backlight-target.h b/firmware/target/coldfire/iaudio/m3/backlight-target.h
index 7c3ba979a3..fdc8438ea7 100644
--- a/firmware/target/coldfire/iaudio/m3/backlight-target.h
+++ b/firmware/target/coldfire/iaudio/m3/backlight-target.h
@@ -22,8 +22,8 @@
#ifndef BACKLIGHT_TARGET_H
#define BACKLIGHT_TARGET_H
-bool _backlight_init(void);
-void _backlight_on(void);
-void _backlight_off(void);
+bool backlight_hw_init(void);
+void backlight_hw_on(void);
+void backlight_hw_off(void);
#endif
diff --git a/firmware/target/coldfire/iaudio/m5/backlight-m5.c b/firmware/target/coldfire/iaudio/m5/backlight-m5.c
index daa613810e..2738a327c9 100644
--- a/firmware/target/coldfire/iaudio/m5/backlight-m5.c
+++ b/firmware/target/coldfire/iaudio/m5/backlight-m5.c
@@ -26,14 +26,14 @@
#include "pcf50606.h"
#include "lcd.h"
-bool _backlight_init(void)
+bool backlight_hw_init(void)
{
- _backlight_on();
+ backlight_hw_on();
return true; /* Backlight always ON after boot. */
}
-void _backlight_on(void)
+void backlight_hw_on(void)
{
int level = disable_irq_save();
@@ -41,7 +41,7 @@ void _backlight_on(void)
restore_irq(level);
}
-void _backlight_off(void)
+void backlight_hw_off(void)
{
int level = disable_irq_save();
@@ -49,12 +49,12 @@ void _backlight_off(void)
restore_irq(level);
}
-void _remote_backlight_on(void)
+void remote_backlight_hw_on(void)
{
and_l(~0x00200000, &GPIO_OUT);
}
-void _remote_backlight_off(void)
+void remote_backlight_hw_off(void)
{
or_l(0x00200000, &GPIO_OUT);
}
diff --git a/firmware/target/coldfire/iaudio/m5/backlight-target.h b/firmware/target/coldfire/iaudio/m5/backlight-target.h
index 43e8a2cbe2..38acdd0e5f 100644
--- a/firmware/target/coldfire/iaudio/m5/backlight-target.h
+++ b/firmware/target/coldfire/iaudio/m5/backlight-target.h
@@ -21,10 +21,10 @@
#ifndef BACKLIGHT_TARGET_H
#define BACKLIGHT_TARGET_H
-bool _backlight_init(void);
-void _backlight_on(void);
-void _backlight_off(void);
-void _remote_backlight_on(void);
-void _remote_backlight_off(void);
+bool backlight_hw_init(void);
+void backlight_hw_on(void);
+void backlight_hw_off(void);
+void remote_backlight_hw_on(void);
+void remote_backlight_hw_off(void);
#endif
diff --git a/firmware/target/coldfire/iaudio/x5/backlight-target.h b/firmware/target/coldfire/iaudio/x5/backlight-target.h
index 2b5281c23e..1d9bee0545 100644
--- a/firmware/target/coldfire/iaudio/x5/backlight-target.h
+++ b/firmware/target/coldfire/iaudio/x5/backlight-target.h
@@ -21,11 +21,11 @@
#ifndef BACKLIGHT_TARGET_H
#define BACKLIGHT_TARGET_H
-bool _backlight_init(void);
-void _backlight_on(void);
-void _backlight_off(void);
-void _backlight_set_brightness(int val);
-void _remote_backlight_on(void);
-void _remote_backlight_off(void);
+bool backlight_hw_init(void);
+void backlight_hw_on(void);
+void backlight_hw_off(void);
+void backlight_hw_brightness(int val);
+void remote_backlight_hw_on(void);
+void remote_backlight_hw_off(void);
#endif
diff --git a/firmware/target/coldfire/iaudio/x5/backlight-x5.c b/firmware/target/coldfire/iaudio/x5/backlight-x5.c
index 8a06c7d653..de8b3d8e14 100644
--- a/firmware/target/coldfire/iaudio/x5/backlight-x5.c
+++ b/firmware/target/coldfire/iaudio/x5/backlight-x5.c
@@ -26,15 +26,15 @@
#include "pcf50606.h"
#include "lcd.h"
-bool _backlight_init(void)
+bool backlight_hw_init(void)
{
- _backlight_set_brightness(DEFAULT_BRIGHTNESS_SETTING);
- _backlight_on();
+ backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING);
+ backlight_hw_on();
return true; /* Backlight always ON after boot. */
}
-void _backlight_on(void)
+void backlight_hw_on(void)
{
int level;
#ifdef HAVE_LCD_ENABLE
@@ -45,7 +45,7 @@ void _backlight_on(void)
restore_irq(level);
}
-void _backlight_off(void)
+void backlight_hw_off(void)
{
int level = disable_irq_save();
pcf50606_write(0x38, 0x80); /* Backlight OFF, GPO1INV=1, GPO1ACT=000 */
@@ -56,7 +56,7 @@ void _backlight_off(void)
}
/* set brightness by changing the PWM */
-void _backlight_set_brightness(int val)
+void backlight_hw_brightness(int val)
{
/* disable IRQs while bitbanging */
int old_irq_level = disable_irq_save();
@@ -65,12 +65,12 @@ void _backlight_set_brightness(int val)
restore_irq(old_irq_level);
}
-void _remote_backlight_on(void)
+void remote_backlight_hw_on(void)
{
and_l(~0x00200000, &GPIO_OUT);
}
-void _remote_backlight_off(void)
+void remote_backlight_hw_off(void)
{
or_l(0x00200000, &GPIO_OUT);
}
diff --git a/firmware/target/coldfire/iriver/h100/backlight-h100.c b/firmware/target/coldfire/iriver/h100/backlight-h100.c
index 47c02cb351..1f582ec8df 100644
--- a/firmware/target/coldfire/iriver/h100/backlight-h100.c
+++ b/firmware/target/coldfire/iriver/h100/backlight-h100.c
@@ -27,7 +27,7 @@
#include "lcd.h"
/* Returns the current state of the backlight (true=ON, false=OFF). */
-bool _backlight_init(void)
+bool backlight_hw_init(void)
{
or_l(0x00020000, &GPIO1_ENABLE);
or_l(0x00020000, &GPIO1_FUNCTION);
@@ -45,12 +45,12 @@ void _backlight_hw_off(void)
or_l(0x00020000, &GPIO1_OUT);
}
-void _remote_backlight_on(void)
+void remote_backlight_hw_on(void)
{
and_l(~0x00000800, &GPIO_OUT);
}
-void _remote_backlight_off(void)
+void remote_backlight_hw_off(void)
{
or_l(0x00000800, &GPIO_OUT);
}
diff --git a/firmware/target/coldfire/iriver/h100/backlight-target.h b/firmware/target/coldfire/iriver/h100/backlight-target.h
index 5cd6fa7133..64d0353ab0 100644
--- a/firmware/target/coldfire/iriver/h100/backlight-target.h
+++ b/firmware/target/coldfire/iriver/h100/backlight-target.h
@@ -21,22 +21,19 @@
#ifndef BACKLIGHT_TARGET_H
#define BACKLIGHT_TARGET_H
-bool _backlight_init(void); /* Returns backlight current state (true=ON). */
-void _backlight_hw_on(void);
-void _backlight_hw_off(void);
+bool backlight_hw_init(void); /* Returns backlight current state (true=ON). */
+void backlight_hw_on(void);
+void backlight_hw_off(void);
-#ifdef BOOTLOADER
-#define _backlight_on() _backlight_hw_on()
-#define _backlight_off() _backlight_hw_off()
-#else
-#define _backlight_on_isr() _backlight_hw_on()
-#define _backlight_off_isr() _backlight_hw_off()
-#define _backlight_on_normal() _backlight_hw_on()
-#define _backlight_off_normal() _backlight_hw_off()
+#ifndef BOOTLOADER
+#define backlight_hw_on_isr() backlight_hw_on()
+#define backlight_hw_off_isr() backlight_hw_off()
+#define backlight_hw_on_normal() backlight_hw_on()
+#define backlight_hw_off_normal() backlight_hw_off()
#define _BACKLIGHT_FADE_BOOST
#endif
-void _remote_backlight_on(void);
-void _remote_backlight_off(void);
+void remote_backlight_hw_on(void);
+void remote_backlight_hw_off(void);
#endif
diff --git a/firmware/target/coldfire/iriver/h300/backlight-h300.c b/firmware/target/coldfire/iriver/h300/backlight-h300.c
index 64e09b9b40..9e44dfa80e 100644
--- a/firmware/target/coldfire/iriver/h300/backlight-h300.c
+++ b/firmware/target/coldfire/iriver/h300/backlight-h300.c
@@ -28,7 +28,7 @@
#include "pcf50606.h"
#include "lcd.h"
-bool _backlight_init(void)
+bool backlight_hw_init(void)
{
or_l(0x00020000, &GPIO1_ENABLE);
or_l(0x00020000, &GPIO1_FUNCTION);
@@ -37,21 +37,21 @@ bool _backlight_init(void)
return true; /* Backlight always ON after boot. */
}
-void _backlight_on(void)
+void backlight_hw_on(void)
{
lcd_enable(true);
sleep(HZ/100); /* lcd needs time - avoid flashing for dark screens */
or_l(0x00020000, &GPIO1_OUT);
}
-void _backlight_off(void)
+void backlight_hw_off(void)
{
and_l(~0x00020000, &GPIO1_OUT);
lcd_enable(false);
}
/* set brightness by changing the PWM */
-void _backlight_set_brightness(int val)
+void backlight_hw_brightness(int val)
{
/* disable IRQs while bitbanging */
int old_irq_level = disable_irq_save();
@@ -60,12 +60,12 @@ void _backlight_set_brightness(int val)
restore_irq(old_irq_level);
}
-void _remote_backlight_on(void)
+void remote_backlight_hw_on(void)
{
and_l(~0x00000002, &GPIO1_OUT);
}
-void _remote_backlight_off(void)
+void remote_backlight_hw_off(void)
{
or_l(0x00000002, &GPIO1_OUT);
}
diff --git a/firmware/target/coldfire/iriver/h300/backlight-target.h b/firmware/target/coldfire/iriver/h300/backlight-target.h
index 046a8fba8b..1ea9087a7b 100644
--- a/firmware/target/coldfire/iriver/h300/backlight-target.h
+++ b/firmware/target/coldfire/iriver/h300/backlight-target.h
@@ -21,11 +21,11 @@
#ifndef BACKLIGHT_TARGET_H
#define BACKLIGHT_TARGET_H
-bool _backlight_init(void); /* Returns backlight current state (true=ON). */
-void _backlight_on(void);
-void _backlight_off(void);
-void _backlight_set_brightness(int val);
-void _remote_backlight_on(void);
-void _remote_backlight_off(void);
+bool backlight_hw_init(void); /* Returns backlight current state (true=ON). */
+void backlight_hw_on(void);
+void backlight_hw_off(void);
+void backlight_hw_brightness(int val);
+void remote_backlight_hw_on(void);
+void remote_backlight_hw_off(void);
#endif
diff --git a/firmware/target/coldfire/mpio/backlight-mpio.c b/firmware/target/coldfire/mpio/backlight-mpio.c
index 1e40e9bb88..e04fa6d7dc 100644
--- a/firmware/target/coldfire/mpio/backlight-mpio.c
+++ b/firmware/target/coldfire/mpio/backlight-mpio.c
@@ -27,11 +27,11 @@
#include "backlight-target.h"
#include "lcd.h"
-static bool _backlight_on = true;
+static bool backlight_hw_on = true;
static int _brightness = DEFAULT_BRIGHTNESS_SETTING;
/* Returns the current state of the backlight (true=ON, false=OFF). */
-bool _backlight_init(void)
+bool backlight_hw_init(void)
{
#ifdef BOOTLOADER
and_l(~(1<<28),&GPIO_OUT);
@@ -44,12 +44,12 @@ bool _backlight_init(void)
void _backlight_hw_on(void)
{
#ifndef BOOTLOADER
- if (_backlight_on)
+ if (backlight_hw_on)
return;
#endif
- _backlight_set_brightness(_brightness);
- _backlight_on = true;
+ backlight_hw_brightness(_brightness);
+ backlight_hw_on = true;
}
@@ -57,15 +57,15 @@ void _backlight_hw_off(void)
{
/* GPIO28 low */
and_l(~(1<<28),&GPIO_OUT);
- _backlight_on = false;
+ backlight_hw_on = false;
}
-void _backlight_set_brightness(int val)
+void backlight_hw_brightness(int val)
{
unsigned char i;
#ifndef BOOTLOADER
- if( _brightness == val && _backlight_on == true )
+ if( _brightness == val && backlight_hw_on == true )
return;
#endif
@@ -83,12 +83,12 @@ void _backlight_set_brightness(int val)
_brightness = val;
}
-void _remote_backlight_on(void)
+void remote_backlight_hw_on(void)
{
/* I don't have remote to play with */
}
-void _remote_backlight_off(void)
+void remote_backlight_hw_off(void)
{
/* I don't have remote to play with */
}
diff --git a/firmware/target/coldfire/mpio/backlight-target.h b/firmware/target/coldfire/mpio/backlight-target.h
index 93b1f309fb..b73bf27c89 100644
--- a/firmware/target/coldfire/mpio/backlight-target.h
+++ b/firmware/target/coldfire/mpio/backlight-target.h
@@ -21,15 +21,13 @@
#ifndef BACKLIGHT_TARGET_H
#define BACKLIGHT_TARGET_H
-bool _backlight_init(void); /* Returns backlight current state (true=ON). */
-void _backlight_hw_on(void);
-void _backlight_hw_off(void);
-void _backlight_set_brightness(int val);
+bool backlight_hw_init(void); /* Returns backlight current state (true=ON). */
+void backlight_hw_on(void);
+void backlight_hw_off(void);
+void backlight_hw_brightness(int val);
-#define _backlight_on() _backlight_hw_on()
-#define _backlight_off() _backlight_hw_off()
-#define _backlight_on_isr() _backlight_hw_on()
-#define _backlight_off_isr() _backlight_hw_off()
-#define _backlight_on_normal() _backlight_hw_on()
-#define _backlight_off_normal() _backlight_hw_off()
+#define backlight_hw_on_isr() backlight_hw_on()
+#define backlight_hw_off_isr() backlight_hw_off()
+#define backlight_hw_on_normal() backlight_hw_on()
+#define backlight_hw_off_normal() backlight_hw_off()
#endif
diff --git a/firmware/target/coldfire/mpio/hd300/button-hd300.c b/firmware/target/coldfire/mpio/hd300/button-hd300.c
index fda26dd0df..e84b8d442b 100644
--- a/firmware/target/coldfire/mpio/hd300/button-hd300.c
+++ b/firmware/target/coldfire/mpio/hd300/button-hd300.c
@@ -80,7 +80,7 @@ void scrollstrip_isr(void)
static signed char prev_scroll_lines = -1;
static signed char direction = 0;
static unsigned char count = 0;
- static long next_backlight_on = 0;
+ static long nextbacklight_hw_on = 0;
signed int new_scroll_lines;
signed int scroll_dir;
@@ -120,11 +120,11 @@ void scrollstrip_isr(void)
}
/* poke backlight */
- if (TIME_AFTER(current_tick, next_backlight_on))
+ if (TIME_AFTER(current_tick, nextbacklight_hw_on))
{
backlight_on();
reset_poweroff_timer();
- next_backlight_on = current_tick + HZ/4;
+ nextbacklight_hw_on = current_tick + HZ/4;
}
/* apply sensitivity filter */