add lcd display code for Tripledragon, mostly from tuxbox

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@964 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
seife
2010-12-25 17:43:43 +00:00
parent 2e037a6b73
commit 66dd0b0174
18 changed files with 3297 additions and 18 deletions

View File

@@ -26,7 +26,38 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifdef HAVE_GENERIC_HARDWARE
// dummy
#define LCD_ROWS 8
#define LCD_COLS 120
#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>
@@ -36,7 +67,11 @@ 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;