Removed use of global static lcd structure from stv5730.c; now
uses the dynamically allocated stv5730 structure.
This commit is contained in:
+11
-11
@@ -259,7 +259,7 @@ stv5730_drawchar2fb (int x, int y, unsigned char z)
|
||||
|
||||
if (x < 0 || x >= STV5730_WID || y < 0 || y >= STV5730_HGT)
|
||||
return;
|
||||
lcd.framebuf[(y * STV5730_WID) + x] = stv5730_to_ascii[(unsigned int) z];
|
||||
stv5730->framebuf[(y * STV5730_WID) + x] = stv5730_to_ascii[(unsigned int) z];
|
||||
|
||||
}
|
||||
|
||||
@@ -447,7 +447,7 @@ stv5730_init (struct lcd_logical_driver *driver, char *args)
|
||||
memset (driver->framebuf, 0, STV5730_WID * STV5730_HGT);
|
||||
|
||||
driver->cellwid = 4;
|
||||
driver->cellhgt = 6; // FIXME: lcd.cellwid always stays 5
|
||||
driver->cellhgt = 6; // FIXME: stv5730->cellwid always stays 5
|
||||
// regardless what it is set to here. This is
|
||||
// a bug but not inside this driver.
|
||||
driver->clear = stv5730_clear;
|
||||
@@ -484,9 +484,9 @@ stv5730_init (struct lcd_logical_driver *driver, char *args)
|
||||
void
|
||||
stv5730_close ()
|
||||
{
|
||||
if (lcd.framebuf != NULL)
|
||||
free (lcd.framebuf);
|
||||
lcd.framebuf = NULL;
|
||||
if (stv5730->framebuf != NULL)
|
||||
free (stv5730->framebuf);
|
||||
stv5730->framebuf = NULL;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
@@ -495,7 +495,7 @@ stv5730_close ()
|
||||
void
|
||||
stv5730_clear ()
|
||||
{
|
||||
memset (lcd.framebuf, 0x0B, STV5730_WID * STV5730_HGT);
|
||||
memset (stv5730->framebuf, 0x0B, STV5730_WID * STV5730_HGT);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
@@ -505,7 +505,7 @@ stv5730_clear ()
|
||||
void
|
||||
stv5730_flush ()
|
||||
{
|
||||
lcd.draw_frame (lcd.framebuf);
|
||||
stv5730->draw_frame (stv5730->framebuf);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
@@ -589,11 +589,11 @@ stv5730_vbar (int x, int len)
|
||||
|
||||
if (len >= (i + 6))
|
||||
{
|
||||
lcd.framebuf[((10 - (i / 6)) * STV5730_WID) + x] = 0x77;
|
||||
stv5730->framebuf[((10 - (i / 6)) * STV5730_WID) + x] = 0x77;
|
||||
}
|
||||
else
|
||||
{
|
||||
lcd.framebuf[((10 - (i / 6)) * STV5730_WID) + x] =
|
||||
stv5730->framebuf[((10 - (i / 6)) * STV5730_WID) + x] =
|
||||
0x72 + (len % 6);
|
||||
}
|
||||
}
|
||||
@@ -622,11 +622,11 @@ stv5730_hbar (int x, int y, int len)
|
||||
|
||||
if (len >= (i + 4))
|
||||
{
|
||||
lcd.framebuf[(y * STV5730_WID) + x + (i / 5)] = 0x64;
|
||||
stv5730->framebuf[(y * STV5730_WID) + x + (i / 5)] = 0x64;
|
||||
}
|
||||
else
|
||||
{
|
||||
lcd.framebuf[(y * STV5730_WID) + x + (i / 5)] =
|
||||
stv5730->framebuf[(y * STV5730_WID) + x + (i / 5)] =
|
||||
0x65 + (len % 5);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user