Updated sed1520.c driver:

* Lots of control-Ms in the file!  Removed.
* Removed all reference to lcd.* in favor of sed1520->*

Compiles cleanly; field testing required.
This commit is contained in:
ddouthitt
2001-09-25 16:58:18 +00:00
parent 226ec0c7b2
commit 02233ef172
+17 -17
View File
@@ -123,7 +123,7 @@ drawchar2fb (int x, int y, unsigned char z)
(((fontmap[(int) z][j] * 2) & (1 << i)) / (1 << i)) * (((fontmap[(int) z][j] * 2) & (1 << i)) / (1 << i)) *
(1 << j); (1 << j);
} }
lcd.framebuf[(y * 122) + (x * 6) + (6 - i)] = k; sed1520->framebuf[(y * 122) + (x * 6) + (6 - i)] = k;
} }
} }
@@ -233,7 +233,7 @@ sed1520_init (struct lcd_logical_driver *driver, char *args)
memset (driver->framebuf, 0, 122 * 4); memset (driver->framebuf, 0, 122 * 4);
driver->cellwid = 6; driver->cellwid = 6;
driver->cellhgt = 8; // FIXME: lcd.cellwid always stays 5 driver->cellhgt = 8; // FIXME: sed1520->cellwid always stays 5
// regardless what it is set to here. This is // regardless what it is set to here. This is
// a bug but not inside this driver. // a bug but not inside this driver.
driver->clear = sed1520_clear; driver->clear = sed1520_clear;
@@ -269,9 +269,9 @@ sed1520_init (struct lcd_logical_driver *driver, char *args)
void void
sed1520_close () sed1520_close ()
{ {
if (lcd.framebuf != NULL) if (sed1520->framebuf != NULL)
free (lcd.framebuf); free (sed1520->framebuf);
lcd.framebuf = NULL; sed1520->framebuf = NULL;
} }
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
@@ -280,7 +280,7 @@ sed1520_close ()
void void
sed1520_clear () sed1520_clear ()
{ {
memset (lcd.framebuf, 0, 488); memset (sed1520->framebuf, 0, 488);
} }
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
@@ -290,7 +290,7 @@ sed1520_clear ()
void void
sed1520_flush () sed1520_flush ()
{ {
lcd.draw_frame (lcd.framebuf); sed1520->draw_frame (sed1520->framebuf);
} }
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
@@ -355,7 +355,7 @@ sed1520_num (int x, int num)
if (*(fontbigdp[(z * 8) + i] + c) == '.') if (*(fontbigdp[(z * 8) + i] + c) == '.')
s += 128; s += 128;
} }
lcd.framebuf[(z * 122) + 122 + (x * 6) + c] = s; sed1520->framebuf[(z * 122) + 122 + (x * 6) + c] = s;
} }
} }
} }
@@ -373,7 +373,7 @@ sed1520_num (int x, int num)
if (*(fontbignum[num][z * 8 + i] + c) == '.') if (*(fontbignum[num][z * 8 + i] + c) == '.')
s += 128; s += 128;
} }
lcd.framebuf[(z * 122) + 122 + (x * 6) + c] ␍= s; sed1520->framebuf[(z * 122) + 122 + (x * 6) + c] = s;
} }
} }
} }
@@ -387,7 +387,7 @@ sed1520_num (int x, int num)
// can be altered. !Important: Characters have to be redraw // can be altered. !Important: Characters have to be redraw
// by drawchar2fb() to show their new shape. Because we use // by drawchar2fb() to show their new shape. Because we use
// a non-standard 6x8 font a *dat not calculated from // a non-standard 6x8 font a *dat not calculated from
// lcd.width and lcd.height will fail. // sed1520->width and sed1520->height will fail.
// //
void void
sed1520_set_char (int n, char *dat) sed1520_set_char (int n, char *dat)
@@ -432,12 +432,12 @@ sed1520_vbar (int x, int len)
k += 1 << (7 - i); k += 1 << (7 - i);
} }
lcd.framebuf[((3 - j) * 122) + (x * 6)] ␍= 0; sed1520->framebuf[((3 - j) * 122) + (x * 6)] = 0;
lcd.framebuf[((3 - j) * 122) + (x * 6) + 1] ␍= 0; sed1520->framebuf[((3 - j) * 122) + (x * 6) + 1] = 0;
lcd.framebuf[((3 - j) * 122) + (x * 6) + 2] ␍= k; sed1520->framebuf[((3 - j) * 122) + (x * 6) + 2] = k;
lcd.framebuf[((3 - j) * 122) + (x * 6) + 3] ␍= k; sed1520->framebuf[((3 - j) * 122) + (x * 6) + 3] = k;
lcd.framebuf[((3 - j) * 122) + (x * 6) + 4] ␍= k; sed1520->framebuf[((3 - j) * 122) + (x * 6) + 4] = k;
lcd.framebuf[((3 - j) * 122) + (x * 6) + 5] ␍= 0; sed1520->framebuf[((3 - j) * 122) + (x * 6) + 5] = 0;
len -= 8; len -= 8;
} }
@@ -459,7 +459,7 @@ sed1520_hbar (int x, int y, int len)
return; return;
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
lcd.framebuf[(y * 122) + (x * 6) + i] = 0x3C; sed1520->framebuf[(y * 122) + (x * 6) + i] = 0x3C;
} }
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////