From 713dd4045fdc6312cb80a4aee9b17a3dd5cc1368 Mon Sep 17 00:00:00 2001 From: reinelt Date: Fri, 10 Mar 2000 17:36:02 +0000 Subject: [lcd4linux @ 2000-03-10 17:36:02 by reinelt] first unstable but running release git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@9 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- display.c | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) (limited to 'display.c') diff --git a/display.c b/display.c index 902f514..e3f6aee 100644 --- a/display.c +++ b/display.c @@ -1,4 +1,4 @@ -/* $Id: display.c,v 1.3 2000/03/10 10:49:53 reinelt Exp $ +/* $Id: display.c,v 1.4 2000/03/10 17:36:02 reinelt Exp $ * * framework for device drivers * @@ -20,6 +20,10 @@ * * * $Log: display.c,v $ + * Revision 1.4 2000/03/10 17:36:02 reinelt + * + * first unstable but running release + * * Revision 1.3 2000/03/10 10:49:53 reinelt * * MatrixOrbital driver finished @@ -28,13 +32,35 @@ * * minor cleanups * + */ + +/* + * exported functions: + * + * lcd_init (char *display) + * initializes the named driver + * + * lcd_query (int *rows, int *cols, int *xres, int *yres, int *bars) + * queries the attributes of the selected driver + * + * lcd_clear () + * clears the display + * + * int lcd_put (int row, int col, char *text) + * writes text at row, col + * + * int lcd_bar (int type, int row, int col, int max, int len1, int len2) + * draws a specified bar at row, col with len + * + * int lcd_flush (void) + * flushes the framebuffer to the display * */ #include #include -#include "config.h" +#include "cfg.h" #include "display.h" extern DISPLAY MatrixOrbital[]; @@ -62,6 +88,20 @@ int lcd_init (char *display) return -1; } +int lcd_query (int *rows, int *cols, int *xres, int *yres, int *bars) +{ + if (Display==NULL) + return -1; + + *rows=Display->rows; + *cols=Display->cols; + *xres=Display->xres; + *yres=Display->yres; + *bars=Display->bars; + + return 0; +} + int lcd_clear (void) { return Display->clear(); -- cgit v1.2.3