summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/lcd-remote.h110
-rw-r--r--firmware/target/arm/olympus/mrobe-100/lcd-remote-target.h2
-rw-r--r--firmware/target/arm/tms320dm320/mrobe-500/lcd-remote-target.h2
-rw-r--r--firmware/target/coldfire/iaudio/lcd-remote-target.h1
-rw-r--r--firmware/target/coldfire/iaudio/m3/button-m3.c2
-rw-r--r--firmware/target/coldfire/iaudio/m5/button-m5.c2
-rw-r--r--firmware/target/coldfire/iaudio/x5/button-x5.c2
-rw-r--r--firmware/target/coldfire/iriver/lcd-remote-target.h2
8 files changed, 61 insertions, 62 deletions
diff --git a/firmware/export/lcd-remote.h b/firmware/export/lcd-remote.h
index f2fbbc62f3..41042e04d0 100644
--- a/firmware/export/lcd-remote.h
+++ b/firmware/export/lcd-remote.h
@@ -27,7 +27,7 @@
27#include "config.h" 27#include "config.h"
28#include "lcd.h" 28#include "lcd.h"
29 29
30#ifdef HAVE_REMOTE_LCD 30#ifdef HAVE_REMOTE_LCD /* Not for the players with *only* a remote LCD (m3) */
31 31
32#ifndef __PCTOOL__ 32#ifndef __PCTOOL__
33#include "lcd-remote-target.h" 33#include "lcd-remote-target.h"
@@ -61,17 +61,6 @@ typedef unsigned long fb_remote_data;
61#define FB_RDATA_SZ 4 61#define FB_RDATA_SZ 4
62#endif 62#endif
63 63
64/* common functions */
65void lcd_remote_init(void);
66void lcd_remote_write_command(int cmd);
67void lcd_remote_write_command_ex(int cmd, int data);
68void lcd_remote_write_data(const fb_remote_data *data, int count);
69
70/* Low-level drawing function types */
71typedef void lcd_remote_pixelfunc_type(int x, int y);
72typedef void lcd_remote_blockfunc_type(fb_remote_data *address, unsigned mask,
73 unsigned bits);
74
75#if LCD_REMOTE_DEPTH > 1 /* greyscale - 8 bit max */ 64#if LCD_REMOTE_DEPTH > 1 /* greyscale - 8 bit max */
76#ifdef HAVE_LCD_COLOR 65#ifdef HAVE_LCD_COLOR
77extern unsigned lcd_remote_color_to_native(unsigned color); 66extern unsigned lcd_remote_color_to_native(unsigned color);
@@ -109,14 +98,70 @@ extern unsigned lcd_remote_color_to_native(unsigned color);
109#ifndef LCD_REMOTE_FBHEIGHT 98#ifndef LCD_REMOTE_FBHEIGHT
110#define LCD_REMOTE_FBHEIGHT LCD_REMOTE_HEIGHT 99#define LCD_REMOTE_FBHEIGHT LCD_REMOTE_HEIGHT
111#endif 100#endif
101
112/* The actual framebuffer */ 102/* The actual framebuffer */
113extern fb_remote_data lcd_remote_framebuffer[LCD_REMOTE_FBHEIGHT][LCD_REMOTE_FBWIDTH]; 103extern fb_remote_data lcd_remote_framebuffer[LCD_REMOTE_FBHEIGHT][LCD_REMOTE_FBWIDTH];
114 104
105#if LCD_REMOTE_DEPTH > 1
106extern void lcd_remote_set_foreground(unsigned foreground);
107extern unsigned lcd_remote_get_foreground(void);
108extern void lcd_remote_set_background(unsigned background);
109extern unsigned lcd_remote_get_background(void);
110extern void lcd_remote_set_drawinfo(int mode, unsigned foreground,
111 unsigned background);
112void lcd_remote_set_backdrop(fb_remote_data* backdrop);
113fb_remote_data* lcd_remote_get_backdrop(void);
114
115extern void lcd_remote_mono_bitmap_part(const unsigned char *src, int src_x,
116 int src_y, int stride, int x, int y,
117 int width, int height);
118extern void lcd_remote_mono_bitmap(const unsigned char *src, int x, int y,
119 int width, int height);
120extern void lcd_remote_bitmap_transparent_part(const fb_remote_data *src,
121 int src_x, int src_y,
122 int stride, int x, int y,
123 int width, int height);
124extern void lcd_bitmap_remote_transparent(const fb_remote_data *src, int x,
125 int y, int width, int height);
126#else /* LCD_REMOTE_DEPTH == 1 */
127#define lcd_remote_mono_bitmap lcd_remote_bitmap
128#define lcd_remote_mono_bitmap_part lcd_remote_bitmap_part
129#endif /* LCD_REMOTE_DEPTH */
130
131/* common functions */
132void lcd_remote_init(void);
133void lcd_remote_write_command(int cmd);
134void lcd_remote_write_command_ex(int cmd, int data);
135void lcd_remote_write_data(const fb_remote_data *data, int count);
136
137extern void lcd_remote_bitmap_part(const fb_remote_data *src, int src_x,
138 int src_y, int stride, int x, int y,
139 int width, int height);
140extern void lcd_remote_bitmap(const fb_remote_data *src, int x, int y,
141 int width, int height);
142
143/* Low-level drawing function types */
144typedef void lcd_remote_pixelfunc_type(int x, int y);
145typedef void lcd_remote_blockfunc_type(fb_remote_data *address, unsigned mask,
146 unsigned bits);
147
148/* low level drawing function pointer arrays */
149#if LCD_REMOTE_DEPTH > 1
150extern lcd_remote_pixelfunc_type* const *lcd_remote_pixelfuncs;
151extern lcd_remote_blockfunc_type* const *lcd_remote_blockfuncs;
152#else
153extern lcd_remote_pixelfunc_type* const lcd_remote_pixelfuncs[8];
154extern lcd_remote_blockfunc_type* const lcd_remote_blockfuncs[8];
155#endif
156
157#endif /* HAVE_LCD_REMOTE */
158
115void lcd_remote_init_device(void); 159void lcd_remote_init_device(void);
116void lcd_remote_on(void); 160void lcd_remote_on(void);
117void lcd_remote_off(void); 161void lcd_remote_off(void);
118 162
119extern bool remote_initialized; 163extern bool remote_initialized;
164bool remote_detect(void);
120 165
121extern void lcd_remote_init(void); 166extern void lcd_remote_init(void);
122extern int lcd_remote_default_contrast(void); 167extern int lcd_remote_default_contrast(void);
@@ -168,15 +213,6 @@ extern void lcd_remote_setfont(int font);
168extern int lcd_remote_getfont(void); 213extern int lcd_remote_getfont(void);
169extern int lcd_remote_getstringsize(const unsigned char *str, int *w, int *h); 214extern int lcd_remote_getstringsize(const unsigned char *str, int *w, int *h);
170 215
171/* low level drawing function pointer arrays */
172#if LCD_REMOTE_DEPTH > 1
173extern lcd_remote_pixelfunc_type* const *lcd_remote_pixelfuncs;
174extern lcd_remote_blockfunc_type* const *lcd_remote_blockfuncs;
175#else
176extern lcd_remote_pixelfunc_type* const lcd_remote_pixelfuncs[8];
177extern lcd_remote_blockfunc_type* const lcd_remote_blockfuncs[8];
178#endif
179
180extern void lcd_remote_drawpixel(int x, int y); 216extern void lcd_remote_drawpixel(int x, int y);
181extern void lcd_remote_drawline(int x1, int y1, int x2, int y2); 217extern void lcd_remote_drawline(int x1, int y1, int x2, int y2);
182extern void lcd_remote_hline(int x1, int x2, int y); 218extern void lcd_remote_hline(int x1, int x2, int y);
@@ -185,44 +221,14 @@ extern void lcd_remote_drawrect(int x, int y, int width, int height);
185extern void lcd_remote_fillrect(int x, int y, int width, int height); 221extern void lcd_remote_fillrect(int x, int y, int width, int height);
186extern void lcd_remote_draw_border_viewport(void); 222extern void lcd_remote_draw_border_viewport(void);
187extern void lcd_remote_fill_viewport(void); 223extern void lcd_remote_fill_viewport(void);
188extern void lcd_remote_bitmap_part(const fb_remote_data *src, int src_x,
189 int src_y, int stride, int x, int y,
190 int width, int height);
191extern void lcd_remote_bitmap(const fb_remote_data *src, int x, int y,
192 int width, int height);
193extern void lcd_remote_putsxy(int x, int y, const unsigned char *str); 224extern void lcd_remote_putsxy(int x, int y, const unsigned char *str);
194extern void lcd_remote_putsxyf(int x, int y, const unsigned char *fmt, ...); 225extern void lcd_remote_putsxyf(int x, int y, const unsigned char *fmt, ...);
195 226
196extern void lcd_remote_bidir_scroll(int threshold); 227extern void lcd_remote_bidir_scroll(int threshold);
197extern void lcd_remote_scroll_step(int pixels); 228extern void lcd_remote_scroll_step(int pixels);
198 229
199#if LCD_REMOTE_DEPTH > 1
200extern void lcd_remote_set_foreground(unsigned foreground);
201extern unsigned lcd_remote_get_foreground(void);
202extern void lcd_remote_set_background(unsigned background);
203extern unsigned lcd_remote_get_background(void);
204extern void lcd_remote_set_drawinfo(int mode, unsigned foreground,
205 unsigned background);
206void lcd_remote_set_backdrop(fb_remote_data* backdrop);
207fb_remote_data* lcd_remote_get_backdrop(void);
208
209extern void lcd_remote_mono_bitmap_part(const unsigned char *src, int src_x,
210 int src_y, int stride, int x, int y,
211 int width, int height);
212extern void lcd_remote_mono_bitmap(const unsigned char *src, int x, int y,
213 int width, int height);
214extern void lcd_remote_bitmap_transparent_part(const fb_remote_data *src,
215 int src_x, int src_y,
216 int stride, int x, int y,
217 int width, int height);
218extern void lcd_bitmap_remote_transparent(const fb_remote_data *src, int x,
219 int y, int width, int height);
220#else /* LCD_REMOTE_DEPTH == 1 */
221#define lcd_remote_mono_bitmap lcd_remote_bitmap
222#define lcd_remote_mono_bitmap_part lcd_remote_bitmap_part
223#endif /* LCD_REMOTE_DEPTH */
224extern void lcd_remote_bmp_part(const struct bitmap* bm, int src_x, int src_y, 230extern void lcd_remote_bmp_part(const struct bitmap* bm, int src_x, int src_y,
225 int x, int y, int width, int height); 231 int x, int y, int width, int height);
226extern void lcd_remote_bmp(const struct bitmap* bm, int x, int y); 232extern void lcd_remote_bmp(const struct bitmap* bm, int x, int y);
227#endif 233
228#endif /* __LCD_REMOTE_H__ */ 234#endif /* __LCD_REMOTE_H__ */
diff --git a/firmware/target/arm/olympus/mrobe-100/lcd-remote-target.h b/firmware/target/arm/olympus/mrobe-100/lcd-remote-target.h
index 6226f4462e..a214690aec 100644
--- a/firmware/target/arm/olympus/mrobe-100/lcd-remote-target.h
+++ b/firmware/target/arm/olympus/mrobe-100/lcd-remote-target.h
@@ -21,8 +21,6 @@
21#ifndef LCD_REMOTE_TARGET_H 21#ifndef LCD_REMOTE_TARGET_H
22#define LCD_REMOTE_TARGET_H 22#define LCD_REMOTE_TARGET_H
23 23
24bool remote_detect(void); /* returns detection status */
25
26void lcd_remote_backlight(bool on); 24void lcd_remote_backlight(bool on);
27 25
28bool lcd_remote_read_device(unsigned char *data); 26bool lcd_remote_read_device(unsigned char *data);
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/lcd-remote-target.h b/firmware/target/arm/tms320dm320/mrobe-500/lcd-remote-target.h
index ee3443b666..a3657490eb 100644
--- a/firmware/target/arm/tms320dm320/mrobe-500/lcd-remote-target.h
+++ b/firmware/target/arm/tms320dm320/mrobe-500/lcd-remote-target.h
@@ -26,8 +26,6 @@
26 26
27void lcd_remote_powersave(bool on); 27void lcd_remote_powersave(bool on);
28 28
29bool remote_detect(void);
30
31#ifndef SIMULATOR 29#ifndef SIMULATOR
32void _remote_backlight_on(void); 30void _remote_backlight_on(void);
33void _remote_backlight_off(void); 31void _remote_backlight_off(void);
diff --git a/firmware/target/coldfire/iaudio/lcd-remote-target.h b/firmware/target/coldfire/iaudio/lcd-remote-target.h
index 435eee08c8..fe55212b81 100644
--- a/firmware/target/coldfire/iaudio/lcd-remote-target.h
+++ b/firmware/target/coldfire/iaudio/lcd-remote-target.h
@@ -24,7 +24,6 @@
24#define REMOTE_INIT_LCD 1 24#define REMOTE_INIT_LCD 1
25#define REMOTE_DEINIT_LCD 2 25#define REMOTE_DEINIT_LCD 2
26 26
27bool remote_detect(void);
28void lcd_remote_powersave(bool on); 27void lcd_remote_powersave(bool on);
29void lcd_remote_poweroff(void); /* for when remote is plugged during shutdown*/ 28void lcd_remote_poweroff(void); /* for when remote is plugged during shutdown*/
30 29
diff --git a/firmware/target/coldfire/iaudio/m3/button-m3.c b/firmware/target/coldfire/iaudio/m3/button-m3.c
index 308f656ad2..3c31c962c8 100644
--- a/firmware/target/coldfire/iaudio/m3/button-m3.c
+++ b/firmware/target/coldfire/iaudio/m3/button-m3.c
@@ -24,7 +24,7 @@
24#include "button.h" 24#include "button.h"
25#include "backlight.h" 25#include "backlight.h"
26#include "adc.h" 26#include "adc.h"
27#include "lcd-remote-target.h" 27#include "lcd-remote.h"
28 28
29static bool hold_button = false; 29static bool hold_button = false;
30static bool remote_hold_button = false; 30static bool remote_hold_button = false;
diff --git a/firmware/target/coldfire/iaudio/m5/button-m5.c b/firmware/target/coldfire/iaudio/m5/button-m5.c
index cccda5e598..6dbd2023f2 100644
--- a/firmware/target/coldfire/iaudio/m5/button-m5.c
+++ b/firmware/target/coldfire/iaudio/m5/button-m5.c
@@ -23,7 +23,7 @@
23#include "button.h" 23#include "button.h"
24#include "backlight.h" 24#include "backlight.h"
25#include "adc.h" 25#include "adc.h"
26#include "lcd-remote-target.h" 26#include "lcd-remote.h"
27 27
28/* have buttons scan by default */ 28/* have buttons scan by default */
29static bool button_scan_on = true; 29static bool button_scan_on = true;
diff --git a/firmware/target/coldfire/iaudio/x5/button-x5.c b/firmware/target/coldfire/iaudio/x5/button-x5.c
index c901105100..e1f68de36b 100644
--- a/firmware/target/coldfire/iaudio/x5/button-x5.c
+++ b/firmware/target/coldfire/iaudio/x5/button-x5.c
@@ -23,7 +23,7 @@
23#include "button.h" 23#include "button.h"
24#include "backlight.h" 24#include "backlight.h"
25#include "adc.h" 25#include "adc.h"
26#include "lcd-remote-target.h" 26#include "lcd-remote.h"
27 27
28/* have buttons scan by default */ 28/* have buttons scan by default */
29static bool button_scan_on = true; 29static bool button_scan_on = true;
diff --git a/firmware/target/coldfire/iriver/lcd-remote-target.h b/firmware/target/coldfire/iriver/lcd-remote-target.h
index 7e2b6f5940..85bc754143 100644
--- a/firmware/target/coldfire/iriver/lcd-remote-target.h
+++ b/firmware/target/coldfire/iriver/lcd-remote-target.h
@@ -29,6 +29,4 @@ void lcd_remote_emireduce(bool state);
29#endif 29#endif
30void lcd_remote_powersave(bool on); 30void lcd_remote_powersave(bool on);
31 31
32bool remote_detect(void);
33
34#endif 32#endif