mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 09:51:22 +02:00
- TRIPLEDRAGON: deleted
Conflicts: lib/libdvbsub/dvbsub.cpp src/system/flashtool.cpp
This commit is contained in:
@@ -63,12 +63,8 @@ CLCDDisplay::CLCDDisplay()
|
||||
}
|
||||
|
||||
//graphic (binary) mode
|
||||
#ifdef HAVE_TRIPLEDRAGON
|
||||
if (ioctl(fd, IOC_LCD_WRMODE, LCD_MODE_BIN) < 0)
|
||||
#else
|
||||
int i=LCD_MODE_BIN;
|
||||
if ( ioctl(fd,LCD_IOCTL_ASC_MODE,&i) < 0 )
|
||||
#endif
|
||||
{
|
||||
perror("graphic mode failed");
|
||||
return;
|
||||
@@ -105,12 +101,8 @@ void CLCDDisplay::resume()
|
||||
}
|
||||
|
||||
//graphic (binary) mode
|
||||
#ifdef HAVE_TRIPLEDRAGON
|
||||
if (ioctl(fd, IOC_LCD_WRMODE, LCD_MODE_BIN) < 0)
|
||||
#else
|
||||
int i=LCD_MODE_BIN;
|
||||
if ( ioctl(fd,LCD_IOCTL_ASC_MODE,&i) < 0 )
|
||||
#endif
|
||||
{
|
||||
perror("graphic mode failed");
|
||||
return;
|
||||
@@ -119,71 +111,6 @@ void CLCDDisplay::resume()
|
||||
paused = 0;
|
||||
}
|
||||
|
||||
#ifdef HAVE_TRIPLEDRAGON
|
||||
void CLCDDisplay::convert_data()
|
||||
{
|
||||
int x, y, xx, xp, yp;
|
||||
unsigned char pix, bit;
|
||||
|
||||
/* 128x64 (8bpp) membuffer -> 16*64 (1bpp) lcdbuffer */
|
||||
/* TODO: extend skins to 128x64 */
|
||||
|
||||
/* the strange offset handling comes from a bug (probably) in the
|
||||
TD LCD driver: the MSB (0x80) of the first byte (lcd[0]) written to
|
||||
the device actually appears on the lower right, 8 pixels up, so we
|
||||
must shift the whole buffer one pixel to the right. This is wrong for
|
||||
the column 127 (rightmost), which is shifted up 8 lines.
|
||||
*/
|
||||
for (y = 0; y < LCD_LINES; y++) {
|
||||
for (x = 0; x < LCD_STRIDE; x++) {
|
||||
pix = 0;
|
||||
bit = 0x80;
|
||||
|
||||
for (xx = x * 8; xx < x * 8 + 8; xx++, bit >>= 1) {
|
||||
xp = xx - 1; /* shift the whole buffer one pixel to the right */
|
||||
yp = y;
|
||||
if (xp < 0) { /* rightmost column (column 127) */
|
||||
xp += LCD_COLS; /* wraparound */
|
||||
yp -= 8; /* shift down 8 lines */
|
||||
if (yp < 0) /* wraparound */
|
||||
yp += LCD_LINES;
|
||||
}
|
||||
if (raw[yp][xp] == 1)
|
||||
pix |= bit;
|
||||
}
|
||||
/* I was chasing this one for quite some time, so check it for now */
|
||||
#if 1
|
||||
if (y * LCD_STRIDE + x > LCD_BUFFER_SIZE)
|
||||
fprintf(stderr, "%s: y (%d) * LCD_STRIDE (%d) + x (%d) (== %d) > LCD_BUFFER_SIZE (%d)\n",
|
||||
__FUNCTION__, y, LCD_STRIDE, x, y*LCD_STRIDE+x, LCD_BUFFER_SIZE);
|
||||
else
|
||||
#endif
|
||||
lcd[y * LCD_STRIDE + x] = pix;
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* alternative solution, just ignore the rightmost column (which would be the
|
||||
MSB of the first byte */
|
||||
for (y=0; y<64; y++){
|
||||
for (x=0; x<(128/8); x++){
|
||||
int pix=0, start = 0;
|
||||
unsigned char bit = 0x80;
|
||||
int offset=(y*128)+x*8;
|
||||
if (x == 0) { /* first column, skip MSB */
|
||||
start = 1;
|
||||
bit = 0x40;
|
||||
} else
|
||||
offset--;
|
||||
for (yy=start; yy<8; yy++, bit >>=1) {
|
||||
pix|=(_buffer[offset++]>=108)?bit:0;
|
||||
}
|
||||
raw[y*16+x]=pix;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
void CLCDDisplay::convert_data ()
|
||||
{
|
||||
#ifndef HAVE_GENERIC_HARDWARE
|
||||
@@ -205,7 +132,6 @@ void CLCDDisplay::convert_data ()
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void CLCDDisplay::update()
|
||||
{
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#ifdef HAVE_SPARK_HARDWARE
|
||||
#error src/lcddisplay/lcddisplay.h must not be included on SPARK
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GENERIC_HARDWARE
|
||||
// dummy
|
||||
#define LCD_ROWS 8
|
||||
@@ -36,30 +37,6 @@
|
||||
#define LCD_PIXEL_OFF 0
|
||||
#define LCD_PIXEL_ON 1
|
||||
#define LCD_PIXEL_INV 2
|
||||
|
||||
#else
|
||||
#ifndef HAVE_TRIPLEDRAGON
|
||||
/* dreambox is actually compatible to dbox2 wrt. lcd */
|
||||
#include <dbox/lcd-ks0713.h>
|
||||
#define LCD_DEVICE "/dev/dbox/lcd0"
|
||||
#else
|
||||
#include <tdpanel/lcdstuff.h>
|
||||
#include <tddevices.h>
|
||||
#define LCD_LINES 64
|
||||
#define LCD_ROWS (LCD_LINES / 8) // compatibility with stupid DBOX LCD driver
|
||||
#define LCD_COLS 128
|
||||
#define LCD_STRIDE (LCD_COLS / 8)
|
||||
#define LCD_BUFFER_SIZE (LCD_LINES * LCD_STRIDE)
|
||||
#define LCD_PIXEL_OFF 0
|
||||
#define LCD_PIXEL_ON 1
|
||||
#define LCD_PIXEL_INV 2
|
||||
#define LCD_DEVICE "/dev/" DEVICE_NAME_LCD
|
||||
#define LCD_MODE_ASC 0
|
||||
#define LCD_MODE_BIN 2
|
||||
// ioctls
|
||||
#define LCD_IOCTL_ASC_MODE IOC_LCD_WRMODE
|
||||
#define LCD_IOCTL_CLEAR IOC_LCD_CLEAR
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
@@ -70,11 +47,7 @@ class CLCDDisplay
|
||||
{
|
||||
private:
|
||||
raw_display_t raw;
|
||||
#ifdef HAVE_TRIPLEDRAGON
|
||||
unsigned char lcd[LCD_BUFFER_SIZE];
|
||||
#else
|
||||
unsigned char lcd[LCD_ROWS][LCD_COLS];
|
||||
#endif
|
||||
int fd, paused;
|
||||
std::string iconBasePath;
|
||||
bool available;
|
||||
|
Reference in New Issue
Block a user