Pyramid driver:

- Convert set_char to 8 byte bitmap.
- Reset ccmode on clear. Add a custom character cache to avoid unnecessary
  updates of custom characters because of the reset.
- Add support for bignum.
- Remove the FB_modified flag, it did never work. Instead add a backing store
  buffer to compare against. Remove the 40ms block of updates, this was a
  no-op as well. However, pause 40ms after sending a complete screen update.
  The display I have requires this to recognize the following cursor updates.
- Do not treat frame buffer as string. Always use memcpy, memcmp, and memset.
- Remove the changelog. This should be read from SCM.
- Remove contact info as T. Riewe has left Pyramid.
- Pass through indent, preserving 4 space indention.
This commit is contained in:
mmdolze
2011-02-13 17:50:29 +00:00
parent dfd486c55b
commit 4d73e6660c
4 changed files with 577 additions and 718 deletions
+1
View File
@@ -21,6 +21,7 @@ v.0.5dev (ongoing development)
* Pyramid: Only send LED state changes, doxygen-ize
* sed1520: Make it work with 68-family style interface, convert to 0.5 API
* hd44780/imon: Add charmap for NEC uPD16314 and make it configurable
* Pyramid: Convert set_char to 8 byte bitmap, add support for bignum
v0.5.4
* Update driver includes and LDFLAGS (fixed glk and bayrad binding error)
+1 -1
View File
@@ -60,7 +60,7 @@ MtxOrb_LDADD = libLCD.a libbignum.a
mx5000_LDADD = @LIBMX5000@
NoritakeVFD_LDADD = libbignum.a
picolcd_LDADD = @LIBUSB_LIBS@ libLCD.a libbignum.a
pyramid_LDADD = libLCD.a
pyramid_LDADD = libLCD.a libbignum.a
serialPOS_LDADD = libbignum.a
serialVFD_LDADD = libLCD.a libbignum.a
shuttleVFD_LDADD = @LIBUSB_LIBS@
+528 -662
View File
File diff suppressed because it is too large Load Diff
+47 -55
View File
@@ -1,47 +1,40 @@
/* pylcd.h */
/*
This is the header file of the LCDproc driver for
the "pyramid" LCD device from Pyramid.
Copyright (C) 2005 Silvan Marco Fin <silvan@kernelconcepts.de>
Copyright (C) 2006 coresystems GmbH <info@coresystems.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
/** \file server/drivers/pylcd.h
* This is the header file of the LCDproc driver for the "pyramid" LCD device
* from Pyramid.
*/
/*-
* Copyright (C) 2005 Silvan Marco Fin <silvan@kernelconcepts.de>
* 2006 coresystems GmbH <info@coresystems.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
*/
#ifndef PYLCD_H
#define PYLCD_H
#include "lcd.h"
#define MAXCOUNT 10 /* Size of read buffer including NUL */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#define MAXCOUNT 10 /* Including terminating NUL */
/* Display properties */
#define WIDTH 16
#define HEIGHT 2
#define SCREEN_SIZE (WIDTH * HEIGHT)
#define CUSTOMCHARS 8
#define CELLHEIGHT 8
#define CELLWIDTH 5
/** private data for the \c pyramid driver */
typedef struct pyramid_private_data {
/* device io */
@@ -58,14 +51,14 @@ typedef struct pyramid_private_data {
int cellheight;
/* output handling */
char framebuffer[WIDTH*HEIGHT+2];
int FB_modified;
CGmode custom;
char framebuffer[SCREEN_SIZE];
char backingstore[SCREEN_SIZE];
CGmode ccmode;
unsigned char cc_cache[CUSTOMCHARS][CELLHEIGHT];
/* button handling */
char last_key_pressed[6];
unsigned long long last_key_time;
unsigned long long last_buf_time;
/* cursor handling */
int C_x;
@@ -77,25 +70,24 @@ typedef struct pyramid_private_data {
} PrivateData;
MODULE_EXPORT int pyramid_init (Driver *drvthis);
MODULE_EXPORT void pyramid_close (Driver *drvthis);
MODULE_EXPORT int pyramid_width (Driver *drvthis);
MODULE_EXPORT int pyramid_height (Driver *drvthis);
MODULE_EXPORT int pyramid_cellwidth (Driver *drvthis);
MODULE_EXPORT int pyramid_cellheight (Driver *drvthis);
MODULE_EXPORT void pyramid_clear (Driver *drvthis);
MODULE_EXPORT void pyramid_flush (Driver *drvthis);
MODULE_EXPORT void pyramid_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void pyramid_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void pyramid_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
MODULE_EXPORT void pyramid_hbar (Driver *drvthis, int x, int y, int len, int promille, int options);
MODULE_EXPORT int pyramid_icon (Driver *drvthis, int x, int y, int icon);
MODULE_EXPORT void pyramid_cursor (Driver *drvthis, int x, int y, int state);
MODULE_EXPORT int pyramid_get_free_chars (Driver *drvthis);
MODULE_EXPORT void pyramid_set_char (Driver *drvthis, int n, char *dat);
MODULE_EXPORT void pyramid_output (Driver *drvthis, int state);
MODULE_EXPORT const char * pyramid_get_key (Driver *drvthis);
MODULE_EXPORT const char * pyramid_get_info (Driver *drvthis);
MODULE_EXPORT int pyramid_init(Driver *drvthis);
MODULE_EXPORT void pyramid_close(Driver *drvthis);
MODULE_EXPORT int pyramid_width(Driver *drvthis);
MODULE_EXPORT int pyramid_height(Driver *drvthis);
MODULE_EXPORT int pyramid_cellwidth(Driver *drvthis);
MODULE_EXPORT int pyramid_cellheight(Driver *drvthis);
MODULE_EXPORT void pyramid_clear(Driver *drvthis);
MODULE_EXPORT void pyramid_flush(Driver *drvthis);
MODULE_EXPORT void pyramid_string(Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void pyramid_chr(Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void pyramid_vbar(Driver *drvthis, int x, int y, int len, int promille, int options);
MODULE_EXPORT void pyramid_hbar(Driver *drvthis, int x, int y, int len, int promille, int options);
MODULE_EXPORT int pyramid_icon(Driver *drvthis, int x, int y, int icon);
MODULE_EXPORT void pyramid_cursor(Driver *drvthis, int x, int y, int state);
MODULE_EXPORT int pyramid_get_free_chars(Driver *drvthis);
MODULE_EXPORT void pyramid_set_char(Driver *drvthis, int n, unsigned char *dat);
MODULE_EXPORT void pyramid_output(Driver *drvthis, int state);
MODULE_EXPORT const char *pyramid_get_key(Driver *drvthis);
MODULE_EXPORT const char *pyramid_get_info(Driver *drvthis);
#endif