-/*
+/* $Id: Crystalfontz.c,v 1.3 2000/06/04 21:43:50 herp Exp $
+ *
* driver for display modules from Crystalfontz
*
* Copyright 2000 by Herbert Rosmanith (herp@wildsau.idv.uni-linz.ac.at)
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
+ * $Log: Crystalfontz.c,v $
+ * Revision 1.3 2000/06/04 21:43:50 herp
+ * minor bugfix (zero length)
+ *
+ *
*/
#include <stdio.h>
static void blacken(int bitfrom,int len,int pos,int startbyte,int endbyte) {
+ if (len<1) return;
if (startbyte==endbyte)
Barbuf[pos] |=
(p1[bitfrom%XRES] & p2[1+((bitfrom+len-1)%XRES)]);
n=endbyte-startbyte-1;
if (n>0) memset(Barbuf+pos+1,0x3f,n);
Barbuf[pos+n+1] |= p2[1+((bitfrom+len-1)%XRES)];
-
}
}
static void whiten(int bitfrom,int len,int pos,int startbyte,int endbyte) {
+ if (len<1) return;
if (startbyte==endbyte)
Barbuf[pos] &=
(p2[bitfrom%XRES] | p1[1+((bitfrom+len-1)%XRES)]);