From 180ab0b55a1cafe94cd17015402490821c448290 Mon Sep 17 00:00:00 2001 From: reinelt <> Date: Tue, 9 Sep 2003 11:47:47 +0000 Subject: [lcd4linux @ 2003-09-09 11:47:47 by reinelt] basic icon support for HD44780 --- HD44780.c | 29 +++++++++++++++++++++++++++-- MatrixOrbital.c | 11 +++++------ USBLCD.c | 11 +++++------ 3 files changed, 37 insertions(+), 14 deletions(-) diff --git a/HD44780.c b/HD44780.c index 0fe36a5..245e2ca 100644 --- a/HD44780.c +++ b/HD44780.c @@ -1,4 +1,4 @@ -/* $Id: HD44780.c,v 1.37 2003/09/09 06:54:43 reinelt Exp $ +/* $Id: HD44780.c,v 1.38 2003/09/09 11:47:47 reinelt Exp $ * * driver for display modules based on the HD44780 chip * @@ -27,6 +27,9 @@ * * * $Log: HD44780.c,v $ + * Revision 1.38 2003/09/09 11:47:47 reinelt + * basic icon support for HD44780 + * * Revision 1.37 2003/09/09 06:54:43 reinelt * new function 'cfg_number()' * @@ -195,6 +198,7 @@ #include "cfg.h" #include "display.h" #include "bar.h" +#include "icon.h" #include "parport.h" #include "udelay.h" @@ -216,6 +220,7 @@ static LCD Lcd; +static int Icons; static int Bits=0; static int GPO=0; static int Controllers = 0; @@ -387,7 +392,10 @@ int HD_clear (int full) { memset (FrameBuffer1, ' ', Lcd.rows*Lcd.cols*sizeof(char)); + + icon_clear(); bar_clear(); + GPO=0; if (full) { @@ -491,7 +499,15 @@ int HD_init (LCD *Self) HD_command (0x03, 0x0c, 1640); // Display on, cursor off, blink off, wait 1.64 ms HD_command (0x03, 0x06, 40); // curser moves to right, no shift - bar_init(rows, cols, XRES, YRES, CHARS); + if (cfg_number("Icons", 0, 0, 8, &Icons)<0) return -1; + if (Icons>0) { + info ("reserving %d of %d user-defined characters for icons", Icons, CHARS); + icon_init(Lcd.rows, Lcd.cols, XRES, YRES, CHARS, Icons, HD_define_char); + Self->icons=Icons; + Lcd.icons=Icons; + } + + bar_init(rows, cols, XRES, YRES, CHARS-Icons); bar_add_segment( 0, 0,255, 32); // ASCII 32 = blank bar_add_segment(255,255,255,255); // ASCII 255 = block @@ -535,6 +551,12 @@ int HD_bar (int type, int row, int col, int max, int len1, int len2) } +int HD_icon (int num, int seq, int row, int col) +{ + return icon_draw (num, seq, row, col); +} + + int HD_gpo (int num, int val) { if (num>=Lcd.gpos) @@ -559,6 +581,7 @@ int HD_flush (void) for (row=0; row2014-10-15d/control: add Build-Depends on dvb-toolsJonathan McCrohan2-1/+2 2014-10-15New Upstream Snapshot (commit d26b627)Jonathan McCrohan1-0/+10 2014-10-15Imported Upstream version 0+git20141009.d26b627upstream/0+git20141009.d26b627Jonathan McCrohan2010-11120/+159271 2014-07-23Release 0+git20140611.14bd6c7-1debian/0+git20140611.14bd6c7-1Jonathan McCrohan1-2/+2 2014-07-23New Upstream Snapshot (commit 14bd6c7)Jonathan McCrohan1-2/+3 2014-07-23Imported Upstream version 0+git20140611.14bd6c7upstream/0+git20140611.14bd6c7Jonathan McCrohan7-11/+60 2014-05-13New Upstream Snapshot (commit 1246b27)Jonathan McCrohan1-0/+6 2014-05-13Imported Upstream version 0+git20140512.1246b27upstream/0+git20140512.1246b27Jonathan McCrohan391-301/+3983 2014-04-05Release 0+git20140326.cfc2975-1debian/0+git20140326.cfc2975-1Jonathan McCrohan1-2/+2 2014-04-05d/control: update Homepage (upstream has moved from Gitweb to cgit)Jonathan McCrohan2-1/+2 2014-04-05New Upstream Snapshot (commit cfc2975)Jonathan McCrohan1-0/+6 2014-04-05Imported Upstream version 0+git20140326.cfc2975upstream/0+git20140326.cfc2975Jonathan McCrohan118-656/+877 2014-01-16Release 0+git20140107.1850cf8-1debian/0+git20140107.1850cf8-1Jonathan McCrohan1-2/+2 2014-01-16Update Standards Version to 3.9.5Jonathan McCrohan2-1/+9