Port remaining drivers to 0.5 API (icon, hbar, vbar).

This commit is contained in:
mmdolze
2011-02-10 22:48:57 +00:00
parent 361fcb2a51
commit 565a861d91
7 changed files with 320 additions and 400 deletions
+31 -41
View File
@@ -1,38 +1,29 @@
/* This is the header file of the LCDproc driver for
the "LCDM001" device from kernelconcepts.de
Copyright (C) 2001 Rene Wagner <reenoo@gmx.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 */
/* This driver is mostly based on the MtxOrb driver.
See the file MtxOrb.c for copyright details */
/* The heartbeat workaround has been taken from the curses driver
See the file curses_drv.c for copyright details */
/**
* This is the header file of the LCDproc driver for the "LCDM001" device from
* kernelconcepts.de
*/
/*-
* Copyright (C) 2001 Rene Wagner <reenoo@gmx.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 LCDM001_H
#define LCDM001_H
/********************************************************************
lcdm001.h
******************************************************************/
/* REMOVE: I don't thing this is actualy needed. */
/* extern lcd_logical_driver *lcdm001; */
MODULE_EXPORT int lcdm001_init (Driver *drvthis);
MODULE_EXPORT void lcdm001_close (Driver *drvthis);
MODULE_EXPORT int lcdm001_width (Driver *drvthis);
@@ -42,24 +33,23 @@ MODULE_EXPORT void lcdm001_flush (Driver *drvthis);
MODULE_EXPORT void lcdm001_string (Driver *drvthis, int x, int y, const char string[]);
MODULE_EXPORT void lcdm001_chr (Driver *drvthis, int x, int y, char c);
MODULE_EXPORT void lcdm001_old_vbar (Driver *drvthis, int x, int len);
MODULE_EXPORT void lcdm001_old_hbar (Driver *drvthis, int x, int y, int len);
MODULE_EXPORT void lcdm001_vbar (Driver *drvthis, int x, int y, int len, int promille, int options);
MODULE_EXPORT void lcdm001_hbar (Driver *drvthis, int x, int y, int len, int promille, int options);
MODULE_EXPORT void lcdm001_num (Driver *drvthis, int x, int num);
MODULE_EXPORT void lcdm001_old_icon (Driver *drvthis, int which, char dest);
MODULE_EXPORT int lcdm001_icon (Driver *drvthis, int x, int y, int icon);
MODULE_EXPORT void lcdm001_output (Driver *drvthis, int on);
MODULE_EXPORT char lcdm001_getkey (Driver *drvthis);
#define DEFAULT_DEVICE "/dev/lcd"
#define DEFAULT_CURSORBLINK 0
#define DEFAULT_CURSORBLINK 0 /* cursor blinking off */
/*Heartbeat workaround
set chars to be displayed instead of "normal" icons*/
#define OPEN_HEART ' ' /* This combination is at least visible */
#define FILLED_HEART '*'
#define PAD 255
/*
* Use our own chars for the heartbeat instead of core's default. This
* combination is at least visible.
*/
#define LCDM001_OPEN_HEART ' '
#define LCDM001_FILLED_HEART '*'
#define LEFT_KEY '1'
#define RIGHT_KEY '2'