summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525
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/arm/as3525
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/arm/as3525')
-rw-r--r--firmware/target/arm/as3525/backlight-e200v2-fuze.c10
-rw-r--r--firmware/target/arm/as3525/sansa-c200v2/backlight-c200v2.c16
-rw-r--r--firmware/target/arm/as3525/sansa-c200v2/backlight-target.h14
-rw-r--r--firmware/target/arm/as3525/sansa-clip/backlight-target.h12
-rw-r--r--firmware/target/arm/as3525/sansa-clipplus/backlight-clip.c4
-rw-r--r--firmware/target/arm/as3525/sansa-clipplus/backlight-target.h8
-rw-r--r--firmware/target/arm/as3525/sansa-clipv2/backlight-clipv2.c4
-rw-r--r--firmware/target/arm/as3525/sansa-clipv2/backlight-target.h12
-rw-r--r--firmware/target/arm/as3525/sansa-clipzip/backlight-clipzip.c8
-rw-r--r--firmware/target/arm/as3525/sansa-clipzip/backlight-target.h10
-rw-r--r--firmware/target/arm/as3525/sansa-e200v2/backlight-target.h14
-rw-r--r--firmware/target/arm/as3525/sansa-fuze/backlight-target.h14
-rw-r--r--firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c12
-rw-r--r--firmware/target/arm/as3525/sansa-fuzev2/backlight-target.h14
-rw-r--r--firmware/target/arm/as3525/sansa-m200v4/backlight-target.h8
-rw-r--r--firmware/target/arm/as3525/sd-as3525.c4
-rw-r--r--firmware/target/arm/as3525/system-as3525.c2
17 files changed, 83 insertions, 83 deletions
diff --git a/firmware/target/arm/as3525/backlight-e200v2-fuze.c b/firmware/target/arm/as3525/backlight-e200v2-fuze.c
index 91e1ef4d0c..26602fcee6 100644
--- a/firmware/target/arm/as3525/backlight-e200v2-fuze.c
+++ b/firmware/target/arm/as3525/backlight-e200v2-fuze.c
@@ -28,12 +28,12 @@
int buttonlight_is_on = 0;
-void _backlight_set_brightness(int brightness)
+void backlight_hw_brightness(int brightness)
{
ascodec_write(AS3514_DCDC15, brightness);
}
-void _backlight_on(void)
+void backlight_hw_on(void)
{
#ifdef HAVE_LCD_ENABLE
lcd_enable(true); /* power on lcd + visible display */
@@ -45,7 +45,7 @@ void _backlight_on(void)
#endif
}
-void _backlight_off(void)
+void backlight_hw_off(void)
{
ascodec_write(AS3514_DCDC15, 0x0);
#ifdef HAVE_LCD_ENABLE
@@ -53,7 +53,7 @@ void _backlight_off(void)
#endif
}
-void _buttonlight_on(void)
+void buttonlight_hw_on(void)
{
/* Needed for buttonlight and MicroSD to work at the same time */
/* Turn ROD control on, as the OF does */
@@ -63,7 +63,7 @@ void _buttonlight_on(void)
buttonlight_is_on = 1;
}
-void _buttonlight_off(void)
+void buttonlight_hw_off(void)
{
/* Needed for buttonlight and MicroSD to work at the same time */
/* Turn ROD control off, as the OF does */
diff --git a/firmware/target/arm/as3525/sansa-c200v2/backlight-c200v2.c b/firmware/target/arm/as3525/sansa-c200v2/backlight-c200v2.c
index 1da57de93a..6344eff593 100644
--- a/firmware/target/arm/as3525/sansa-c200v2/backlight-c200v2.c
+++ b/firmware/target/arm/as3525/sansa-c200v2/backlight-c200v2.c
@@ -98,7 +98,7 @@ void _backlight_pwm(int on)
}
}
-bool _backlight_init(void)
+bool backlight_hw_init(void)
{
GPIOA_DIR |= 1<<5;
if (c200v2_variant == 1) {
@@ -109,14 +109,14 @@ bool _backlight_init(void)
return true;
}
-void _backlight_set_brightness(int brightness)
+void backlight_hw_brightness(int brightness)
{
backlight_level = brightness_table[brightness];
if (brightness > 0)
- _backlight_on();
+ backlight_hw_on();
else
- _backlight_off();
+ backlight_hw_off();
}
static void _pwm_on(void)
@@ -130,7 +130,7 @@ static void _pwm_off(void)
_set_timer2_pwm_ratio(0);
}
-void _backlight_on(void)
+void backlight_hw_on(void)
{
if (backlight_is_on == 1) {
/* Update pwm ratio in case user changed the brightness */
@@ -146,7 +146,7 @@ void _backlight_on(void)
backlight_is_on = 1;
}
-void _backlight_off(void)
+void backlight_hw_off(void)
{
if (backlight_is_on == 0)
return;
@@ -159,7 +159,7 @@ void _backlight_off(void)
#endif
}
-void _buttonlight_on(void)
+void buttonlight_hw_on(void)
{
if (buttonlight_is_on == 1)
return;
@@ -169,7 +169,7 @@ void _buttonlight_on(void)
buttonlight_is_on = 1;
}
-void _buttonlight_off(void)
+void buttonlight_hw_off(void)
{
if (buttonlight_is_on == 0)
return;
diff --git a/firmware/target/arm/as3525/sansa-c200v2/backlight-target.h b/firmware/target/arm/as3525/sansa-c200v2/backlight-target.h
index 4a098f7f28..a6b07de6bf 100644
--- a/firmware/target/arm/as3525/sansa-c200v2/backlight-target.h
+++ b/firmware/target/arm/as3525/sansa-c200v2/backlight-target.h
@@ -23,22 +23,22 @@
#include <stdbool.h>
-bool _backlight_init(void);
+bool backlight_hw_init(void);
void _backlight_pwm(int on);
-void _backlight_on(void);
-void _backlight_off(void);
+void backlight_hw_on(void);
+void backlight_hw_off(void);
static inline void _backlight_panic_on(void)
{
- _backlight_on();
+ backlight_hw_on();
_backlight_pwm(1);
}
-void _backlight_set_brightness(int brightness);
+void backlight_hw_brightness(int brightness);
int __backlight_is_on(void);
-void _buttonlight_on(void);
-void _buttonlight_off(void);
+void buttonlight_hw_on(void);
+void buttonlight_hw_off(void);
/*
* FIXME: This may be better off in kernel.h, but...
diff --git a/firmware/target/arm/as3525/sansa-clip/backlight-target.h b/firmware/target/arm/as3525/sansa-clip/backlight-target.h
index 00c6e5cc44..669f0f5939 100644
--- a/firmware/target/arm/as3525/sansa-clip/backlight-target.h
+++ b/firmware/target/arm/as3525/sansa-clip/backlight-target.h
@@ -25,30 +25,30 @@
#include "lcd.h"
#include "backlight.h"
-static inline void _backlight_on(void)
+static inline void backlight_hw_on(void)
{
lcd_enable(true);
}
-static inline void _backlight_off(void)
+static inline void backlight_hw_off(void)
{
lcd_enable(false);
}
-#define _backlight_panic_on() _backlight_on()
+#define _backlight_panic_on() backlight_hw_on()
-static inline bool _backlight_init(void)
+static inline bool backlight_hw_init(void)
{
GPIOD_DIR |= (1<<7); /* for button light */
return true;
}
-static inline void _buttonlight_on(void)
+static inline void buttonlight_hw_on(void)
{
GPIOD_PIN(7) = (1<<7);
}
-static inline void _buttonlight_off(void)
+static inline void buttonlight_hw_off(void)
{
GPIOD_PIN(7) = 0;
}
diff --git a/firmware/target/arm/as3525/sansa-clipplus/backlight-clip.c b/firmware/target/arm/as3525/sansa-clipplus/backlight-clip.c
index e3b518b3f8..76df12c948 100644
--- a/firmware/target/arm/as3525/sansa-clipplus/backlight-clip.c
+++ b/firmware/target/arm/as3525/sansa-clipplus/backlight-clip.c
@@ -24,13 +24,13 @@
#include "as3525v2.h"
#include "ascodec.h"
-void _backlight_on(void)
+void backlight_hw_on(void)
{
ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x90);
lcd_enable(true);
}
-void _backlight_off(void)
+void backlight_hw_off(void)
{
lcd_enable(false);
ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x00);
diff --git a/firmware/target/arm/as3525/sansa-clipplus/backlight-target.h b/firmware/target/arm/as3525/sansa-clipplus/backlight-target.h
index 3dd9240bd8..9e8ff1ce8c 100644
--- a/firmware/target/arm/as3525/sansa-clipplus/backlight-target.h
+++ b/firmware/target/arm/as3525/sansa-clipplus/backlight-target.h
@@ -21,10 +21,10 @@
#ifndef BACKLIGHT_TARGET_H
#define BACKLIGHT_TARGET_H
-#define _backlight_init() true
+#define backlight_hw_init() true
-void _backlight_on(void);
-void _backlight_off(void);
-#define _backlight_panic_on() _backlight_on()
+void backlight_hw_on(void);
+void backlight_hw_off(void);
+#define _backlight_panic_on() backlight_hw_on()
#endif
diff --git a/firmware/target/arm/as3525/sansa-clipv2/backlight-clipv2.c b/firmware/target/arm/as3525/sansa-clipv2/backlight-clipv2.c
index f4927ba5bf..65f69e8bcd 100644
--- a/firmware/target/arm/as3525/sansa-clipv2/backlight-clipv2.c
+++ b/firmware/target/arm/as3525/sansa-clipv2/backlight-clipv2.c
@@ -24,13 +24,13 @@
#include "as3525v2.h"
#include "ascodec.h"
-void _backlight_on(void)
+void backlight_hw_on(void)
{
ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x90);
lcd_enable(true);
}
-void _backlight_off(void)
+void backlight_hw_off(void)
{
lcd_enable(false);
ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x0);
diff --git a/firmware/target/arm/as3525/sansa-clipv2/backlight-target.h b/firmware/target/arm/as3525/sansa-clipv2/backlight-target.h
index b2da63dbff..800b26d7fa 100644
--- a/firmware/target/arm/as3525/sansa-clipv2/backlight-target.h
+++ b/firmware/target/arm/as3525/sansa-clipv2/backlight-target.h
@@ -24,22 +24,22 @@
#include <stdbool.h>
#include "cpu.h"
-void _backlight_on(void);
-void _backlight_off(void);
-#define _backlight_panic_on() _backlight_on()
+void backlight_hw_on(void);
+void backlight_hw_off(void);
+#define _backlight_panic_on() backlight_hw_on()
-static inline bool _backlight_init(void)
+static inline bool backlight_hw_init(void)
{
GPIOA_DIR |= 1<<5; /* for button light */
return true;
}
-static inline void _buttonlight_on(void)
+static inline void buttonlight_hw_on(void)
{
GPIOA_PIN(5) = 1<<5;
}
-static inline void _buttonlight_off(void)
+static inline void buttonlight_hw_off(void)
{
GPIOA_PIN(5) = 0;
}
diff --git a/firmware/target/arm/as3525/sansa-clipzip/backlight-clipzip.c b/firmware/target/arm/as3525/sansa-clipzip/backlight-clipzip.c
index a47941bbd7..9fde68dd8a 100644
--- a/firmware/target/arm/as3525/sansa-clipzip/backlight-clipzip.c
+++ b/firmware/target/arm/as3525/sansa-clipzip/backlight-clipzip.c
@@ -27,12 +27,12 @@
#include "ascodec.h"
#include "lcd-target.h"
-bool _backlight_init()
+bool backlight_hw_init()
{
return true;
}
-void _backlight_on(void)
+void backlight_hw_on(void)
{
/* GPIO B1 controls backlight */
GPIOB_DIR |= (1 << 1);
@@ -43,7 +43,7 @@ void _backlight_on(void)
#endif
}
-void _backlight_off(void)
+void backlight_hw_off(void)
{
#ifdef HAVE_LCD_ENABLE
lcd_enable(false);
@@ -52,7 +52,7 @@ void _backlight_off(void)
GPIOB_PIN(1) = 0;
}
-void _backlight_set_brightness(int brightness)
+void backlight_hw_brightness(int brightness)
{
oled_brightness(brightness);
}
diff --git a/firmware/target/arm/as3525/sansa-clipzip/backlight-target.h b/firmware/target/arm/as3525/sansa-clipzip/backlight-target.h
index bf58973ab6..00b925c22b 100644
--- a/firmware/target/arm/as3525/sansa-clipzip/backlight-target.h
+++ b/firmware/target/arm/as3525/sansa-clipzip/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 brightness);
+bool backlight_hw_init(void);
+void backlight_hw_on(void);
+void backlight_hw_off(void);
+void backlight_hw_brightness(int brightness);
-#define _backlight_panic_on() _backlight_on()
+#define _backlight_panic_on() backlight_hw_on()
#endif
diff --git a/firmware/target/arm/as3525/sansa-e200v2/backlight-target.h b/firmware/target/arm/as3525/sansa-e200v2/backlight-target.h
index 227a154197..0baaf2441a 100644
--- a/firmware/target/arm/as3525/sansa-e200v2/backlight-target.h
+++ b/firmware/target/arm/as3525/sansa-e200v2/backlight-target.h
@@ -21,13 +21,13 @@
#ifndef BACKLIGHT_TARGET_H
#define BACKLIGHT_TARGET_H
-#define _backlight_init() true
-void _backlight_on(void);
-void _backlight_off(void);
-#define _backlight_panic_on() _backlight_on()
-void _backlight_set_brightness(int brightness);
+#define backlight_hw_init() true
+void backlight_hw_on(void);
+void backlight_hw_off(void);
+#define _backlight_panic_on() backlight_hw_on()
+void backlight_hw_brightness(int brightness);
int __backlight_is_on(void);
-void _buttonlight_on(void);
-void _buttonlight_off(void);
+void buttonlight_hw_on(void);
+void buttonlight_hw_off(void);
#endif
diff --git a/firmware/target/arm/as3525/sansa-fuze/backlight-target.h b/firmware/target/arm/as3525/sansa-fuze/backlight-target.h
index df6df573b0..c4e95e9c4a 100644
--- a/firmware/target/arm/as3525/sansa-fuze/backlight-target.h
+++ b/firmware/target/arm/as3525/sansa-fuze/backlight-target.h
@@ -21,13 +21,13 @@
#ifndef BACKLIGHT_TARGET_H
#define BACKLIGHT_TARGET_H
-#define _backlight_init() true
-void _backlight_on(void);
-void _backlight_off(void);
-#define _backlight_panic_on() _backlight_on()
-void _backlight_set_brightness(int brightness);
+#define backlight_hw_init() true
+void backlight_hw_on(void);
+void backlight_hw_off(void);
+#define _backlight_panic_on() backlight_hw_on()
+void backlight_hw_brightness(int brightness);
#ifdef HAVE_BUTTON_LIGHT
-void _buttonlight_on(void);
-void _buttonlight_off(void);
+void buttonlight_hw_on(void);
+void buttonlight_hw_off(void);
#endif
#endif
diff --git a/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c b/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c
index a01b168b71..71f0c1a3f2 100644
--- a/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c
+++ b/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c
@@ -26,12 +26,12 @@
#include "ascodec.h"
#include "as3514.h"
-void _backlight_set_brightness(int brightness)
+void backlight_hw_brightness(int brightness)
{
ascodec_write_pmu(AS3543_BACKLIGHT, 2, brightness * 10);
}
-bool _backlight_init(void)
+bool backlight_hw_init(void)
{
ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x80);
ascodec_write_pmu(AS3543_BACKLIGHT, 2, backlight_brightness * 10);
@@ -49,7 +49,7 @@ bool _backlight_init(void)
return true;
}
-void _backlight_on(void)
+void backlight_hw_on(void)
{
#ifdef HAVE_LCD_ENABLE
lcd_enable(true); /* power on lcd + visible display */
@@ -57,7 +57,7 @@ void _backlight_on(void)
ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x80);
}
-void _backlight_off(void)
+void backlight_hw_off(void)
{
ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x0);
#ifdef HAVE_LCD_ENABLE
@@ -65,7 +65,7 @@ void _backlight_off(void)
#endif
}
-void _buttonlight_on(void)
+void buttonlight_hw_on(void)
{
if (amsv2_variant == 0)
{
@@ -77,7 +77,7 @@ void _buttonlight_on(void)
}
}
-void _buttonlight_off(void)
+void buttonlight_hw_off(void)
{
if (amsv2_variant == 0)
{
diff --git a/firmware/target/arm/as3525/sansa-fuzev2/backlight-target.h b/firmware/target/arm/as3525/sansa-fuzev2/backlight-target.h
index f9d7005f79..4138ef7868 100644
--- a/firmware/target/arm/as3525/sansa-fuzev2/backlight-target.h
+++ b/firmware/target/arm/as3525/sansa-fuzev2/backlight-target.h
@@ -25,13 +25,13 @@
#include "config.h"
#include "ascodec.h"
-bool _backlight_init(void);
-void _backlight_on(void);
-void _backlight_off(void);
-#define _backlight_panic_on() _backlight_on()
-void _backlight_set_brightness(int brightness);
+bool backlight_hw_init(void);
+void backlight_hw_on(void);
+void backlight_hw_off(void);
+#define _backlight_panic_on() backlight_hw_on()
+void backlight_hw_brightness(int brightness);
#ifdef HAVE_BUTTON_LIGHT
-void _buttonlight_on(void);
-void _buttonlight_off(void);
+void buttonlight_hw_on(void);
+void buttonlight_hw_off(void);
#endif
#endif
diff --git a/firmware/target/arm/as3525/sansa-m200v4/backlight-target.h b/firmware/target/arm/as3525/sansa-m200v4/backlight-target.h
index b5560bd037..f3ef1095e6 100644
--- a/firmware/target/arm/as3525/sansa-m200v4/backlight-target.h
+++ b/firmware/target/arm/as3525/sansa-m200v4/backlight-target.h
@@ -21,22 +21,22 @@
#ifndef BACKLIGHT_TARGET_H
#define BACKLIGHT_TARGET_H
-static inline bool _backlight_init(void)
+static inline bool backlight_hw_init(void)
{
GPIOD_DIR |= (1<<1);
return true;
}
-static inline void _backlight_on(void)
+static inline void backlight_hw_on(void)
{
GPIOD_PIN(1) = (1<<1);
}
-static inline void _backlight_off(void)
+static inline void backlight_hw_off(void)
{
GPIOD_PIN(1) = 0x00;
}
-#define _backlight_panic_on() _backlight_on()
+#define _backlight_panic_on() backlight_hw_on()
#endif
diff --git a/firmware/target/arm/as3525/sd-as3525.c b/firmware/target/arm/as3525/sd-as3525.c
index ead40eac3c..4530d5d763 100644
--- a/firmware/target/arm/as3525/sd-as3525.c
+++ b/firmware/target/arm/as3525/sd-as3525.c
@@ -969,7 +969,7 @@ void sd_enable(bool on)
if (buttonlight_is_on)
GPIOD_DIR &= ~(1<<7);
else
- _buttonlight_off();
+ buttonlight_hw_off();
#endif
#if defined(HAVE_HOTSWAP) && defined (HAVE_ADJUSTABLE_CPU_VOLTAGE)
@@ -993,7 +993,7 @@ void sd_enable(bool on)
#if defined(HAVE_BUTTON_LIGHT) && defined(HAVE_MULTIDRIVE)
bitmod32(&CCU_IO, 0<<2, 3<<2); /* XPD is general purpose IO (b3:2 = 00) */
if (buttonlight_is_on)
- _buttonlight_on();
+ buttonlight_hw_on();
#endif
}
}
diff --git a/firmware/target/arm/as3525/system-as3525.c b/firmware/target/arm/as3525/system-as3525.c
index f128ef68be..51b6755601 100644
--- a/firmware/target/arm/as3525/system-as3525.c
+++ b/firmware/target/arm/as3525/system-as3525.c
@@ -360,7 +360,7 @@ void system_init(void)
void system_reboot(void)
{
- _backlight_off();
+ backlight_hw_off();
disable_irq();