summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/ipod
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/ipod')
-rw-r--r--firmware/target/arm/ipod/1g2g/backlight-1g2g.c4
-rw-r--r--firmware/target/arm/ipod/1g2g/backlight-target.h6
-rw-r--r--firmware/target/arm/ipod/3g/backlight-3g.c4
-rw-r--r--firmware/target/arm/ipod/backlight-4g_color.c12
-rw-r--r--firmware/target/arm/ipod/backlight-nano_video.c6
-rw-r--r--firmware/target/arm/ipod/backlight-target.h44
-rw-r--r--firmware/target/arm/ipod/button-1g-3g.c8
-rw-r--r--firmware/target/arm/ipod/button-mini1g.c8
-rw-r--r--firmware/target/arm/ipod/lcd-color_nano.c2
9 files changed, 47 insertions, 47 deletions
diff --git a/firmware/target/arm/ipod/1g2g/backlight-1g2g.c b/firmware/target/arm/ipod/1g2g/backlight-1g2g.c
index b7797813ec..7f1fa7ba42 100644
--- a/firmware/target/arm/ipod/1g2g/backlight-1g2g.c
+++ b/firmware/target/arm/ipod/1g2g/backlight-1g2g.c
@@ -24,13 +24,13 @@
#include "backlight.h"
#include "backlight-target.h"
-void _backlight_on(void)
+void backlight_hw_on(void)
{
LCD1_CONTROL |= 0x02;
lcd_set_backlight_inversion(true);
}
-void _backlight_off(void)
+void backlight_hw_off(void)
{
LCD1_CONTROL &= ~0x02;
lcd_set_backlight_inversion(false);
diff --git a/firmware/target/arm/ipod/1g2g/backlight-target.h b/firmware/target/arm/ipod/1g2g/backlight-target.h
index 22826054aa..e888aa7c3f 100644
--- a/firmware/target/arm/ipod/1g2g/backlight-target.h
+++ b/firmware/target/arm/ipod/1g2g/backlight-target.h
@@ -21,8 +21,8 @@
#ifndef BACKLIGHT_TARGET_H
#define BACKLIGHT_TARGET_H
-#define _backlight_init() false
-void _backlight_on(void);
-void _backlight_off(void);
+#define backlight_hw_init() false
+void backlight_hw_on(void);
+void backlight_hw_off(void);
#endif
diff --git a/firmware/target/arm/ipod/3g/backlight-3g.c b/firmware/target/arm/ipod/3g/backlight-3g.c
index 77088e32ec..fcc162310f 100644
--- a/firmware/target/arm/ipod/3g/backlight-3g.c
+++ b/firmware/target/arm/ipod/3g/backlight-3g.c
@@ -23,12 +23,12 @@
#include "backlight.h"
#include "backlight-target.h"
-void _backlight_on(void)
+void backlight_hw_on(void)
{
LCD1_CONTROL |= 0x02;
}
-void _backlight_off(void)
+void backlight_hw_off(void)
{
LCD1_CONTROL &= ~0x02;
}
diff --git a/firmware/target/arm/ipod/backlight-4g_color.c b/firmware/target/arm/ipod/backlight-4g_color.c
index befb036eab..96ed387625 100644
--- a/firmware/target/arm/ipod/backlight-4g_color.c
+++ b/firmware/target/arm/ipod/backlight-4g_color.c
@@ -44,11 +44,11 @@ static unsigned char log_brightness[32] = {
static unsigned brightness = 100; /* 1 to 255 */
static bool enabled = false;
-/* Handling B03 in _backlight_on() and _backlight_off() makes backlight go off
+/* Handling B03 in backlight_hw_on() and backlight_hw_off() makes backlight go off
* without delay. Not doing that does a short (fixed) fade out. Opt for the
* latter. */
-void _backlight_on(void)
+void backlight_hw_on(void)
{
/* brightness full */
outl(0x80000000 | (brightness << 16), 0x7000a010);
@@ -56,27 +56,27 @@ void _backlight_on(void)
enabled = true;
}
-void _backlight_off(void)
+void backlight_hw_off(void)
{
outl(0x80000000, 0x7000a010);
GPIO_CLEAR_BITWISE(GPIOB_OUTPUT_VAL, 0x08);
enabled = false;
}
-void _backlight_set_brightness(int val)
+void backlight_hw_brightness(int val)
{
brightness = log_brightness[val];
if (enabled)
outl(0x80000000 | (brightness << 16), 0x7000a010);
}
-bool _backlight_init(void)
+bool backlight_hw_init(void)
{
GPIO_SET_BITWISE(GPIOB_ENABLE, 0x0c); /* B02 and B03 enable */
GPIO_SET_BITWISE(GPIOB_OUTPUT_VAL, 0x08); /* B03 = 1 */
GPO32_ENABLE &= ~0x2000000; /* D01 disable, so pwm takes over */
DEV_EN |= DEV_PWM; /* PWM enable */
- _backlight_on();
+ backlight_hw_on();
return true;
}
diff --git a/firmware/target/arm/ipod/backlight-nano_video.c b/firmware/target/arm/ipod/backlight-nano_video.c
index 2f56f94225..e2e9bf0341 100644
--- a/firmware/target/arm/ipod/backlight-nano_video.c
+++ b/firmware/target/arm/ipod/backlight-nano_video.c
@@ -38,7 +38,7 @@ static int brightness = 1; /* 1 to 32 */
static int current_dim = 16; /* default after enabling the backlight dimmer */
static bool enabled = false;
-void _backlight_set_brightness(int val)
+void backlight_hw_brightness(int val)
{
int oldlevel;
@@ -91,7 +91,7 @@ void _backlight_hw_enable(bool on)
GPIO_SET_BITWISE(GPIOD_OUTPUT_VAL, 0x80);
sleep(HZ/100);
current_dim = 16;
- _backlight_set_brightness(brightness);
+ backlight_hw_brightness(brightness);
}
else
{
@@ -116,7 +116,7 @@ void _backlight_led_off(void)
GPIO_CLEAR_BITWISE(GPIOL_OUTPUT_VAL, 0x80);
}
-bool _backlight_init(void)
+bool backlight_hw_init(void)
{
GPIO_SET_BITWISE(GPIOB_ENABLE, 0x08);
GPIO_SET_BITWISE(GPIOB_OUTPUT_EN, 0x08);
diff --git a/firmware/target/arm/ipod/backlight-target.h b/firmware/target/arm/ipod/backlight-target.h
index 9b6a96b3cb..fef7ee8ce0 100644
--- a/firmware/target/arm/ipod/backlight-target.h
+++ b/firmware/target/arm/ipod/backlight-target.h
@@ -23,8 +23,8 @@
#if defined(IPOD_VIDEO) || defined(IPOD_NANO)
-bool _backlight_init(void);
-void _backlight_set_brightness(int val);
+bool backlight_hw_init(void);
+void backlight_hw_brightness(int val);
void _backlight_led_on(void);
void _backlight_led_off(void);
void _backlight_hw_enable(bool on);
@@ -34,48 +34,48 @@ void lcd_awake(void);
#endif
#ifdef BOOTLOADER
-#define _backlight_on() do { _backlight_hw_enable(true); \
+#define backlight_hw_on() do { _backlight_hw_enable(true); \
_backlight_led_on(); } while(0)
-#define _backlight_off() do { _backlight_led_off(); \
+#define backlight_hw_off() do { _backlight_led_off(); \
_backlight_hw_enable(false); } while(0)
#else /* !BOOTLOADER */
-#define _backlight_on_isr() _backlight_led_on()
-#define _backlight_off_isr() _backlight_led_off()
-#define _backlight_on_normal() do { _backlight_hw_enable(true); \
+#define backlight_hw_on_isr() _backlight_led_on()
+#define backlight_hw_off_isr() _backlight_led_off()
+#define backlight_hw_on_normal() do { _backlight_hw_enable(true); \
_backlight_led_on(); } while(0)
-#define _backlight_off_normal() do { _backlight_led_off(); \
+#define backlight_hw_off_normal() do { _backlight_led_off(); \
_backlight_hw_enable(false); } while(0)
#define _BACKLIGHT_FADE_ENABLE
#endif /* !BOOTLOADER */
#elif defined(IPOD_4G) || defined(IPOD_COLOR)
-bool _backlight_init(void);
-void _backlight_on(void);
-void _backlight_off(void);
-void _backlight_set_brightness(int val);
+bool backlight_hw_init(void);
+void backlight_hw_on(void);
+void backlight_hw_off(void);
+void backlight_hw_brightness(int val);
#elif defined(IPOD_MINI) || defined(IPOD_MINI2G)
-#define _backlight_init() true
+#define backlight_hw_init() true
void _backlight_hw_on(void);
void _backlight_hw_off(void);
#ifdef BOOTLOADER
-#define _backlight_on() _backlight_hw_on()
-#define _backlight_off() _backlight_hw_off()
+#define backlight_hw_on() _backlight_hw_on()
+#define backlight_hw_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()
+#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
#elif defined(IPOD_1G2G) || defined(IPOD_3G)
-#define _backlight_init() true
-void _backlight_on(void);
-void _backlight_off(void);
+#define backlight_hw_init() true
+void backlight_hw_on(void);
+void backlight_hw_off(void);
#endif
#endif
diff --git a/firmware/target/arm/ipod/button-1g-3g.c b/firmware/target/arm/ipod/button-1g-3g.c
index 045a0f6d8a..67aa7eb336 100644
--- a/firmware/target/arm/ipod/button-1g-3g.c
+++ b/firmware/target/arm/ipod/button-1g-3g.c
@@ -66,7 +66,7 @@ static void handle_scroll_wheel(int new_scroll)
static int prev_scroll = -1;
static int direction = 0;
static int count = 0;
- static long next_backlight_on = 0;
+ static long nextbacklight_hw_on = 0;
static unsigned long last_wheel_usec = 0;
static unsigned long wheel_delta = 1ul << 24;
@@ -96,10 +96,10 @@ static void handle_scroll_wheel(int new_scroll)
}
/* poke backlight every 1/4s of activity */
- 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;
}
/* has wheel travelled far enough? */
@@ -152,7 +152,7 @@ static void handle_scroll_wheel(int new_scroll)
wheel_velocity = v;
/* ensure backlight never gets stuck for an extended period if tick
* wrapped such that next poke is very far ahead */
- next_backlight_on = current_tick - 1;
+ nextbacklight_hw_on = current_tick - 1;
}
else {
/* some velocity filtering to smooth things out */
diff --git a/firmware/target/arm/ipod/button-mini1g.c b/firmware/target/arm/ipod/button-mini1g.c
index d4a75c90d8..a508958de1 100644
--- a/firmware/target/arm/ipod/button-mini1g.c
+++ b/firmware/target/arm/ipod/button-mini1g.c
@@ -60,7 +60,7 @@ static void handle_scroll_wheel(int new_scroll)
static int prev_scroll = -1;
static int direction = 0;
static int count = 0;
- static long next_backlight_on = 0;
+ static long nextbacklight_hw_on = 0;
int wheel_keycode = BUTTON_NONE;
int scroll;
@@ -92,10 +92,10 @@ static void handle_scroll_wheel(int new_scroll)
}
/* poke backlight every 1/4s of activity */
- 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;
}
if (++count < WHEEL_BASE_SENSITIVITY)
@@ -144,7 +144,7 @@ static void handle_scroll_wheel(int new_scroll)
wheel_velocity = v;
/* ensure backlight never gets stuck for an extended period if tick
* wrapped such that next poke is very far ahead */
- next_backlight_on = current_tick - 1;
+ nextbacklight_hw_on = current_tick - 1;
}
else {
/* some velocity filtering to smooth things out */
diff --git a/firmware/target/arm/ipod/lcd-color_nano.c b/firmware/target/arm/ipod/lcd-color_nano.c
index c7676fa721..67d26aa862 100644
--- a/firmware/target/arm/ipod/lcd-color_nano.c
+++ b/firmware/target/arm/ipod/lcd-color_nano.c
@@ -122,7 +122,7 @@ void lcd_shutdown(void) {
#if defined(IPOD_NANO)
_backlight_hw_enable(false);
#elif defined(IPOD_COLOR)
- _backlight_off();
+ backlight_hw_off();
#endif
if ((lcd_type&1) == 0) {