Big cleanup: Remove trailing whitespace from files (except those imported

from external sources).
This commit is contained in:
mmdolze
2010-10-30 18:04:21 +00:00
parent 49cd060374
commit fd9b2ce713
113 changed files with 856 additions and 856 deletions
+4 -4
View File
@@ -1,5 +1,5 @@
This is the CREDITS file that should list all people that are or have
been involved in LCDproc.
been involved in LCDproc.
Please help us keeping this file up to date. Developers, please insert
your name and a short description of your activities. Other people
@@ -16,7 +16,7 @@ William Ferrell (Choadstre) <willfe@yahoo.com>:
for V0.4, continued maintenance
It's Choadstre's fault that LCDproc exists. He wanted his computer to have
a heartbeat, like some HP workstations do. So he found a nice LCD, wrote
some amazingly spiffy software for it, and life was good.
some amazingly spiffy software for it, and life was good.
Scott Scriven (ToyKeeper) <http://toykeeper.net/>:
- wrote V0.3 and most of V0.4, and helped procrastinate the rest
@@ -40,7 +40,7 @@ Benjamin Tse <blt@Comports.com>, Matthias Prinke <m.prinke@trashcan.mcnet.de>:
- HD44780 driver and predecessors
Richard Rognlie <rrognlie@gamerz.net>:
- Work on HD44780 driver
- Work on HD44780 driver
- GIF driver (lost code)
Tom Wheeley:
@@ -134,7 +134,7 @@ Joris Robijn:
- SED1330 driver
Guillaume Filion:
- Portability bug fixes on the curses, HD44780, SED1520 and
- Portability bug fixes on the curses, HD44780, SED1520 and
STV5730 drivers.
- Partially implemented Thomas Runge's BSD port of lcdproc.
- Ported the parallel functions in port.h to BSD.
+13 -13
View File
@@ -12,7 +12,7 @@ rest of the file. 8)
First read the README if you haven't already.
Please take a few minutes to read the user guide located at
Please take a few minutes to read the user guide located at
http://lcdproc.sourceforge.net/docs/
For the details on supported platforms, see the PLATFORM SPECIFIC section
@@ -20,7 +20,7 @@ of this file.
In order to compile LCDproc, you'll need the following programs:
* An ANSI C compiler, we recommend GCC. Most Linux or BSD systems come
* An ANSI C compiler, we recommend GCC. Most Linux or BSD systems come
with GCC.
* GNU Make. It is available for all major distributions. If you want to
@@ -120,29 +120,29 @@ And read the available options, especially --enable-drivers
Run make to build the server and all clients
make
If you only want to compile the clients, you can omit to compile the
If you only want to compile the clients, you can omit to compile the
server:
cd shared
make
cd ../clients
make
Similarly, if you only want to compile the server, you can omit to
Similarly, if you only want to compile the server, you can omit to
compile the clients:
cd shared
make
cd ../server
make
Depending on your system, LCDproc will build in a few seconds to a
few minutes. It's not very big.
Depending on your system, LCDproc will build in a few seconds to a
few minutes. It's not very big.
If you want to, you can install it (if you're root) by typing:
make install
This will install the binaries and the man pages in the directory you
specified in configure.
You may have to copy the configuration file (LCDd.conf) to /etc
You may have to copy the configuration file (LCDd.conf) to /etc
(or /usr/local/etc) manually.
@@ -198,21 +198,21 @@ Nothing special to say, everything should go well.
You may not be able to compile all drivers on something else than i386
if your linux installation does not have ioperm, inb and outb commands.
./configure should leave all drivers that need those functions out
./configure should leave all drivers that need those functions out
(drivers for parallel port displays), so that LCDd should compile anyway.
--- NetBSD ---
You need to use GNU Make instead of NetBSD's make.
You need to use GNU Make instead of NetBSD's make.
Remember to type gmake instead of make to compile LCDproc.
The server will probably only compile on NetBSD/i386.
If you try to run LCDd and you get this error:
Bus error (core dumped)
It is likely that you did not have the right permission to access the ports.
It is likely that you did not have the right permission to access the ports.
Try starting the program as root.
--- OpenBSD ---
You need to use GNU Make instead of OpenBSD's make.
You need to use GNU Make instead of OpenBSD's make.
Remember to type gmake instead of make to compile LCDproc.
The server will probably only compile on OpenBSD/i386.
@@ -246,7 +246,7 @@ Note that you cannot use more than one display driver at the same time.
For security reasons, LCDd by default only accepts connections from
localhost (127.0.0.1), it will not accept connections from other computers on
your network / the Internet. You can change this behaviour in the
your network / the Internet. You can change this behaviour in the
configuration file.
--- Starting the client(s) ---
@@ -295,7 +295,7 @@ Debian: (the hard way)
Debian: (the easy way)
- Install the previously created .deb package (as root)
dpkg -i lcdproc_VERSION-RELEASE_ARCH.deb
dpkg -i lcdproc_VERSION-RELEASE_ARCH.deb
Redhat / Mandrake:
- Copy the scripts:
+10 -10
View File
@@ -1,7 +1,7 @@
# LCDd.conf -- configuration file for the LCDproc server daemon LCDd
#
# This file contains the configuration for the LCDd server.
#
#
# The format is ini-file-like. It is divided into sections that start at
# markers that look like [section]. Comments are all line-based comments,
# and are lines that start with '#' or ';'.
@@ -44,7 +44,7 @@ DriverPath=server/drivers/
# driver specific section.
#
# The following drivers are supported:
# bayrad, CFontz, CFontz633, CFontzPacket, curses, CwLnx, ea65,
# bayrad, CFontz, CFontz633, CFontzPacket, curses, CwLnx, ea65,
# EyeboxOne, g15, glcdlib, glk, hd44780, icp_a106, imon, imonlcd, IOWarrior,
# irman, joy, lb216, lcdm001, lcterm, lirc, lis, MD8800, ms6931, mtc_s16209x,
# MtxOrb, mx5000, NoritakeVFD, picolcd, pyramid, sed1330, sed1520, serialPOS,
@@ -395,7 +395,7 @@ UseFT2=yes
# text resolution in fixed width characters [default: 16x4]
# (if it won't fit according to available physical pixel resolutioni
# and the minimum available font face size in pixels, then
# and the minimum available font face size in pixels, then
# 'DebugBorder' will automatically be turned on)
TextResolution=20x4
@@ -495,7 +495,7 @@ Size=20x4
#LineAddress=0x10
# Character map to to map ISO-8859-1 to the LCD's character set
# [default: hd44780_default; legal: hd44780_default, hd44780_euro,
# [default: hd44780_default; legal: hd44780_default, hd44780_euro,
# ea_ks0073, sed1278f_0b, hd44780_koi8_r ]
CharMap=hd44780_default
@@ -846,9 +846,9 @@ Reboot=no
## Mini-box.com picoLCD (usblcd) driver ##
[picolcd]
# KeyTimeout is the time that LCDd spends waiting for a key press before cycling
# through other duties. Higher values make LCDd use less CPU time and make
# key presses more detectable. Lower values make LCDd more responsive but a
# KeyTimeout is the time that LCDd spends waiting for a key press before cycling
# through other duties. Higher values make LCDd use less CPU time and make
# key presses more detectable. Lower values make LCDd more responsive but a
# little prone to missing key presses. 500 (.5 second) is the default and a
# balanced value.
KeyTimeout=500
@@ -863,8 +863,8 @@ Contrast=1000
Keylights=on
# If Keylights is on, the you can unlight specific keys below:
# Key0 is the directional pad. Key1 - Key5 correspond to the F1 - F5 keys.
# There is no LED for the +/- keys. This is a handy way to indicate to users
# Key0 is the directional pad. Key1 - Key5 correspond to the F1 - F5 keys.
# There is no LED for the +/- keys. This is a handy way to indicate to users
# which keys are disabled. [default: on; legal: on, off]
Key0Light=on
Key1Light=on
@@ -1011,7 +1011,7 @@ Device=/dev/ttyUSB0
# Edition level of the device (can be 1, 2 or 3) [default: 2]
#Edition=1
# set display size
# set display size
# Note: The size can be obtained directly from device for edition 2 & 3.
#Size=16x2
+4 -4
View File
@@ -16,12 +16,12 @@ dist-hook:
## convenience targets
.PHONY: $(SUBDIRS) install-server install-clients
.PHONY: $(SUBDIRS) install-server install-clients
$(SUBDIRS):
$(MAKE) -C $@
clients server: shared
clients server: shared
install-server: server
$(MAKE) -C server install
@@ -52,4 +52,4 @@ topleveltags:
$(CTAGS) --format=1 -f - --languages=C --c-kinds=f --recurse=yes server shared clients \
| perl -p -e 's/^([^\t]+)\t[^\t]+\/([^\t\/]+)\t(.*)$/$1\t$2\t$3/' > tags
## EOF
## EOF
+1 -1
View File
@@ -33,7 +33,7 @@ instructions (including how to connect the LCD to your system).
-- CHANGES -------------------------------------------------------------------
Woow... a lot. :)
Woow... a lot. :)
See the ChangeLog file for more details.
-- HELPING OUT ---------------------------------------------------------------
+5 -5
View File
@@ -40,7 +40,7 @@ for driver in $drivers ; do
*)
selectdrivers=["$selectdrivers $driver "]
;;
esac
esac
done
dnl check for wanted drivers and their dependencies
@@ -249,7 +249,7 @@ dnl else
irtrans)
DRIVERS="$DRIVERS irtrans${SO}"
actdrivers=["$actdrivers irtrans"]
;;
;;
joy)
AC_CHECK_HEADER(linux/joystick.h, [
DRIVERS="$DRIVERS joy${SO}"
@@ -353,7 +353,7 @@ dnl else
else
AC_MSG_WARN([The picolcd driver needs the libusb library.])
fi
;;
;;
pyramid)
DRIVERS="$DRIVERS pyramid${SO}"
actdrivers=["$actdrivers pyramid"]
@@ -474,7 +474,7 @@ AC_MSG_RESULT([---------------------------------------])
AC_MSG_RESULT([LCDd will be compiled with the drivers:])
for driver in $actdrivers; do
AC_MSG_RESULT([ - $driver])
done
done
AC_MSG_RESULT([---------------------------------------])
AC_SUBST(LIBCURSES)
@@ -554,7 +554,7 @@ AC_DEFUN([AC_GET_FS_INFO], [
AC_CHECK_HEADERS(fcntl.h sys/dustat.h sys/param.h sys/statfs.h sys/fstyp.h)
AC_CHECK_HEADERS(mnttab.h mntent.h utime.h sys/statvfs.h sys/vfs.h)
AC_CHECK_HEADERS(sys/filsys.h sys/fs_types.h)
AC_CHECK_HEADERS(sys/mount.h, [], [],
AC_CHECK_HEADERS(sys/mount.h, [], [],
[#if HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
+2 -2
View File
@@ -73,7 +73,7 @@ if ($opt{V}) {
exit(0);
}
# check number of arguments
# check number of arguments
usage(1) if ($#ARGV >= 0);
@@ -197,7 +197,7 @@ my $status = shift;
}
else {
print STDERR "For help, type: $progname -h\n";
}
}
exit($status);
}
+6 -6
View File
@@ -50,9 +50,9 @@ my $PORT = "13666";
my $PING = "ping";
# list of hosts to be ping'ed
my @MACHINES = ("lcdproc.omnipotent.net",
my @MACHINES = ("lcdproc.omnipotent.net",
"www.linux.org",
"www.daemonnews.org",
"www.daemonnews.org",
"127.0.0.1",
"seurat",
"rodin",
@@ -86,7 +86,7 @@ if ($opt{V}) {
exit(0);
}
# check number of arguments
# check number of arguments
#usage(1) if ($#ARGV >= 0);
# set variables
@@ -152,7 +152,7 @@ while (1) {
`$PING -c 1 $machine`;
$pingstatus{$machine} = ($?) ? 0 : 1;
}
# count reachablei (up) machines
@list = grep { $pingstatus{$_} == 1 } @MACHINES;
print $remote "widget_set pings one 1 2 {Machines Up: ",scalar(@list),"}\n";
@@ -201,7 +201,7 @@ my $status = shift;
}
else {
print STDERR "For help, type: $progname -h\n";
}
}
exit($status);
}
@@ -232,7 +232,7 @@ B<iosock.pl>
B<iosock.pl> is a small example client for LCDd, the lcdproc server.
It tries to ping the servers given as parameters and displays on the LCD
whether they are reachable or not.
whether they are reachable or not.
If no hosts are given as parameters a built-in list of default machines will be checked.
=head1 OPTIONS
+9 -9
View File
@@ -60,7 +60,7 @@ more-than-2-line (typically 4-line) displays.
how long to keep this client running (default is 5 seconds).
-v <verbosity>
set logging verbosity level to <verbosity>.
set logging verbosity level to <verbosity>.
-V
display the present version number of lcdident.
@@ -91,17 +91,17 @@ Perl 5.004;
=head1 DISCLAMER
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
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
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.,
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
=head1 SEE ALSO
@@ -262,7 +262,7 @@ while(defined(my $input = <$remote>)) { }
# all done
grace();
# send a SIGINT or SIGTERM to exit nicely.
# To be called on exit and on SIGINT or SIGTERM.
@@ -283,7 +283,7 @@ my $status = shift;
print STDERR " where <options> are\n" .
" -s <server> connect to <server> (default: $server)\n" .
" -p <port> connect to <port> on <server> (default: $port)\n" .
" -t <seconds> how long to hold the client screen up (default: $waittime seconds).\n" .
" -t <seconds> how long to hold the client screen up (default: $waittime seconds).\n" .
" -v <verbosity> verbosity level (default: $verbose, max verbosity: 5)\n" .
" -h show this help page\n" .
" -V display version number\n";
+7 -7
View File
@@ -80,7 +80,7 @@ if ($opt{V}) {
exit(0);
}
# check number of arguments
# check number of arguments
usage(1) if ($#ARGV != 0);
@@ -114,11 +114,11 @@ my $lcdresponse = <$remote>;
# get width & height from server's greet message
if ($lcdresponse =~ /\bwid\s+(\d+)\b/) {
$width = 0 + $1;
}
}
if ($lcdresponse =~ /\bhgt\s+(\d+)\b/) {
$lines = (0 + $1) - 1;
$top = $lines;
}
}
# Turn off blocking mode...
fcntl($remote, F_SETFL, O_NONBLOCK);
@@ -170,13 +170,13 @@ while (1) {
if ($key eq 'Down') {
$top-- if ($top > $lines);
}
elsif ($key eq 'Up') {
elsif ($key eq 'Up') {
$top++;
}
elsif ($key eq 'Right') {
$left++;
}
elsif ($key eq 'Left') {
elsif ($key eq 'Left') {
$left-- if ($left > 1);
}
}
@@ -205,7 +205,7 @@ while (1) {
use integer; # calculate integers like in C
my $w = 8 + 8 * ($idx / 8) - $idx;
my $subst = " " x $w;
$line =~ s/\t/" " x $w/e;
}
@@ -266,7 +266,7 @@ my $status = shift;
}
else {
print STDERR "For help, type: $progname -h\n";
}
}
exit($status);
}
+4 -4
View File
@@ -100,7 +100,7 @@ if ($opt{V}) {
exit(0);
}
# check number of arguments
# check number of arguments
usage(1) if ($#ARGV >= 0);
@@ -207,7 +207,7 @@ while(1) {
# To be called on exit and on SIGINT or SIGTERM.
sub grace() {
print "Exiting...\n" if ($verbose >= 5);
# release keys
print $remote "client_del_key Left\n";
$lcdresponse = <$remote>;
@@ -215,7 +215,7 @@ sub grace() {
$lcdresponse = <$remote>;
print $remote "client_del_key Enter\n";
$lcdresponse = <$remote>;
# close socket
close($remote);
exit;
@@ -252,7 +252,7 @@ my $status = shift;
}
else {
print STDERR "For help, type: $progname -h\n";
}
}
exit($status);
}
+1 -1
View File
@@ -1,4 +1,4 @@
# lcdexec LCDproc client configuration file
# lcdexec LCDproc client configuration file
## general options for lcdexec ##
[lcdexec]
+16 -16
View File
@@ -281,7 +281,7 @@ int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock)
if (sock_printf(sock, "menu_set_item \"%s\" \"%d\" -menu_result quit\n",
parent_id, me->id) < 0)
return -1;
}
}
else {
if ((parent != NULL) && (me->id != 0)) {
if (sock_printf(sock, "menu_add_item \"%s\" \"%d\" menu \"%s\"\n",
@@ -293,14 +293,14 @@ int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock)
for (entry = me->children; entry != NULL; entry = entry->next) {
if (menu_sock_send(entry, me, sock) < 0)
return -1;
}
}
}
}
break;
case MT_ARG_SLIDER:
if (sock_printf(sock, "menu_add_item \"%s\" \"%d\" slider -text \"%s\""
" -value %d -minvalue %d -maxvalue %d"
" -mintext \"%s\" -maxtext \"%s\" -stepsize %d\n",
parent_id, me->id, me->displayname,
parent_id, me->id, me->displayname,
me->data.slider.value,
me->data.slider.minval,
me->data.slider.maxval,
@@ -313,7 +313,7 @@ int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock)
if (sock_printf(sock, "menu_set_item \"%s\" \"%d\" -next _quit_\n",
parent_id, me->id) < 0)
return -1;
}
}
break;
case MT_ARG_RING:
{
@@ -331,7 +331,7 @@ int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock)
if (sock_printf(sock, "menu_add_item \"%s\" \"%d\" ring -text \"%s\""
" -value %d -strings \"%s\"\n",
parent_id, me->id, me->displayname,
parent_id, me->id, me->displayname,
me->data.ring.value,
tmp) < 0)
return -1;
@@ -341,12 +341,12 @@ int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock)
if (sock_printf(sock, "menu_set_item \"%s\" \"%d\" -next _quit_\n",
parent_id, me->id) < 0)
return -1;
}
}
break;
case MT_ARG_NUMERIC:
if (sock_printf(sock, "menu_add_item \"%s\" \"%d\" numeric -text \"%s\""
" -value %d -minvalue %d -maxvalue %d\n",
parent_id, me->id, me->displayname,
parent_id, me->id, me->displayname,
me->data.numeric.value,
me->data.numeric.minval,
me->data.numeric.maxval) < 0)
@@ -356,14 +356,14 @@ int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock)
if (sock_printf(sock, "menu_set_item \"%s\" \"%d\" -next _quit_\n",
parent_id, me->id) < 0)
return -1;
}
}
break;
case MT_ARG_ALPHA:
if (sock_printf(sock, "menu_add_item \"%s\" \"%d\" alpha -text \"%s\""
" -value \"%s\" -minlength %d -maxlength %d"
" -allow_caps false -allow_noncaps false"
" -allow_numbers false -allowed_extra \"%s\"\n",
parent_id, me->id, me->displayname,
parent_id, me->id, me->displayname,
me->data.alpha.value,
me->data.alpha.minlen,
me->data.alpha.maxlen,
@@ -374,12 +374,12 @@ int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock)
if (sock_printf(sock, "menu_set_item \"%s\" \"%d\" -next _quit_\n",
parent_id, me->id) < 0)
return -1;
}
}
break;
case MT_ARG_IP:
if (sock_printf(sock, "menu_add_item \"%s\" \"%d\" ip -text \"%s\""
" -value \"%s\" -v6 %s\n",
parent_id, me->id, me->displayname,
parent_id, me->id, me->displayname,
me->data.ip.value,
boolValueName[me->data.ip.v6]) < 0)
return -1;
@@ -388,12 +388,12 @@ int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock)
if (sock_printf(sock, "menu_set_item \"%s\" \"%d\" -next _quit_\n",
parent_id, me->id) < 0)
return -1;
}
}
break;
case MT_ARG_CHECKBOX:
if (sock_printf(sock, "menu_add_item \"%s\" \"%d\" checkbox -text \"%s\""
" -value %s -allow_gray %s\n",
parent_id, me->id, me->displayname,
parent_id, me->id, me->displayname,
triGrayValueName[me->data.checkbox.value],
boolValueName[me->data.checkbox.allow_gray]) < 0)
return -1;
@@ -402,7 +402,7 @@ int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock)
if (sock_printf(sock, "menu_set_item \"%s\" \"%d\" -next _quit_\n",
parent_id, me->id) < 0)
return -1;
}
}
break;
case MT_ARG_ACTION | MT_AUTOMATIC:
if (sock_printf(sock, "menu_add_item \"%s\" \"%d\" action \"%s\"\n",
@@ -515,7 +515,7 @@ void menu_free(MenuEntry *me)
free(me->data.checkbox.map[i]);
me->data.checkbox.map[i] = NULL;
}
}
}
default:
break;
}
+12 -12
View File
@@ -155,7 +155,7 @@ int machine_get_battstat(int *acstat, int *battflag, int *percent)
*percent = (int)((double)curCapacity/(double)maxCapacity * 100);
/* There is a way to check this through the IOKit,
but I am not sure what gets returned for kIOPSLowWarnLevelKey and kIOPSDeadWarnLevelKey,
but I am not sure what gets returned for kIOPSLowWarnLevelKey and kIOPSDeadWarnLevelKey,
and this is easier.
*/
if (*battflag == LCDP_BATT_UNKNOWN) {
@@ -314,20 +314,20 @@ int machine_get_meminfo(meminfo_type *result)
int machine_get_procs(LinkedList *procs)
{
struct kinfo_proc *kprocs;
procinfo_type *p;
int nproc, i;
int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_ALL, 0 };
size_t size = 0;
/* Call sysctl with a NULL buffer as a dry run. */
/* Call sysctl with a NULL buffer as a dry run. */
if ( sysctl(mib, 4, NULL, &size, NULL, 0 ) < 0)
{
perror("Failure calling sysctl");
return FALSE;
}
/* Allocate a buffer based on previous results of sysctl. */
/* Allocate a buffer based on previous results of sysctl. */
kprocs = (struct kinfo_proc *)alloca(size);
if (kprocs == NULL)
{
@@ -341,7 +341,7 @@ int machine_get_procs(LinkedList *procs)
return FALSE;
}
nproc = size / sizeof(struct kinfo_proc);
nproc = size / sizeof(struct kinfo_proc);
for (i = 0; i < nproc; i++, kprocs++)
{
@@ -380,7 +380,7 @@ int machine_get_procs(LinkedList *procs)
} else {
/* This error pops up very often because of Mac OS X security fixes.
It might pop up all of the time on an intel Mac.
Basically, we cannot get many tasks unless we are root.
Basically, we cannot get many tasks unless we are root.
perror("task_for_pid");
printf("process: %s, owner:%d\n", kprocs->kp_proc.p_comm, kprocs->kp_eproc.e_pcred.p_ruid); */
p->totl = 0;
@@ -420,7 +420,7 @@ int machine_get_smpload(load_type *result, int *numcpus)
}
return(TRUE);
}
}
int machine_get_uptime(double *up, double *idle)
{
@@ -449,7 +449,7 @@ int machine_get_uptime(double *up, double *idle)
}
static int swapmode(int *rettotal, int *retfree)
{
{
#ifdef VM_SWAPUSAGE
size_t size;
struct xsw_usage xsu;
@@ -471,7 +471,7 @@ static int swapmode(int *rettotal, int *retfree)
*rettotal = (xsu.xsu_total/1024);
*retfree = ((xsu.xsu_total-xsu.xsu_used)/1024);
return(TRUE);
return(TRUE);
#endif
*rettotal = 0;
@@ -487,16 +487,16 @@ int machine_get_iface_stats (IfaceInfo *interface)
int name[6] = {CTL_NET, PF_LINK, NETLINK_GENERIC, IFMIB_SYSTEM, IFMIB_IFCOUNT};
size_t len;
struct ifmibdata ifmd; /* ifmibdata contains the network statistics */
len = sizeof(rows);
/* get number of interfaces */
if (sysctl(name, 5, &rows, &len, 0, 0) == 0) {
interface->status = down; /* set status down by default */
name[3] = IFMIB_IFDATA;
name[4] = 0;
name[5] = IFDATA_GENERAL;
len = sizeof(ifmd);
/* walk through all interfaces in the ifmib table from last to first */
for ( ; rows > 0; rows--) {
+7 -7
View File
@@ -332,7 +332,7 @@ int machine_get_procs(LinkedList *procs)
kvm_close(kvmd);
return(FALSE);
}
#if (__FreeBSD_version > 500000)
#if (__FreeBSD_version > 500000)
strncpy(p->name, kprocs->ki_comm, 15);
#else
strncpy(p->name, kprocs->kp_proc.p_comm, 15);
@@ -341,10 +341,10 @@ int machine_get_procs(LinkedList *procs)
#if (__FreeBSD_version > 500000)
p->totl = kprocs->ki_size / 1024;
p->number = kprocs->ki_pid;
#else
#else
p->totl = kprocs->kp_eproc.e_vm.vm_map.size / 1024;
p->number = kprocs->kp_proc.p_pid;
#endif
#endif
LL_Push(procs, (void *)p);
kprocs++;
@@ -387,7 +387,7 @@ int machine_get_smpload(load_type *result, int *numcpus)
if (pcpudata == NULL || pcpudata == (void *) -1)
return(FALSE);
/* extract the data for single CPU */
load.user = (unsigned long) (pcpudata->pc_cp_time[CP_USER]);
load.nice = (unsigned long) (pcpudata->pc_cp_time[CP_NICE]);
@@ -477,10 +477,10 @@ static int swapmode(int *retavail, int *retfree)
}
/*************************************************************************
* Read interface statistics from system and store in the struct
* passed as a pointer. If there are no errors, it returns 1. If errors,
* Read interface statistics from system and store in the struct
* passed as a pointer. If there are no errors, it returns 1. If errors,
* returns 0.
*************************************************************************
*************************************************************************
*/
int machine_get_iface_stats (IfaceInfo *interface)
{
+10 -10
View File
@@ -512,7 +512,7 @@ int machine_get_smpload(load_type *result, int *numcpus)
result[ncpu].nice = curr_load[ncpu].nice - last_load[ncpu].nice;
result[ncpu].system = curr_load[ncpu].system - last_load[ncpu].system;
result[ncpu].idle = curr_load[ncpu].idle - last_load[ncpu].idle;
// struct assignment is legal in C89
last_load[ncpu] = curr_load[ncpu];
@@ -546,10 +546,10 @@ int machine_get_uptime(double *up, double *idle)
/*************************************************************************
* Read interface statistics from system and store in the struct
* passed as a pointer. If there are no errors, it returns 1. If errors,
* Read interface statistics from system and store in the struct
* passed as a pointer. If there are no errors, it returns 1. If errors,
* returns 0.
*************************************************************************
*************************************************************************
*/
int machine_get_iface_stats (IfaceInfo *interface)
{
@@ -564,21 +564,21 @@ int machine_get_iface_stats (IfaceInfo *interface)
/* Skip first 2 header lines of file */
fgets(buffer, sizeof(buffer), file);
fgets(buffer, sizeof(buffer), file);
/* By default, treat interface as down */
interface->status = down;
/* Search iface_name and scan values */
while ((fgets(buffer, sizeof(buffer), file) != NULL)) {
if (strstr(buffer, interface->name)) {
/* interface exists */
interface->status = up; /* is up */
interface->last_online = time(NULL); /* save actual time */
/* search ':' and skip over it */
ch_pointer = strchr(buffer, ':');
ch_pointer++;
/* Now ch_pointer points to values of iface_name */
/* Scan values from here */
sscanf(ch_pointer, "%lf %lf %*s %*s %*s %*s %*s %*s %lf %lf",
@@ -587,8 +587,8 @@ int machine_get_iface_stats (IfaceInfo *interface)
&interface->tr_byte,
&interface->tr_pkt);
/* if is the first time we call this function,
* old values are the same as new so we don't
/* if is the first time we call this function,
* old values are the same as new so we don't
* get big speeds when calculating
*/
if (first_time) {
+1 -1
View File
@@ -4,7 +4,7 @@ sysconf_DATA = lcdvc.conf
bin_PROGRAMS = lcdvc
lcdvc_SOURCES = lcdvc.c lcdvc.h lcd_link.c lcd_link.h vc_link.c vc_link.h
lcdvc_SOURCES = lcdvc.c lcdvc.h lcd_link.c lcd_link.h vc_link.c vc_link.h
lcdvc_LDADD = ../../shared/libLCDstuff.a
+14 -14
View File
@@ -29,7 +29,7 @@ and displays them via LCDproc (http://lcdproc.omnipotent.net/)
=item B<METAR-Code>
The METAR code related of the city you want weather observations.
The METAR code related of the city you want weather observations.
For fun, here are some example METAR codes:
LA : KLAX
@@ -50,18 +50,18 @@ http://www.nws.noaa.gov/oso/oso1/oso12/metar.htm
=item Cannot connect to LCDproc port
By default, lcdMetar tries to connect to localhost port 13666. If you get this
By default, lcdMetar tries to connect to localhost port 13666. If you get this
error, that means that this is not possible to connect to this port. You can change
the port lcdMetar connects to by modifying the script's variables $host and $port.
=item METAR is too short! Something went wrong.
The METAR data we received is not what we expected, check out NOOA's web site
The METAR data we received is not what we expected, check out NOOA's web site
(http://weather.noaa.gov/) to see if something has changed.
=item Can't connect to METAR source
lcdMetar tried to fetch weather observations from NOAA's web site and failed. It
lcdMetar tried to fetch weather observations from NOAA's web site and failed. It
will retry in 15 minutes.
=back
@@ -74,22 +74,22 @@ These are all available on CPAN: http://www.cpan.org/
=head1 DISCLAMER
Data distribution via the Internet is not considered an operational
delivery mechanism by the NWS due to our inability to insure access
to this service, therefore, the information available here shall not
Data distribution via the Internet is not considered an operational
delivery mechanism by the NWS due to our inability to insure access
to this service, therefore, the information available here shall not
be used for flight planning or other operational purposes.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
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
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.,
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, USA.
=head1 BUGS
@@ -249,7 +249,7 @@ while (1) {
print "Sleeping for 15 minutes.\n" if ($verbose >= 5);
sleep 900;
}
# Should never go there since above is an infinite loop,
# Should never go there since above is an infinite loop,
# send a SIGINT or SIGTERM to exit nicely.
# To be called on exit and on SIGINT or SIGTERM.
+6 -6
View File
@@ -257,14 +257,14 @@ AC_ARG_ENABLE(libusb,
fi ],
[ enable_libusb=yes ]
)
AC_MSG_RESULT($enable_libusb)
AC_MSG_RESULT($enable_libusb)
if test "$enable_libusb" = "yes"; then
ifdef([PKG_CHECK_MODULES],
[PKG_CHECK_MODULES(LIBUSB, libusb,
[AC_DEFINE(HAVE_LIBUSB, [1], [Define to 1 if you have libusb])],
[ enable_libusb=no ])],
[AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring libusb may not be built])])
[AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring libusb may not be built])])
fi
AC_SUBST(LIBUSB_LIBS)
AC_SUBST(LIBUSB_CFLAGS)
@@ -280,14 +280,14 @@ AC_ARG_ENABLE(libftdi,
fi ],
[ enable_libftdi=yes ]
)
AC_MSG_RESULT($enable_libftdi)
AC_MSG_RESULT($enable_libftdi)
if test "$enable_libftdi" = "yes"; then
ifdef([PKG_CHECK_MODULES],
[PKG_CHECK_MODULES(LIBFTDI, libftdi >= 0.8,
[AC_DEFINE(HAVE_LIBFTDI, [1], [Define to 1 if you have libftdi])],
[ enable_libftdi=no ])],
[AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring libftdi may not be built])])
[AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring libftdi may not be built])])
fi
AC_SUBST(LIBFTDI_LIBS)
AC_SUBST(LIBFTDI_CFLAGS)
@@ -303,7 +303,7 @@ AC_ARG_ENABLE(ethlcd,
fi ],
[ enable_ethlcd=yes ]
)
AC_MSG_RESULT($enable_ethlcd)
AC_MSG_RESULT($enable_ethlcd)
# check for doxygen
@@ -323,7 +323,7 @@ if test ! -d $pidfiledir ; then
NONE/*) pidfiledir=`echo $pidfiledir | sed "s~NONE~$ac_default_prefix~"` ;;
esac
fi
AC_ARG_WITH(pidfile-dir,
[AS_HELP_STRING([--with-pidfile-dir=PATH], [specify location of pid files [/var/run]])],
[ if test -n "$withval" && test "x$withval" != "xno" && \
+2 -2
View File
@@ -2,7 +2,7 @@ This document describes the driver API of v0.4 of LCDproc.
The API consists of several functions to tell the driver that
certains actions should be performed, and some data. I consider
the data part of the API, because this data is transfered
the data part of the API, because this data is transfered
between core and driver.
OVERVIEW OF OPERATION
@@ -58,7 +58,7 @@ The various parts are meant for the following:
1. Several variables
These vars are meant to tell the server how many characters wide and high the
LCD is, and what size the definable characters are.
LCD is, and what size the definable characters are.
2. Framebuf
The framebuffer can be written to by server and client in the 0.4 version.
+14 -14
View File
@@ -5,16 +5,16 @@ LCDd - LCDproc server daemon
.SH SYNOPSIS
.B LCDd
[\fB\-hf\fP]
[\fB\-c\fP \fIconfig\fP]
[\fB\-d\fP \fIdriver\fP]
[\fB\-i\fP \fIbool\fP]
[\fB\-a\fP \fIaddr\fP]
[\fB\-p\fP \fIport\fP]
[\fB\-u\fP \fIuser\fP]
[\fB\-w\fP \fItime\fP]
[\fB\-r\fP \fIlevel\fP]
[\fB\-s\fP \fIbool\fP]
[\fB\-hf\fP]
[\fB\-c\fP \fIconfig\fP]
[\fB\-d\fP \fIdriver\fP]
[\fB\-i\fP \fIbool\fP]
[\fB\-a\fP \fIaddr\fP]
[\fB\-p\fP \fIport\fP]
[\fB\-u\fP \fIuser\fP]
[\fB\-w\fP \fItime\fP]
[\fB\-r\fP \fIlevel\fP]
[\fB\-s\fP \fIbool\fP]
.SH DESCRIPTION
\fBLCDd\fP is the server part of LCDproc, a deamon which listens to a certain port (normally 13666)
@@ -27,7 +27,7 @@ Before running \fBLCDd\fP you should carefully
read through that file and modify everything neccessary according to your needs.
Otherwise you might encounter \fBLCDd\fP not running properly on your system.
.PP
To make full use of \fBLCDd\fP, a client such as lcdproc(1), lcdexec(1), or lcdvc
To make full use of \fBLCDd\fP, a client such as lcdproc(1), lcdexec(1), or lcdvc
is required.
.SH OPTIONS
@@ -239,7 +239,7 @@ Noritake VFD Device CU20045SCPB-T28A
Mini-box.com USB LCD (PicoLCD 20x4 & picoLCD 20x2)
.TP
.B pyramid
LCD displays from Pyramid (http://www.pyramid.de)
LCD displays from Pyramid (http://www.pyramid.de)
.TP
.B sed1330
SED1330/SED1335 (aka S1D13300/S1D13305) based graphical displays
@@ -266,7 +266,7 @@ STV5730A on-screen display chip
LCD devices from SURE electronics (http://www.sureelectronics.net)
.TP
.B svga
VGA monitors using svgalib
VGA monitors using svgalib
.TP
.B t6963
Toshiba T6963 based LCD displays
@@ -494,7 +494,7 @@ The special value 10 for \fIint\fP displays a colon.
.SH BUGS
If \fBLCDd\fP seems not to work as expected, try to run it in the foreground
with reporting level set to maximum and reporting to stderr.
This can be achieved without changes to the config file by using the
This can be achieved without changes to the config file by using the
command line:
.RS
.I LCDd -f -r 5 -s 0
+1 -1
View File
@@ -1,3 +1,3 @@
</body>
</body>
</html>
+1 -1
View File
@@ -8,7 +8,7 @@ LCDproc
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff">
<body bgcolor="#ffffff">
<table width="100%">
<tr>
<td width="40%" align="left" valign="middle">
+9 -9
View File
@@ -3,12 +3,12 @@
lcdexec - LCDproc client to execute commands from the LCDd menu
.SH SYNOPSIS
.B lcdexec
[\fB\-hf\fP]
[\fB\-c\fP \fIconfig\fP]
[\fB\-a\fP \fIaddr\fP]
[\fB\-p\fP \fIport\fP]
[\fB\-r\fP \fIlevel\fP]
[\fB\-s\fP \fIbool\fP]
[\fB\-hf\fP]
[\fB\-c\fP \fIconfig\fP]
[\fB\-a\fP \fIaddr\fP]
[\fB\-p\fP \fIport\fP]
[\fB\-r\fP \fIlevel\fP]
[\fB\-s\fP \fIbool\fP]
.SH DESCRIPTION
lcdexec connects to LCDd (the LCDproc server) and adds a submenu to the LCDd main menu
@@ -42,7 +42,7 @@ Report to syslog (1) or to stdout (0, default)
.PP
.SH USAGE
In addition to the command line options listed above lcdexec also takes options from
In addition to the command line options listed above lcdexec also takes options from
a configuration file.
.PP
This file is expected to have a "INI-file" like format with sections introduced by
@@ -94,7 +94,7 @@ is the hostname of the system \fIlcdexec\fP is running on.
Set the shell to use when executing programs.
If not given, \fBlcdexec\fP tries to read the environment variable \fISHELL\fP.
If that fails, it defaults to \fB/bin/sh\fP.
Please note that the shell given here must understand the option \fB\-c\fP
Please note that the shell given here must understand the option \fB\-c\fP
followed by the command line to execute.
.PP
@@ -121,7 +121,7 @@ The name of the menu entry to be displayed on the LCD.
If this option is not given, the the section header name is used (without the square brackets).
.TP 8
.B Feedback=\fIbool\fP
In command entries, this option tells whether to inform the user of the completion of
In command entries, this option tells whether to inform the user of the completion of
commands using an alert screen on the display.
If not given, it defaults to \fBno\fB.
.PP
+1 -1
View File
@@ -2,7 +2,7 @@
Note: While Docbook allows to use block formatted elements like <cmdsynopsis>
within a term definition, HTML only allows inline formatted elements.
Therefore <command> and <option> elements are used. Maybe <refentry> should
be used, but I currently dislike having a separate page for each command.
be used, but I currently dislike having a separate page for each command.
-->
<chapter id="language">
<title>The LCDproc client language</title>
+7 -7
View File
@@ -282,7 +282,7 @@ settings for the LCDproc server <application>LCDd</application>.
</para>
<para>
This setting can be overridden on <application>LCDd</application>'s
command line with the <option>-f</option> option that forces foreground mode.
command line with the <option>-f</option> option that forces foreground mode.
</para>
</listitem>
</varlistentry>
@@ -397,10 +397,10 @@ settings for the LCDproc server <application>LCDd</application>.
while <option>-i 0</option> disables it.
<note>
<para>
Using the command line, it is not possible to set the server screen to
Using the command line, it is not possible to set the server screen to
<literal>blank</literal> mode.
</para>
</note>
</note>
</para>
</listitem>
</varlistentry>
@@ -572,7 +572,7 @@ You can configure what keys the menu should use.
it is also used to move right in input fields.
In this case the value of the input field is not confirmed,
until the right end of the input has been reached.
It is not set by default, but a natural candidate is <literal>Enter</literal>.
</para></listitem>
</varlistentry>
@@ -613,7 +613,7 @@ You can configure what keys the menu should use.
<parameter><replaceable>KEY</replaceable></parameter>
</term>
<listitem><para>
If defined, this optional key is used to
If defined, this optional key is used to
to move left in input fields and to select submenu entries.
It is not set by default, but if you have more than 4 keys,
a natural candidate is <literal>Left</literal>.
@@ -634,7 +634,7 @@ You can configure what keys the menu should use.
</variablelist>
<para>
The minimal keys required for the menu work correctly are the <command>MenuKey</command>,
The minimal keys required for the menu work correctly are the <command>MenuKey</command>,
the <command>EnterKey</command> and one of <command>UpKey</command> or
<command>DownKey</command>.
With these 3 keys the menus can be operated.
@@ -676,7 +676,7 @@ The <package>LCDproc</package> distribution contains init scripts for
<acronym>LSB</acronym> 3.1 (Linux Standard Base 3.1) conforming
GNU/Linux distributions.
In addition to those it contains init scripts for older RedHat- and Debian-based
distributions that do not adhere to LSB 3.1.
distributions that do not adhere to LSB 3.1.
You can find all of them in the <filename>scripts/</filename>
directory of the LCDproc sources.
</para>
+1 -1
View File
@@ -10,7 +10,7 @@
protocol with the host. The actual connection to host is done through
USB through a serial-to-USB converter (CP2102 USB to UART Bridge)
integrated on the board.
</para>
</para>
<sect2 id="SureElec-config">
<title>Configuration in LCDd.conf</title>
+1 -1
View File
@@ -21,7 +21,7 @@ operating power using the standard floppy drive power connector.
</para>
<para>
For more information see the
For more information see the
<ulink url="http://www.emacinc.com/bay_rad.htm">BayRAD home page</ulink>
</para>
+6 -6
View File
@@ -11,21 +11,21 @@ VFD display on the AOpen XC Cube-AV EA65 media barebone.
<para>
The AOpen XC Cube-AV is a barebone designed for using as a media center.
It comes with a front panel display which is capable of displaying one line
of 9 characters.
It comes with a front panel display which is capable of displaying one line
of 9 characters.
</para>
<para>
The display is internally connected to the serial port
(<filename>/dev/ttyS1</filename>) with a fixed rate of 9600 baud.
</para>
<para>
The display uses 13 segments per character. That's why the driver provides
The display uses 13 segments per character. That's why the driver provides
no custom characters like the ones for dot matrix displays do.
</para>
<para>
The front panel furthermore has 9 keys which are illuminated by blue LEDs.
The LEDs can be controlled with the backlight functions. The keys are not
supported by this driver. The red LED (RECORD) can be controlled with the
The front panel furthermore has 9 keys which are illuminated by blue LEDs.
The LEDs can be controlled with the backlight functions. The keys are not
supported by this driver. The red LED (RECORD) can be controlled with the
<code>output</code> command of <application>LCDd</application>.
</para>
+8 -8
View File
@@ -9,7 +9,7 @@ This section describes the Eyebox One.
<title>Eyebox One LCD Module</title>
<para>
Eyebox One is a small rackmounted server marketed by Rightvision
Eyebox One is a small rackmounted server marketed by Rightvision
(<ulink url="http://www.alcateleyebox.rightvision.com/"></ulink>).
This server has an LCD module, a keypad, two graphbars and some leds.
</para>
@@ -18,20 +18,20 @@ This section describes the Eyebox One.
connector.
</para>
<para>
I couldn't find any documentation about it.
I couldn't find any documentation about it.
All I know has been obtained with some reverse engineering.
It seems that it can run only at 19.200 baud.
Sending ASCII to the module will make it simply display that text at
its current cursor position.
Sending ASCII to the module will make it simply display that text at
its current cursor position.
The module has a built-in BIOS that recognizes commands (sent by transmitting a
single-byte "marker" signifying that a command is on the way, followed by
the single-byte command character itself along with any parameters, if needed)
allowing the programmer to clear the screen, position the cursor anywhere,
allowing the programmer to clear the screen, position the cursor anywhere,
hide/show the cursor, on/off the backlight, and so on.
</para>
<para>
This module is fast. If updating less than the whole screen, the LCD can
update faster than can be seen by the human eye. This, of course,
This module is fast. If updating less than the whole screen, the LCD can
update faster than can be seen by the human eye. This, of course,
more than meets LCDproc's needs.
</para>
@@ -102,7 +102,7 @@ This section has been modified by Cédric TESSIER (http://www.nezetic.info)
Switch on the backlight? [default: <literal>yes</literal>; legal: <literal>yes</literal>, <literal>no</literal>]
</para>
<note><para>
If you choose yes, you can switch on/off the backlight in real time
If you choose yes, you can switch on/off the backlight in real time
using the LCDproc server menu with the keypad.
</para></note>
</listitem>
+3 -3
View File
@@ -2,7 +2,7 @@
<title>The G15 Driver</title>
<para>
This section talks about using LCDproc with LCD displays on Logitech G15
This section talks about using LCDproc with LCD displays on Logitech G15
gaming keyboards.
</para>
@@ -10,10 +10,10 @@ gaming keyboards.
<title>Features</title>
<para>
This driver uses g15daemon's virtual screen capabilities to enable
This driver uses g15daemon's virtual screen capabilities to enable
multiple LCDd instances to display on the LCD of the Logitech G15
gaming keyboard. Text and other rendering services are provided by
libg15render from the g15tools project. Input is provided by g15daemon,
libg15render from the g15tools project. Input is provided by g15daemon,
enabling use of the L1-L5 and G1 keys. The required libraries are
available from the g15daemon and g15tools projects at sourceforge.net.
</para>
+1 -1
View File
@@ -2,7 +2,7 @@
<title>The MX5000 Driver</title>
<para>
This section talks about using LCDproc with LCD displays on Logitech MX5000
This section talks about using LCDproc with LCD displays on Logitech MX5000
keyboards.
</para>
+3 -3
View File
@@ -18,7 +18,7 @@ The displays are driven in text mode using their built-in character generator.
Connections below are for the G242C, G121C and G321D displays.
Always consult documentation about the specific display before asuming
the connections given here are also correct for your display !
</para>
</para>
<table id="sed1330-connections.classic-by-lcd">
<title>ConnectionType <literal>classic</literal> ordered by LCD pins</title>
@@ -634,7 +634,7 @@ use the following circuit.
<note><para>
Currently the G321D and SP14Q002 are the only ones that this driver is tested with.
</para></note>
</para></note>
</listitem>
</varlistentry>
</variablelist>
@@ -642,7 +642,7 @@ use the following circuit.
<para>
Contrary to other drivers the character size of an LCD using the sed1330
driver is not given directly.
Instead it is determined by the pixel size of the display, which is derived from
Instead it is determined by the pixel size of the display, which is derived from
the display type setting and the character cell size.
</para>
+1 -1
View File
@@ -17,7 +17,7 @@ If you have installed the Debian package with <application>apt-get</application>
</note>
<para>
If you're building this version from CVS, you'll need
If you're building this version from CVS, you'll need
<application>autoconf</application>, <application>automake</application>,
<application>aclocal</application> and <application>autoheader</application> installed.
</para>
+2 -2
View File
@@ -72,7 +72,7 @@ Usage: LCDd [<options>]
-w <waittime> Time to pause at each screen (in seconds) [4]
-s <bool> If set, reporting will be done using syslog
-r <level> Report level [2]
-i <bool> Whether to rotate the server info screen
-i <bool> Whether to rotate the server info screen
]]>
</screen>
@@ -132,7 +132,7 @@ Usage: lcdproc [<options>] [<screens> ...]
K BigClock big clock
N MiniClock minimal clock
A About credits page
Example:
lcdproc -s my.lcdproc.server.com -p 13666 C M X
+2 -2
View File
@@ -64,7 +64,7 @@ When not given and not in the config file, it defaults to 0.
.TP
.B \-h
Show help screen.
.TP
.TP
.B \-v
Print the version of \fBlcdproc\fP and exit.
.TP
@@ -126,7 +126,7 @@ a screen that was activated in the config file instead of activating a disabled
.SH EXAMPLES
.RS
.I lcdproc C M D '!L'
.I lcdproc C M D '!L'
.RE
.PP
With the command line specified above, \fBlcdproc\fP loads the default configuration file,
+20 -20
View File
@@ -2,10 +2,10 @@
.\" Refer to the COPYING file distributed with this package.
.TH "lcdvc" "1" "12 June 2009" "LCDproc" "LCDproc suite"
.SH "NAME"
.LP
.LP
lcdvc \- LCDproc virtual console
.SH "SYNOPSIS"
.LP
.LP
lcdvc
[\fB\-fh\fR]
[\fB\-a\fR \fIaddr\fR]
@@ -14,58 +14,58 @@ lcdvc
[\fB\-r\fR \fIlevel\fR]
[\fB\-s\fR \fIbool\fR]
.SH "DESCRIPTION"
.LP
.LP
This program shows content from a system console on a LCD controlled by
\fBLCDd\fR. As the console is usually larger than a LCD, the area shown on
the LCD screen can be scrolled using keys attached to the display.
.LP
.LP
Additionally it features an autoscroll feature, which is on by default and can
only be disabled by using \fBlcdvc\fR's menu.
.LP
.LP
By default it uses \fI/dev/vcs\fR and \fI/dev/vcsa\fR devices as the
console to show. Other console devices can be set in the configuration file
\fI@SYSCONFDIR@/lcdvc.conf\fR. The keys used for scrolling can be set in the config
file as well.
.SH "OPTIONS"
.LP
.LP
The following options can be set in the configuration file
\fI@SYSCONFDIR@/lcdvc.conf\fR as well, but those given on the command line take
precedence:
.TP
.TP
\fB\-a\fR \fIaddr\fR
DNS name or IP address of the LCDd server (default localhost).
.TP
.TP
\fB\-c\fR \fIfile\fR
Specify configuration file.
.TP
.TP
\fB\-f\fR
Run in foreground.
.TP
.TP
\fB\-h\fR
Output help and exit.
.TP
.TP
\fB\-p\fR \fIport\fR
Port of the LCDd server (default 13666).
.TP
.TP
\fB\-r\fR \fIlevel\fR
Set reporting level (0\-5, default: 2)
.TP
.TP
\fB\-s\fR \fIbool\fR
Report to syslog (1) or stderr (0, default).
.SH "FILES"
.LP
.LP
\fI@SYSCONFDIR@/lcdvc.conf\fP
.br
\fI/dev/vcs\fP
.br
.br
\fI/dev/vcs\fP
.br
\fI/dev/vcsa\fP
.SH "AUTHORS"
.LP
.LP
\fBlcdvc\fR was originally written by Joris Robijn, modified by Peter Marschall.
.LP
.LP
This man page was written by Markus Dolze.
.SH "SEE ALSO"
.LP
.LP
LCDd(8) vcs(4)
.SH "LICENSE"
\fBlcdvc\fR is released under the GNU General Public License, version 2.
+1 -1
View File
@@ -2,7 +2,7 @@
lcdproc-finish-nightly.sh sits on the sourceforge server located at lcdproc.sf.net
The other scripts (generate-nightlies.sh, make-nightly.sh & make-docs.sh) sit on a
local server and are run every night.
local server and are run every night.
generate-nightlies.sh calls make-nightly.sh for each CVS branch,
and make-docs for each CVS branch for each documentation (user guide, admin guide).
+5 -5
View File
@@ -60,7 +60,7 @@ if [ -e README ] && [ -e ChangeLog ] && [ -e LCDd.conf ]; then
BRANCH=${BRANCH} \
${PERL} -MPOSIX -i -p \
-e '$version = "CVS-".$ENV{BRANCH}."-".strftime("%Y%m%d", localtime);
s/(AM_INIT_AUTOMAKE\s*)\(\s*(\[?lcdproc\]?)\s*,\s*[\w\d.-]+\s*\)/$1($2, $version)/;
s/(AM_INIT_AUTOMAKE\s*)\(\s*(\[?lcdproc\]?)\s*,\s*[\w\d.-]+\s*\)/$1($2, $version)/;
s/(AC_INIT\s*)\(\s*(\[?lcdproc\]?)\s*,\s*[\w\d.-]+\s*\)/$1($2, $version)/;
s/(AC_INIT\s*)\(\s*(\[?lcdproc\]?)\s*,\s*[\w\d.-]+(\s*[^)]+)\s*\)/$1($2, $version$3)/;' \
configure.in
@@ -68,7 +68,7 @@ if [ -e README ] && [ -e ChangeLog ] && [ -e LCDd.conf ]; then
# Debian-specific stuff
for dir in debian scripts/debian ; do
# Increase version number in debian/changelog accordingly
if [ -d "$dir" ] && [ -e "$dir/changelog" ]; then
if [ -d "$dir" ] && [ -e "$dir/changelog" ]; then
cp -a $dir/changelog debian_changelog.nightly-temp
${PERL} -MPOSIX -i -p \
-e '$date = strftime("%Y%m%d", localtime);
@@ -78,7 +78,7 @@ if [ -e README ] && [ -e ChangeLog ] && [ -e LCDd.conf ]; then
# Make debian/rules executable
test -e $dir/rules && chmod +x $dir/rules
done
done
# Re-generate the autotools files
sh autogen.sh >/dev/null
@@ -108,7 +108,7 @@ if [ -e README ] && [ -e ChangeLog ] && [ -e LCDd.conf ]; then
rm -f nightly-cvsChanges.txt last-nightly.txt
for dir in debian scripts/debian ; do
test -d $dir && cp debian_changelog.nightly-temp $dir/changelog
done
done
rm debian_changelog.nightly-temp
# remove files generated by ./configure --silent
@@ -119,7 +119,7 @@ if [ -e README ] && [ -e ChangeLog ] && [ -e LCDd.conf ]; then
# build configure (& Makefile.in's ?) based on original configure.in from CVS
sh autogen.sh >/dev/null
fi
# EOF
+1 -1
View File
@@ -13,7 +13,7 @@ COMPILEREPORT=../st-compile-report/${PLATFORM}:${BRANCH}:
GMAKEPATH=`which gmake`
MAKEPATH=`which make`
if test ${GMAKEPATH} && test -f ${GMAKEPATH}; then
if test ${GMAKEPATH} && test -f ${GMAKEPATH}; then
MAKE=${GMAKEPATH}
else
if test ${MAKEPATH} && test -f ${MAKEPATH}; then
+5 -5
View File
@@ -69,10 +69,10 @@ static char *argv2string(int argc, char **argv)
*\verbatim
* Usage: menu_add_item <menuid> <newitemid> <type> [<text>]
*\endverbatim
*
*
* You should use "" as id for the client's main menu. This menu will be
* created automatically when you add an item to it the first time.
*
*
* You (currently?) cannot create a menu in the main level yourself.
* The names you use for items should be unique for your client.
* The text is the visible text for the item.
@@ -232,7 +232,7 @@ menu_add_item_func(Client *c, int argc, char **argv)
*\verbatim
* Usage: menu_del_item <menuid> <itemid>
*\endverbatim
*
*
* The given item in the given menu will be deleted. If you have deleted all
* the items from your client menu, that menu will automatically be removed.
*/
@@ -299,7 +299,7 @@ menu_del_item_func(Client *c, int argc, char **argv)
*
*\verbatim
* Usage: menu_set_item <menuid> <itemid> {<option>}+
*
*
* The following parameters can be set per item:
* (you should include the - in the option)
*
@@ -850,7 +850,7 @@ int set_successor(MenuItem *item, char *itemid, Client *c)
}
/**
* Requests the menu system to set the entry point into the menu system.
* Requests the menu system to set the entry point into the menu system.
*
*\verbatim
* Usage: menu_set_main <id>
+1 -1
View File
@@ -129,7 +129,7 @@ screen_del_func(Client *c, int argc, char **argv)
*
*\verbatim
* Usage: screen_set <id> [-name <name>] [-wid <width>] [-hgt <height>]
* [-priority <prio>] [-duration <int>] [-timeout <int>]
* [-priority <prio>] [-duration <int>] [-timeout <int>]
* [-heartbeat <type>] [-backlight <type>]
* [-cursor <type>] [-cursor_x <xpos>] [-cursor_y <ypos>]
*\endverbatim
+1 -1
View File
@@ -271,7 +271,7 @@ widget_set_func(Client *c, int argc, char **argv)
length = atoi(argv[i + 2]);
w->x = x;
w->y = y;
w->length = length; /* This is the length in pixels */
w->length = length; /* This is the length in pixels */
}
debug(RPT_DEBUG, "Widget %s set to %i", wid, w->length);
sock_send_string(c->sock, "success\n");
+1 -1
View File
@@ -543,7 +543,7 @@ driver_alt_num(Driver *drv, int x, int num)
* Fallback for the driver's \c heartbeat method if the driver does not provide one.
* \param drv Pointer to driver structure.
* \param state Current heartbeat state.
*/
*/
void
driver_alt_heartbeat(Driver *drv, int state)
{
+18 -18
View File
@@ -365,7 +365,7 @@ CFontz_flush(Driver *drvthis)
/* move cursor to start of (i+1)'th line */
CFontz_cursor_goto(drvthis, 1, i+1);
for (j = 0; j < p->width; j++) {
unsigned char c = p->framebuf[(i * p->width) + j];
@@ -380,9 +380,9 @@ CFontz_flush(Driver *drvthis)
*ptr++ = CFONTZ_Send_Data_Directly_To_LCD;
*ptr++ = 0x01;
}
}
}
*ptr++ = c;
}
}
write(p->fd, out, (ptr - out));
}
}
@@ -399,7 +399,7 @@ CFontz_flush(Driver *drvthis)
write(p->fd, p->framebuf + (p->width * i), p->width);
}
}
}
}
@@ -801,7 +801,7 @@ CFontz_icon(Driver *drvthis, int x, int y, int icon)
{
PrivateData *p = drvthis->private_data;
static unsigned char heart_open[] =
static unsigned char heart_open[] =
{ b__XXXXX,
b__X_X_X,
b_______,
@@ -810,7 +810,7 @@ CFontz_icon(Driver *drvthis, int x, int y, int icon)
b__X___X,
b__XX_XX,
b__XXXXX };
static unsigned char heart_filled[] =
static unsigned char heart_filled[] =
{ b__XXXXX,
b__X_X_X,
b___X_X_,
@@ -820,7 +820,7 @@ CFontz_icon(Driver *drvthis, int x, int y, int icon)
b__XX_XX,
b__XXXXX };
/*
static unsigned char arrow_up[] =
static unsigned char arrow_up[] =
{ b____X__,
b___XXX_,
b__X_X_X,
@@ -829,7 +829,7 @@ CFontz_icon(Driver *drvthis, int x, int y, int icon)
b____X__,
b____X__,
b_______ };
static unsigned char arrow_down[] =
static unsigned char arrow_down[] =
{ b____X__,
b____X__,
b____X__,
@@ -838,7 +838,7 @@ CFontz_icon(Driver *drvthis, int x, int y, int icon)
b___XXX_,
b____X__,
b_______ };
static unsigned char arrow_left[] =
static unsigned char arrow_left[] =
{ b_______,
b____X__,
b___X___,
@@ -847,7 +847,7 @@ CFontz_icon(Driver *drvthis, int x, int y, int icon)
b____X__,
b_______,
b_______ };
static unsigned char arrow_right[] =
static unsigned char arrow_right[] =
{ b_______,
b____X__,
b_____X_,
@@ -857,7 +857,7 @@ CFontz_icon(Driver *drvthis, int x, int y, int icon)
b_______,
b_______ };
*/
static unsigned char checkbox_off[] =
static unsigned char checkbox_off[] =
{ b_______,
b_______,
b__XXXXX,
@@ -866,7 +866,7 @@ CFontz_icon(Driver *drvthis, int x, int y, int icon)
b__X___X,
b__XXXXX,
b_______ };
static unsigned char checkbox_on[] =
static unsigned char checkbox_on[] =
{ b____X__,
b____X__,
b__XXX_X,
@@ -875,7 +875,7 @@ CFontz_icon(Driver *drvthis, int x, int y, int icon)
b__X___X,
b__XXXXX,
b_______ };
static unsigned char checkbox_gray[] =
static unsigned char checkbox_gray[] =
{ b_______,
b_______,
b__XXXXX,
@@ -885,7 +885,7 @@ CFontz_icon(Driver *drvthis, int x, int y, int icon)
b__XXXXX,
b_______ };
/*
static unsigned char selector_left[] =
static unsigned char selector_left[] =
{ b___X___,
b___XX__,
b___XXX_,
@@ -894,7 +894,7 @@ CFontz_icon(Driver *drvthis, int x, int y, int icon)
b___XX__,
b___X___,
b_______ };
static unsigned char selector_right[] =
static unsigned char selector_right[] =
{ b_____X_,
b____XX_,
b___XXX_,
@@ -903,7 +903,7 @@ CFontz_icon(Driver *drvthis, int x, int y, int icon)
b____XX_,
b_____X_,
b_______ };
static unsigned char ellipsis[] =
static unsigned char ellipsis[] =
{ b_______,
b_______,
b_______,
@@ -912,7 +912,7 @@ CFontz_icon(Driver *drvthis, int x, int y, int icon)
b_______,
b__X_X_X,
b_______ };
static unsigned char block_filled[] =
static unsigned char block_filled[] =
{ b__XXXXX,
b__XXXXX,
b__XXXXX,
@@ -974,7 +974,7 @@ CFontz_icon(Driver *drvthis, int x, int y, int icon)
* \param y Vertical cursor position (row).
* \param state New cursor state.
*/
MODULE_EXPORT void
MODULE_EXPORT void
CFontz_cursor(Driver *drvthis, int x, int y, int state)
{
PrivateData *p = (PrivateData *) drvthis->private_data;
+13 -13
View File
@@ -848,7 +848,7 @@ CFontz633_icon (Driver *drvthis, int x, int y, int icon)
{
PrivateData *p = drvthis->private_data;
static unsigned char heart_open[] =
static unsigned char heart_open[] =
{ b__XXXXX,
b__X_X_X,
b_______,
@@ -857,7 +857,7 @@ CFontz633_icon (Driver *drvthis, int x, int y, int icon)
b__X___X,
b__XX_XX,
b__XXXXX };
static unsigned char heart_filled[] =
static unsigned char heart_filled[] =
{ b__XXXXX,
b__X_X_X,
b___X_X_,
@@ -866,7 +866,7 @@ CFontz633_icon (Driver *drvthis, int x, int y, int icon)
b__X_X_X,
b__XX_XX,
b__XXXXX };
static unsigned char arrow_up[] =
static unsigned char arrow_up[] =
{ b____X__,
b___XXX_,
b__X_X_X,
@@ -875,7 +875,7 @@ CFontz633_icon (Driver *drvthis, int x, int y, int icon)
b____X__,
b____X__,
b_______ };
static unsigned char arrow_down[] =
static unsigned char arrow_down[] =
{ b____X__,
b____X__,
b____X__,
@@ -885,7 +885,7 @@ CFontz633_icon (Driver *drvthis, int x, int y, int icon)
b____X__,
b_______ };
/*
static unsigned char arrow_left[] =
static unsigned char arrow_left[] =
{ b_______,
b____X__,
b___X___,
@@ -894,7 +894,7 @@ CFontz633_icon (Driver *drvthis, int x, int y, int icon)
b____X__,
b_______,
b_______ };
static unsigned char arrow_right[] =
static unsigned char arrow_right[] =
{ b_______,
b____X__,
b_____X_,
@@ -904,7 +904,7 @@ CFontz633_icon (Driver *drvthis, int x, int y, int icon)
b_______,
b_______ };
*/
static unsigned char checkbox_off[] =
static unsigned char checkbox_off[] =
{ b_______,
b_______,
b__XXXXX,
@@ -913,7 +913,7 @@ CFontz633_icon (Driver *drvthis, int x, int y, int icon)
b__X___X,
b__XXXXX,
b_______ };
static unsigned char checkbox_on[] =
static unsigned char checkbox_on[] =
{ b____X__,
b____X__,
b__XXX_X,
@@ -922,7 +922,7 @@ CFontz633_icon (Driver *drvthis, int x, int y, int icon)
b__X___X,
b__XXXXX,
b_______ };
static unsigned char checkbox_gray[] =
static unsigned char checkbox_gray[] =
{ b_______,
b_______,
b__XXXXX,
@@ -932,7 +932,7 @@ CFontz633_icon (Driver *drvthis, int x, int y, int icon)
b__XXXXX,
b_______ };
/*
static unsigned char selector_left[] =
static unsigned char selector_left[] =
{ b___X___,
b___XX__,
b___XXX_,
@@ -941,7 +941,7 @@ CFontz633_icon (Driver *drvthis, int x, int y, int icon)
b___XX__,
b___X___,
b_______ };
static unsigned char selector_right[] =
static unsigned char selector_right[] =
{ b_____X_,
b____XX_,
b___XXX_,
@@ -950,7 +950,7 @@ CFontz633_icon (Driver *drvthis, int x, int y, int icon)
b____XX_,
b_____X_,
b_______ };
static unsigned char ellipsis[] =
static unsigned char ellipsis[] =
{ b_______,
b_______,
b_______,
@@ -959,7 +959,7 @@ CFontz633_icon (Driver *drvthis, int x, int y, int icon)
b_______,
b__X_X_X,
b_______ };
static unsigned char block_filled[] =
static unsigned char block_filled[] =
{ b__XXXXX,
b__XXXXX,
b__XXXXX,
+8 -8
View File
@@ -8,9 +8,9 @@
633 Test code for linux.
Copyright 2002, David GLAUDE
Partial copyright
2001 Crystalfontz America, Inc.
2001 Crystalfontz America, Inc.
brent@crystalfontz.com
Written by Brent A. Crosby
Written by Brent A. Crosby
www.crystalfontz.com
===========================================================================
@@ -242,7 +242,7 @@ send_packet(int fd, COMMAND_PACKET *out, COMMAND_PACKET *in)
// print_packet(out);
/* Every time we send a message, we also check for an incoming one. */
test_packet(fd, 0x40 | out->command, in);
test_packet(fd, 0x40 | out->command, in);
}
@@ -259,10 +259,10 @@ send_packet(int fd, COMMAND_PACKET *out, COMMAND_PACKET *in)
* - WIDTH: 16 (16 bit CRC)
* - POLY: 0x1021 (generating polynomial)
* - INIT: 0xFFFF (seed value for the register when starting the algorithm)
* - REFIN: TRUE (reflect [i.e. bit-swap] each input byte before being processed)
* - REFIN: TRUE (reflect [i.e. bit-swap] each input byte before being processed)
* - REFOUT: TRUE (reflect [i.e. bit-swap] the result before the XOROUT phase)
* - XOROUT: 0xFFFF (value to xor the result before returning it as crc)
*/
*/
static int
get_crc(unsigned char *buf, int len, int seed)
{
@@ -355,7 +355,7 @@ void SyncReceiveBuffer(ReceiveBuffer *rb, int fd, unsigned int number)
if (!retval)
return;
#endif /* defined(HAVE_SELECT) && defined(CFONTZ633_WRITE_DELAY) && (CFONTZ633_WRITE_DELAY > 0) */
#endif /* defined(HAVE_SELECT) && defined(CFONTZ633_WRITE_DELAY) && (CFONTZ633_WRITE_DELAY > 0) */
if (number > MAX_DATA_LENGTH)
number = MAX_DATA_LENGTH;
@@ -500,7 +500,7 @@ unsigned char PeekByte(ReceiveBuffer *rb)
*/
/* I should use the value GIVE_UP and not reenter if there is no extra
* byte read from the serial port
*/
*/
static int
test_packet(int fd, unsigned char response, COMMAND_PACKET *in)
{
@@ -651,7 +651,7 @@ check_for_packet(int fd, COMMAND_PACKET *in, unsigned char expected_length)
static void
print_packet(COMMAND_PACKET *packet)
{
int i, cmd, top, len;
int i, cmd, top, len;
top = (0xC0 & (packet->command)) >> 6;
cmd = (0x3F & (packet->command));
+34 -34
View File
@@ -24,8 +24,8 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
*/
/*
/*
Feedback from Tomislav Secen, who tested it with a 1602:
Great, this is much better:
@@ -33,16 +33,16 @@
- bars are OK (at least the few I've seen)
- heartbeat icon flashes nicely in the top right corner.
Only issue I encountered was (similar came up before) - when setting some menu
options, or just entering a certain menu (like Options->CwLnx->OnBrightness,
lcdvc client menu), the LCD becomes garbled (i.e. displays two blinking hearts,
boxes, '%' symbols), sometimes starts displaying just '%' symbols over the whole
LCD while I'm pressing Left/Right keys (is this the screen-saver?), scrolling
from right to left. Even the "Thank you for using ..." message is garbled (each
time in a different way) if I kill the daemon after that. Pressing 'X' when the
garbled characters occur exits the menu and the other (client) screens are
displayed correctly after that. So only the menus are affected by this issue -
it seems that this screen-saver mode kicks in in the wrong time, and tries to
Only issue I encountered was (similar came up before) - when setting some menu
options, or just entering a certain menu (like Options->CwLnx->OnBrightness,
lcdvc client menu), the LCD becomes garbled (i.e. displays two blinking hearts,
boxes, '%' symbols), sometimes starts displaying just '%' symbols over the whole
LCD while I'm pressing Left/Right keys (is this the screen-saver?), scrolling
from right to left. Even the "Thank you for using ..." message is garbled (each
time in a different way) if I kill the daemon after that. Pressing 'X' when the
garbled characters occur exits the menu and the other (client) screens are
displayed correctly after that. So only the menus are affected by this issue -
it seems that this screen-saver mode kicks in in the wrong time, and tries to
write to LCD faster than it can process chars/commands.
*/
@@ -179,7 +179,7 @@ static int Write_LCD(int fd, char *c, int size)
break;
}
} while (size > 0 && --retries > 0);
return wrote;
}
@@ -551,7 +551,7 @@ CwLnx_init(Driver *drvthis)
speed = B19200;
report(RPT_WARNING, "%s: Speed must be 9600 or 19200. Using default %d",
drvthis->name, default_speed);
}
}
/* do we have a keypad? */
if (drvthis->config_get_bool(drvthis->name , "Keypad", 0, 0)) {
@@ -621,7 +621,7 @@ CwLnx_init(Driver *drvthis)
}
report(RPT_INFO, "%s: opened display on %s", drvthis->name, device);
/*
/*
Since we don't know what speed the display is using when
we first connect to it, configure the port for the speed
we don't want to use, send a command to switch the display
@@ -631,7 +631,7 @@ CwLnx_init(Driver *drvthis)
Init_Port(p->fd);
if (speed == B9600) {
Setup_Port(p->fd, B19200);
Set_9600(p->fd);
Set_9600(p->fd);
} else {
Setup_Port(p->fd, B9600);
Set_19200(p->fd);
@@ -772,7 +772,7 @@ CwLnx_flush(Driver *drvthis)
if (firstUpdate && q - lastUpdate > MOVE_COST) {
Set_Insert(p->fd, iUpdate, jUpdate);
Write_LCD(p->fd, (char *) firstUpdate,
lastUpdate - firstUpdate + 1);
lastUpdate - firstUpdate + 1);
firstUpdate = lastUpdate = NULL;
}
} else {
@@ -784,7 +784,7 @@ CwLnx_flush(Driver *drvthis)
}
}
q++;
r++;
r++;
}
}
if (firstUpdate) {
@@ -879,7 +879,7 @@ CwLnx_backlight(Driver *drvthis, int on)
* \param state Brightness state (on/off) for which we want the value.
* \return Stored brightness in promille.
*/
MODULE_EXPORT int
MODULE_EXPORT int
CwLnx_get_brightness(Driver *drvthis, int state)
{
PrivateData *p = drvthis->private_data;
@@ -1159,12 +1159,12 @@ CwLnx_set_char_unrestricted(Driver *drvthis, int n, unsigned char *dat)
* \retval 0 Icon has been successfully defined/written.
* \retval <0 Server core shall define/write the icon.
*/
MODULE_EXPORT int
MODULE_EXPORT int
CwLnx_icon(Driver *drvthis, int x, int y, int icon)
{
PrivateData *p = drvthis->private_data;
static unsigned char heart_open[] =
static unsigned char heart_open[] =
{ b__XXXXX,
b__X_X_X,
b_______,
@@ -1173,7 +1173,7 @@ CwLnx_icon(Driver *drvthis, int x, int y, int icon)
b__X___X,
b__XX_XX,
b__XXXXX };
static unsigned char heart_filled[] =
static unsigned char heart_filled[] =
{ b__XXXXX,
b__X_X_X,
b___X_X_,
@@ -1182,7 +1182,7 @@ CwLnx_icon(Driver *drvthis, int x, int y, int icon)
b__X_X_X,
b__XX_XX,
b__XXXXX };
static unsigned char arrow_up[] =
static unsigned char arrow_up[] =
{ b____X__,
b___XXX_,
b__X_X_X,
@@ -1191,7 +1191,7 @@ CwLnx_icon(Driver *drvthis, int x, int y, int icon)
b____X__,
b____X__,
b_______ };
static unsigned char arrow_down[] =
static unsigned char arrow_down[] =
{ b____X__,
b____X__,
b____X__,
@@ -1201,7 +1201,7 @@ CwLnx_icon(Driver *drvthis, int x, int y, int icon)
b____X__,
b_______ };
/*
static unsigned char arrow_left[] =
static unsigned char arrow_left[] =
{ b_______,
b____X__,
b___X___,
@@ -1210,7 +1210,7 @@ CwLnx_icon(Driver *drvthis, int x, int y, int icon)
b____X__,
b_______,
b_______ };
static unsigned char arrow_right[] =
static unsigned char arrow_right[] =
{ b_______,
b____X__,
b_____X_,
@@ -1220,7 +1220,7 @@ CwLnx_icon(Driver *drvthis, int x, int y, int icon)
b_______,
b_______ };
*/
static unsigned char checkbox_off[] =
static unsigned char checkbox_off[] =
{ b_______,
b_______,
b__XXXXX,
@@ -1229,7 +1229,7 @@ CwLnx_icon(Driver *drvthis, int x, int y, int icon)
b__X___X,
b__XXXXX,
b_______ };
static unsigned char checkbox_on[] =
static unsigned char checkbox_on[] =
{ b____X__,
b____X__,
b__XXX_X,
@@ -1238,7 +1238,7 @@ CwLnx_icon(Driver *drvthis, int x, int y, int icon)
b__X___X,
b__XXXXX,
b_______ };
static unsigned char checkbox_gray[] =
static unsigned char checkbox_gray[] =
{ b_______,
b_______,
b__XXXXX,
@@ -1248,7 +1248,7 @@ CwLnx_icon(Driver *drvthis, int x, int y, int icon)
b__XXXXX,
b_______ };
/*
static unsigned char selector_left[] =
static unsigned char selector_left[] =
{ b___X___,
b___XX__,
b___XXX_,
@@ -1257,7 +1257,7 @@ CwLnx_icon(Driver *drvthis, int x, int y, int icon)
b___XX__,
b___X___,
b_______ };
static unsigned char selector_right[] =
static unsigned char selector_right[] =
{ b_____X_,
b____XX_,
b___XXX_,
@@ -1266,7 +1266,7 @@ CwLnx_icon(Driver *drvthis, int x, int y, int icon)
b____XX_,
b_____X_,
b_______ };
static unsigned char ellipsis[] =
static unsigned char ellipsis[] =
{ b_______,
b_______,
b_______,
@@ -1275,8 +1275,8 @@ CwLnx_icon(Driver *drvthis, int x, int y, int icon)
b_______,
b__X_X_X,
b_______ };
*/
static unsigned char block_filled[] =
*/
static unsigned char block_filled[] =
{ b__XXXXX,
b__XXXXX,
b__XXXXX,
+15 -15
View File
@@ -5,7 +5,7 @@
/* This is the LCDproc driver for EyeboxOne devices
This code is based on MtxOrb driver (William Ferrell and Scott Scriven)
This code is based on MtxOrb driver (William Ferrell and Scott Scriven)
Copyright (C) 2006 Cedric TESSIER (aka NeZetiC) http://www.nezetic.info
@@ -413,7 +413,7 @@ EyeboxOne_close (Driver *drvthis)
p->framebuf = NULL;
free(p);
}
}
drvthis->store_private_ptr(drvthis, NULL);
debug(RPT_DEBUG, "EyeBO: closed");
}
@@ -450,15 +450,15 @@ EyeboxOne_string (Driver *drvthis, int x, int y, const char string[])
int bar,level;
PrivateData * p = drvthis->private_data;
/*
* /xBab = Use Bar
* a = Bar ID
* b = Level
/*
* /xBab = Use Bar
* a = Bar ID
* b = Level
*/
if(strncmp(string,"/xB",3) == 0){
bar = (int) (string[3] - 48);
bar = (int) (string[3] - 48);
level = (int) (string[4] - 48);
if(level == 1)
if(level == 1)
if(strlen(string) > 5)
if(((int) (string[5] - 48)) == 0)
level = 10;
@@ -470,7 +470,7 @@ EyeboxOne_string (Driver *drvthis, int x, int y, const char string[])
ValidX(x);
ValidY(y);
x--; y--;
x--; y--;
offset = (y * p->width) + x;
siz = (p->widthBYheight) - offset;
siz = (siz > strlen(string)) ? strlen(string) : siz;
@@ -541,7 +541,7 @@ EyeboxOne_chr (Driver *drvthis, int x, int y, char c)
ValidX(x);
ValidY(y);
y--; x--;
y--; x--;
offset = (y * p->width) + x;
p->framebuf[offset] = c;
@@ -549,7 +549,7 @@ EyeboxOne_chr (Driver *drvthis, int x, int y, char c)
}
/******************************
* Sets the backlight on or off
* Sets the backlight on or off
*/
MODULE_EXPORT void
EyeboxOne_backlight (Driver *drvthis, int on)
@@ -585,7 +585,7 @@ EyeboxOne_backlight (Driver *drvthis, int on)
}
}
/**********************
/**********************
* Toggle cursor on/off
*/
static void
@@ -624,10 +624,10 @@ EyeboxOne_get_key (Driver *drvthis)
(void) read(p->fd, &in, 1);
report(RPT_DEBUG, "%s: get_key: key 0x%02X", drvthis->name, in);
/* There is a lot of undesirable chars which appear
/* There is a lot of undesirable chars which appear
* when a key is pressed
* */
if (in == '\0' || (int) in == 19 || (int) in == 91 || (int) in == 79 || (int) in == 27)
if (in == '\0' || (int) in == 19 || (int) in == 91 || (int) in == 79 || (int) in == 27)
return NULL;
if (!p->keypad_test_mode) {
@@ -640,7 +640,7 @@ EyeboxOne_get_key (Driver *drvthis)
else if (in == p->down_key)
return "Down";
else if (in == p->enter_key)
return "Enter";
return "Enter";
else if (in == p->escape_key)
return "Escape";
else {
+31 -31
View File
@@ -7,7 +7,7 @@
based on GPL'ed code:
* IOWarrior LCD routines
* IOWarrior LCD routines
Copyright (c) 2004 Christian Vogelgsang <chris@lallafa.de>
* misc. files from LCDproc source tree
@@ -82,7 +82,7 @@ static int iowlcd_enable(PrivateData *p)
{
unsigned char lcd_cmd[64] = { 0x04, 0x01, 0, 0, 0, 0, 0, 0 };
int res = iow_lcd_wcmd(p->udh, IOWLCD_SIZE, lcd_cmd);
usleep(30000); /* wait for 30ms */
return res;
}
@@ -92,7 +92,7 @@ static int iowlcd_disable(PrivateData *p)
{
unsigned char lcd_cmd[64] = { 0x04, 0x00, 0, 0, 0, 0, 0, 0 };
int res = iow_lcd_wcmd(p->udh, IOWLCD_SIZE, lcd_cmd);
usleep(30000);
return res;
}
@@ -102,7 +102,7 @@ static int iowlcd_display_clear(PrivateData *p)
{
unsigned char lcd_cmd[64] = { 0x05, 1, 0x01, 0, 0, 0, 0, 0 };
int res = iow_lcd_wcmd(p->udh, IOWLCD_SIZE, lcd_cmd);
usleep(3000); /* 3ms */
return res;
}
@@ -110,7 +110,7 @@ static int iowlcd_display_clear(PrivateData *p)
static int iowlcd_display_on_off(PrivateData *p, int display, int cursor, int blink)
{
unsigned char lcd_cmd[64] = { 0x05, 1, 0x08, 0, 0, 0, 0, 0 };
if (display) lcd_cmd[2] |= 0x04;
if (cursor) lcd_cmd[2] |= 0x02;
if (blink) lcd_cmd[2] |= 0x01;
@@ -120,7 +120,7 @@ static int iowlcd_display_on_off(PrivateData *p, int display, int cursor, int bl
static int iowlcd_set_function(PrivateData *p, int eight_bit, int two_line, int ten_dots)
{
unsigned char lcd_cmd[64] = { 0x05, 1, 0x20, 0, 0, 0, 0, 0 };
if (eight_bit) lcd_cmd[2] |= 0x10;
if (two_line) lcd_cmd[2] |= 0x08;
if (ten_dots) lcd_cmd[2] |= 0x04;
@@ -130,7 +130,7 @@ static int iowlcd_set_function(PrivateData *p, int eight_bit, int two_line, int
static int iowlcd_set_cgram_addr(PrivateData *p, int addr)
{
unsigned char lcd_cmd[64] = { 0x05, 1, 0x40, 0, 0, 0, 0, 0 };
lcd_cmd[2] |= (addr & 0x3f);
return iow_lcd_wcmd(p->udh, IOWLCD_SIZE, lcd_cmd);
}
@@ -219,7 +219,7 @@ static int iowled_on_off(PrivateData *p, unsigned int pattern)
for (i = 0; i < (p->productID == iowProd40) ? 4 : 2; i++) {
led_cmd[i] = (unsigned char) (0xFF & pattern);
pattern >>= 8;
}
}
return iow_led_wcmd(p->udh, (p->productID == iowProd40) ? 4 : 2, led_cmd);
}
@@ -390,7 +390,7 @@ IOWarrior_init(Driver *drvthis)
#if defined(LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP)
report(RPT_WARNING, "%s: interface may be claimed by kernel driver, attempting to detach it",
drvthis->name);
errno = 0;
if ((usb_detach_kernel_driver_np(p->udh, 1) < 0) ||
(usb_claim_interface(p->udh, 1) < 0)) {
@@ -485,7 +485,7 @@ IOWarrior_close(Driver *drvthis)
p->backingstore = NULL;
free(p);
}
}
drvthis->store_private_ptr(drvthis, NULL);
debug(RPT_DEBUG, "%s: closed", drvthis->name);
@@ -497,7 +497,7 @@ IOWarrior_close(Driver *drvthis)
* \param drvthis Pointer to driver structure.
* \return Number of characters the display is wide.
*/
MODULE_EXPORT int
MODULE_EXPORT int
IOWarrior_width(Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
@@ -513,7 +513,7 @@ IOWarrior_width(Driver *drvthis)
* \param drvthis Pointer to driver structure.
* \return Number of characters the display is high.
*/
MODULE_EXPORT int
MODULE_EXPORT int
IOWarrior_height(Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
@@ -529,7 +529,7 @@ IOWarrior_height(Driver *drvthis)
* \param drvthis Pointer to driver structure.
* \return Number of pixel columns a character cell is wide.
*/
MODULE_EXPORT int
MODULE_EXPORT int
IOWarrior_cellwidth(Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
@@ -545,7 +545,7 @@ IOWarrior_cellwidth(Driver *drvthis)
* \param drvthis Pointer to driver structure.
* \return Number of pixel lines a character cell is high.
*/
MODULE_EXPORT int
MODULE_EXPORT int
IOWarrior_cellheight(Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
@@ -835,7 +835,7 @@ PrivateData *p = drvthis->private_data;
default:
iowlcd_display_on_off(p, 1, 1, 1);
break;
}
}
}
*/
@@ -879,7 +879,7 @@ IOWarrior_set_char(Driver *drvthis, int n, unsigned char *dat)
int letter = 0;
if (p->lastline || (row < p->cellheight - 1))
letter = dat[row] & mask;
letter = dat[row] & mask;
if (p->cc[n].cache[row] != letter)
p->cc[n].clean = 0; /* only mark dirty if really different */
@@ -897,10 +897,10 @@ IOWarrior_set_char(Driver *drvthis, int n, unsigned char *dat)
* \retval 0 Icon has been successfully defined/written.
* \retval <0 Server core shall define/write the icon.
*/
MODULE_EXPORT int
MODULE_EXPORT int
IOWarrior_icon(Driver *drvthis, int x, int y, int icon)
{
static unsigned char heart_open[] =
static unsigned char heart_open[] =
{ b__XXXXX,
b__X_X_X,
b_______,
@@ -909,7 +909,7 @@ static unsigned char heart_open[] =
b__X___X,
b__XX_XX,
b__XXXXX };
static unsigned char heart_filled[] =
static unsigned char heart_filled[] =
{ b__XXXXX,
b__X_X_X,
b___X_X_,
@@ -918,7 +918,7 @@ static unsigned char heart_filled[] =
b__X_X_X,
b__XX_XX,
b__XXXXX };
static unsigned char arrow_up[] =
static unsigned char arrow_up[] =
{ b____X__,
b___XXX_,
b__X_X_X,
@@ -927,7 +927,7 @@ static unsigned char arrow_up[] =
b____X__,
b____X__,
b_______ };
static unsigned char arrow_down[] =
static unsigned char arrow_down[] =
{ b____X__,
b____X__,
b____X__,
@@ -937,7 +937,7 @@ static unsigned char arrow_down[] =
b____X__,
b_______ };
/*
static unsigned char arrow_left[] =
static unsigned char arrow_left[] =
{ b_______,
b____X__,
b___X___,
@@ -946,7 +946,7 @@ static unsigned char arrow_left[] =
b____X__,
b_______,
b_______ };
static unsigned char arrow_right[] =
static unsigned char arrow_right[] =
{ b_______,
b____X__,
b_____X_,
@@ -956,7 +956,7 @@ static unsigned char arrow_right[] =
b_______,
b_______ };
*/
static unsigned char checkbox_off[] =
static unsigned char checkbox_off[] =
{ b_______,
b_______,
b__XXXXX,
@@ -965,7 +965,7 @@ static unsigned char checkbox_off[] =
b__X___X,
b__XXXXX,
b_______ };
static unsigned char checkbox_on[] =
static unsigned char checkbox_on[] =
{ b____X__,
b____X__,
b__XXX_X,
@@ -974,7 +974,7 @@ static unsigned char checkbox_on[] =
b__X___X,
b__XXXXX,
b_______ };
static unsigned char checkbox_gray[] =
static unsigned char checkbox_gray[] =
{ b_______,
b_______,
b__XXXXX,
@@ -984,7 +984,7 @@ static unsigned char checkbox_gray[] =
b__XXXXX,
b_______ };
/*
static unsigned char selector_left[] =
static unsigned char selector_left[] =
{ b___X___,
b___XX__,
b___XXX_,
@@ -993,7 +993,7 @@ static unsigned char selector_left[] =
b___XX__,
b___X___,
b_______ };
static unsigned char selector_right[] =
static unsigned char selector_right[] =
{ b_____X_,
b____XX_,
b___XXX_,
@@ -1002,7 +1002,7 @@ static unsigned char selector_right[] =
b____XX_,
b_____X_,
b_______ };
static unsigned char ellipsis[] =
static unsigned char ellipsis[] =
{ b_______,
b_______,
b_______,
@@ -1011,8 +1011,8 @@ static unsigned char ellipsis[] =
b_______,
b__X_X_X,
b_______ };
*/
static unsigned char block_filled[] =
*/
static unsigned char block_filled[] =
{ b__XXXXX,
b__XXXXX,
b__XXXXX,
+1 -1
View File
@@ -109,7 +109,7 @@ typedef struct IOWarrior_private_data {
/* lastline controls the use of the last line, if pixel addressable (true, default) or */
/* underline effect (false). To avoid the underline effect in the latter case, the last */
/* line is always zeroed for whatever redefined character */
char lastline;
char lastline;
/* extended mode for some half-compatible modules */
int ext_mode;
+6 -6
View File
@@ -2,7 +2,7 @@
* LCDd \c MD8800 driver for the CFD used in Medion MD8800 PCs.
*/
/*
/*
Copyright (C) 2006 Stefan Herdler in collaboration with Martin Møller.
This source Code is based on the NoritakeVFD, the serialVFD and the
@@ -42,9 +42,9 @@
\33\5 - Show clock
\33\40 - 2-line mode, clearing at end of last line.
\33\41 - Only write to line1, no clearing,
\33\41 - Only write to line1, no clearing,
automatic scroll to the left when display is full.
\33\42 - Only write to line2, no clearing,
\33\42 - Only write to line2, no clearing,
automatic scroll to the left when display is full.
(d is in the range 0-4. Anything above 4 is full brightness, b = 0/1):
@@ -248,7 +248,7 @@ MD8800_init (Driver *drvthis)
p->hw_brightness = 6;
debug(RPT_INFO, "%s(%p)", __FUNCTION__, drvthis);
/* Read config file */
/* Which device should be used */
strncpy(p->device, drvthis->config_get_string(drvthis->name, "Device", 0, DEFAULT_DEVICE), sizeof(p->device));
@@ -313,7 +313,7 @@ MD8800_init (Driver *drvthis)
report(RPT_ERR, "%s: open() of %s failed (%s)", drvthis->name, p->device, strerror(errno));
return -1;
}
tcgetattr(p->fd, &portset);
// We use RAW mode
@@ -336,7 +336,7 @@ MD8800_init (Driver *drvthis)
// Do it...
tcsetattr(p->fd, TCSANOW, &portset);
/* make sure the frame buffer is there... */
p->framebuf = (unsigned char *) malloc(p->width * p->height);
if (p->framebuf == NULL) {
+2 -2
View File
@@ -28,7 +28,7 @@ IOWarrior_CFLAGS = @LIBUSB_CFLAGS@ $(AM_CFLAGS)
hd44780_CFLAGS = @LIBUSB_CFLAGS@ @LIBFTDI_CFLAGS@ $(AM_CFLAGS)
g15_CFLAGS = @LIBUSB_CFLAGS@ $(AM_CFLAGS)
lis_CFLAGS = @LIBUSB_CFLAGS@ @LIBFTDI_CFLAGS@ $(AM_CFLAGS)
picolcd_CFLAGS = @LIBUSB_CFLAGS@ $(AM_CFLAGS)
picolcd_CFLAGS = @LIBUSB_CFLAGS@ $(AM_CFLAGS)
shuttleVFD_CFLAGS = @LIBUSB_CFLAGS@ $(AM_CFLAGS)
ula200_CFLAGS = @LIBFTDI_CFLAGS@ $(AM_CFLAGS)
i2500vfd_CFLAGS = @LIBFTDI_CFLAGS@ $(AM_CFLAGS)
@@ -70,7 +70,7 @@ xosd_LDADD = @LIBXOSD@ libbignum.a
i2500vfd_LDADD = @LIBFTDI_LIBS@
libLCD_a_SOURCES = lcd_lib.h lcd_lib.c
libbignum_a_SOURCES = adv_bignum.h adv_bignum.c
libbignum_a_SOURCES = adv_bignum.h adv_bignum.c
bayrad_SOURCES = lcd.h lcd_lib.h bayrad.h bayrad.c report.h
CFontz_SOURCES = lcd.h lcd_lib.h CFontz.c CFontz.h CFontz-charmap.h report.h adv_bignum.h
+9 -9
View File
@@ -2,7 +2,7 @@
* LCDd \c NoritakeVFD driver for the Noritake VFD Device CU20045SCPB-T28A.
*/
/*
/*
Copyright (C) 2005 Simon Funke
Copyright (C) 2007 Richard Muratti ricacho@gmail.com
Copyright (C) 2007 Peter Marschall
@@ -11,14 +11,14 @@
2005-08-01 Version 0.1: mostly everything should work (vbar, hbar never tested)
2007-09-16 Version 0.2:
2007-09-16 Version 0.2:
- Fixed vbar & hbar - Allowed for displays with 2 custom characters
- Fixed cursor off - 16H - Data sheet for CU20045SCPB has error -> Cursor Off 14,16,17H
- Tested with CU40026SCPB-T20A - 40x2 - Hardware Defaults to 19200 8E1
- Added new config parameter [Parity] to set serial data parity 0(none),1(odd),2(even)
- Added config parameter OffBrightness
- added support for big numbers
CU40026SCPB-T20A SOFTWARE COMMANDS
Back Space 08H International Font 18H
Horizontal Tab 09H Katakana Font 19H
@@ -30,7 +30,7 @@
Vertical Scroll Mode 12H Flickerless Write +53H
Underline Cursor On 14H Cursor Blink Speed +54H
5x7 Block Cursor On 15H Character Data 20H+
Cursor Off 16H User Character Data 00H+
Cursor Off 16H User Character Data 00H+
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
@@ -231,7 +231,7 @@ NoritakeVFD_init (Driver *drvthis)
portset.c_lflag &= ~( ECHO | ECHONL | ICANON | ISIG | IEXTEN );
portset.c_cflag &= ~( CSIZE | PARENB | CRTSCTS );
portset.c_cflag |= CS8 | CREAD | CLOCAL | p->parity;
#endif
#endif
// Set port speed
cfsetospeed(&portset, p->speed);
@@ -372,7 +372,7 @@ NoritakeVFD_flush (Driver *drvthis)
NoritakeVFD_cursor_goto(drvthis, 1, i+1);
write(p->fd, p->framebuf+offset, p->width);
}
}
}
}
@@ -474,7 +474,7 @@ NoritakeVFD_vbar (Driver *drvthis, int x, int y, int len, int promille, int opti
/* define half full block at position 1 */
NoritakeVFD_set_char(drvthis, 1, half);
}
}
for (pos = 0; pos < len; pos++) {
/* if pixels > 2/3 cellheight [in integer arithmetics] ... */
@@ -532,7 +532,7 @@ NoritakeVFD_hbar (Driver *drvthis, int x, int y, int len, int promille, int opti
/* define half full block at position 1 */
NoritakeVFD_set_char(drvthis, 1, half);
}
}
for (pos = 0; pos < len; pos++) {
/* if pixels > 2/3 cellwidth [in integer arithmetics] ... */
@@ -645,7 +645,7 @@ NoritakeVFD_icon (Driver *drvthis, int x, int y, int icon)
* \param state New cursor state.
*/
/*
MODULE_EXPORT void
MODULE_EXPORT void
CFontzPacket_cursor (Driver *drvthis, int x, int y, int state)
{
PrivateData *p = drvthis->private_data;
+1 -1
View File
@@ -56,5 +56,5 @@ MODULE_EXPORT int NoritakeVFD_get_brightness(Driver *drvthis, int state);
MODULE_EXPORT void NoritakeVFD_set_brightness(Driver *drvthis, int state, int promille);
MODULE_EXPORT void NoritakeVFD_backlight (Driver *drvthis, int on);
#endif
#endif
+1 -1
View File
@@ -1,6 +1,6 @@
UNDERSTANDING LCDPROC DRIVERS
LCDproc drivers are compiled as modules that will be loaded by the
LCDproc drivers are compiled as modules that will be loaded by the
LCDd daemon's core on request.
To understand how to write a driver see docs/API-0.5.txt or the
+3 -3
View File
@@ -11,17 +11,17 @@
/*
* Copyright (C) 2009, Laurent Latil
*
*
* 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
+2 -2
View File
@@ -57,7 +57,7 @@ typedef struct bayrad_private_data {
int cellheight;
char *framebuf;
char ccmode;
} PrivateData;
} PrivateData;
// Vars for the server core
@@ -189,7 +189,7 @@ bayrad_close(Driver *drvthis)
if (p->fd >= 0) {
write(p->fd, "\x8e\x00", 2); // Backlight OFF
close(p->fd);
}
}
if (p->framebuf != NULL)
free(p->framebuf);
+5 -5
View File
@@ -3,10 +3,10 @@
/****************************************************************
* Character elements
*
*
* 0 = キキ 1 = キキ 2 = キX 3 = Xキ S = キキ
* Xキ キX キキ キキ キキ
*
*
* 4 = キキ 5 = XX 6 = Xキ 7 = XX F = XX
* XX キキ XX Xキ XX
*/
@@ -671,7 +671,7 @@ int normal[96][3*4] = {
4,F,4,
S,7,S,
S,S,S,
}, //
}, //
{
S,S,S,
S,S,S,
@@ -1180,7 +1180,7 @@ int normal[96][3*4] = {
};
/* Here start the 8 basic block used above and named 0-7 */
/*
/*
static unsigned bigfont[8][8] = {
{ b_______, // char a[]
b_______,
@@ -1247,6 +1247,6 @@ int normal[96][3*4] = {
b__XX___,
b__X____ }
};
*/
*/
#endif
+2 -2
View File
@@ -367,7 +367,7 @@ curses_clear (Driver *drvthis)
/**
* Turn the LCD backlight on or off.
* This is simulated by changing the background
* This is simulated by changing the background
* colour of the characters displayed.
* \param drvthis Pointer to driver structure.
* \param on New backlight status.
@@ -461,7 +461,7 @@ MODULE_EXPORT void
curses_vbar (Driver *drvthis, int x, int y, int len, int promille, int options)
{
PrivateData *p = drvthis->private_data;
// map
// map
char ACS_map[] = { ACS_S9, ACS_S9, ACS_S7, ACS_S7, ACS_S3, ACS_S3, ACS_S1, ACS_S1 };
char ascii_map[] = { ' ', ' ', '-', '-', '=', '=', '#', '#' };
char *map = (p->useACS) ? ACS_map : ascii_map;
+1 -1
View File
@@ -81,7 +81,7 @@ EA65_init (Driver *drvthis)
PrivateData *p;
debug(RPT_INFO, "EA65: init(%p)", drvthis);
p = (PrivateData *) malloc(sizeof(PrivateData));
if (p == NULL)
return -1;
+3 -3
View File
@@ -1,11 +1,11 @@
#define G15_BIGNUM_LEN 1032
/*
* This data should really be inverted so that 1=black
/*
* This data should really be inverted so that 1=black
* but, for now, make sure to set canvas->mode_reverse
* before drawing one of these overlays.
*/
short g15_bignum_data[11][G15_BIGNUM_LEN] = {
{ /* 0 */
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+33 -33
View File
@@ -2,7 +2,7 @@
* LCDd \c g15 driver for the LCD on the Logitech G15 keyboard.
*/
/*
/*
Copyright (C) 2006 Anthony J. Mirabella.
2006-07-23 Version 1.0: Most functions should be implemented and working
@@ -80,28 +80,28 @@ MODULE_EXPORT int g15_init (Driver *drvthis)
report(RPT_ERR, "%s: Sorry, cant connect to the G15daemon", drvthis->name);
return -1;
}
/* make sure the canvas is there... */
p->canvas = (g15canvas *) malloc(sizeof(g15canvas));
if (p->canvas == NULL) {
report(RPT_ERR, "%s: unable to create canvas", drvthis->name);
return -1;
}
/* make sure the backingstore is there... */
p->backingstore = (g15canvas *) malloc(sizeof(g15canvas));
if (p->backingstore == NULL) {
report(RPT_ERR, "%s: unable to create framebuffer backing store", drvthis->name);
return -1;
}
g15r_initCanvas(p->canvas);
g15r_initCanvas(p->backingstore);
p->canvas->buffer[0] = G15_LCD_WRITE_CMD;
p->backingstore->buffer[0] = G15_LCD_WRITE_CMD;
// ret = setLCDBrightness(G15_BRIGHTNESS_BRIGHT);
return 0;
}
@@ -110,13 +110,13 @@ MODULE_EXPORT int g15_init (Driver *drvthis)
MODULE_EXPORT void g15_close (Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
g15_close_screen(p->g15screen_fd);
if (p != NULL) {
if (p->canvas)
free(p->canvas);
if (p->backingstore)
free(p->backingstore);
@@ -190,12 +190,12 @@ MODULE_EXPORT void g15_flush (Driver *drvthis)
MODULE_EXPORT void g15_chr (Driver *drvthis, int x, int y, char c)
{
PrivateData *p = drvthis->private_data;
y--;
x--;
if ((x > p->width) || (y > p->height))
return;
g15r_renderCharacterLarge(p->canvas, x, y, c, 0, 0);
}
@@ -222,10 +222,10 @@ MODULE_EXPORT void g15_string (Driver *drvthis, int x, int y, const char string[
MODULE_EXPORT int g15_icon (Driver *drvthis, int x, int y, int icon)
{
PrivateData *p = drvthis->private_data;
x--;
y--;
switch (icon) {
case ICON_BLOCK_FILLED:
{
@@ -331,25 +331,25 @@ MODULE_EXPORT int g15_icon (Driver *drvthis, int x, int y, int icon)
default:
return -1; /* Let the core do other icons */
}
return 0;
}
// Draws a horizontal bar growing to the right
//
//
MODULE_EXPORT void g15_hbar(Driver *drvthis, int x, int y, int len, int promille, int options)
{
PrivateData *p = drvthis->private_data;
x--;
y--;
int total_pixels = ((long) 2 * len * p->cellwidth + 1) * promille / 2000;
int px1 = x * p->cellwidth;
int py1 = y * p->cellheight;
int px2 = px1 + total_pixels;
int py2 = py1 + (p->cellheight - 2);
g15r_pixelBox(p->canvas, px1, py1, px2, py2, G15_COLOR_BLACK, 1, G15_PIXEL_FILL);
}
@@ -358,17 +358,17 @@ MODULE_EXPORT void g15_hbar(Driver *drvthis, int x, int y, int len, int promille
MODULE_EXPORT void g15_vbar(Driver *drvthis, int x, int y, int len, int promille, int options)
{
PrivateData *p = drvthis->private_data;
x--;
int total_pixels = ((long) 2 * len * p->cellwidth + 1) * promille / 2000;
int px1 = x * p->cellwidth;
int py1 = y * p->cellheight - total_pixels;
int px2 = px1 + (p->cellwidth - 2);
int py2 = py1 + total_pixels;
g15r_pixelBox(p->canvas, px1, py1, px2, py2, G15_COLOR_BLACK, 1, G15_PIXEL_FILL);
}
// Return one char from the Keyboard
@@ -387,7 +387,7 @@ MODULE_EXPORT const char * g15_get_key (Driver *drvthis)
FD_ZERO(&fds);
FD_SET(p->g15screen_fd, &fds);
toread = select(FD_SETSIZE, &fds, NULL, NULL, &tv);
}
else
@@ -399,7 +399,7 @@ MODULE_EXPORT const char * g15_get_key (Driver *drvthis)
}
toread = 1;
}
if (toread >= 1)
read(p->g15screen_fd, &key_state, sizeof(key_state));
else
@@ -426,14 +426,14 @@ MODULE_EXPORT const char * g15_get_key (Driver *drvthis)
MODULE_EXPORT void g15_backlight(Driver *drvthis, int on)
{
PrivateData *p = drvthis->private_data;
if (p->backlight_state == on)
return;
p->backlight_state = on;
char msgbuf[256];
switch (on) {
case BACKLIGHT_ON:
{
@@ -447,7 +447,7 @@ MODULE_EXPORT void g15_backlight(Driver *drvthis, int on)
send(p->g15screen_fd,msgbuf,1,MSG_OOB);
break;
}
default:
default:
{
break;
}
@@ -457,23 +457,23 @@ MODULE_EXPORT void g15_backlight(Driver *drvthis, int on)
MODULE_EXPORT void g15_num(Driver *drvthis, int x, int num)
{
PrivateData *p = drvthis->private_data;
x--;
int ox = x * p->cellwidth;
if ((num < 0) || (num > 10))
return;
int width = 0;
int height = 43;
if ((num >= 0) && (num <=9))
width = 24;
else
width = 9;
int i=0;
for (i=0;i<(width*height);++i)
{
int color = (g15_bignum_data[num][i] ? G15_COLOR_WHITE : G15_COLOR_BLACK);
+3 -3
View File
@@ -104,7 +104,7 @@ MODULE_EXPORT int glcdlib_init (Driver *drvthis)
|| (nCfgTextRows <= 0) || (nCfgTextRows > LCD_MAX_HEIGHT))
{
report(RPT_WARNING,
"%s: cannot read or invalid TextResolution: %s; using default %s",
"%s: cannot read or invalid TextResolution: %s; using default %s",
drvthis->name, strTextRes, strTextResDefault);
sscanf(strTextResDefault, "%dx%d", &nCfgTextWidth, &nCfgTextRows);
}
@@ -144,7 +144,7 @@ MODULE_EXPORT int glcdlib_init (Driver *drvthis)
"%s: cannot read or invalid MinFontFaceSize: %s; using default %s",
drvthis->name, strMinFontFaceSize, strMinFaceSizeDef);
sscanf(strMinFaceSizeDef, "%dx%d", &nCfgMinFontFaceWidth, &nCfgMinFontFaceHeight);
}
}
// show debugging frame?
bool bShowDbgFrame = drvthis->config_get_bool(drvthis->name, "ShowDebugFrame", 0, true);
@@ -212,7 +212,7 @@ glcdlib_close (Driver *drvthis)
pPD->glcdDriver = NULL;
free(pPD);
}
}
drvthis->store_private_ptr(drvthis, NULL);
}
+3 -3
View File
@@ -266,11 +266,11 @@ glk_close(Driver *drvthis)
if (p->framebuf != NULL)
free(p->framebuf);
p->framebuf = NULL;
p->framebuf = NULL;
if (p->backingstore != NULL)
free(p->backingstore);
p->backingstore = NULL;
p->backingstore = NULL;
free(p);
}
@@ -613,7 +613,7 @@ glk_num(Driver *drvthis, int x, int num)
if ((x > 0) && (x <= p->width))
p->framebuf[x-1] = (num >= 10) ? ':' : (num + '0');
*/
*/
}
+1 -1
View File
@@ -159,7 +159,7 @@ hd_init_bwct_usb(Driver *drvthis)
#if defined(LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP)
report(RPT_WARNING, "hd_init_bwct_usb: interface may be claimed by "
"kernel driver, attempting to detach it");
errno = 0;
if ((usb_detach_kernel_driver_np(p->usbHandle, p->usbIndex) < 0) ||
(usb_claim_interface(p->usbHandle, p->usbIndex) < 0)) {
+3 -3
View File
@@ -120,7 +120,7 @@ const unsigned char HD44780_charmap[] = {
/*
* Table for HD44780 controller with ROM mask supporting
* the european charset (ROM code A02).
*
*
* Replacements:
* 160 => 32, 168 => 34, 180 => 39, 184 => 44
*/
@@ -165,7 +165,7 @@ const unsigned char HD44780_euro_charmap[] = {
232, 233, 234, 235, 236, 237, 238, 239,
240, 241, 242, 243, 244, 245, 246, 247,
248, 249, 250, 251, 252, 253, 254, 255
};
};
/*
@@ -283,7 +283,7 @@ const unsigned char SED1278F_0B_charmap[] = {
/*
* Table for HD44780 controller with ROM mask supporting
* the european charset (ROM code A02).
*
*
* Russian KOI8-R codepage as input, comments in KOI8-R.
*/
const unsigned char HD44780_KOI8R_charmap[] = {
+1 -1
View File
@@ -20,7 +20,7 @@
#include "hd44780-low.h"
#include "shared/sockets.h"
#include "report.h"
#include <stdio.h>
#include <string.h>
#include <limits.h>
+1 -1
View File
@@ -7,7 +7,7 @@
* connected to a FT2232C/D chip in 8 bit mode.
*
* Copyright (c) 2007, Intra2net AG <opensource@intra2net.com>
*
*
* Modified February 2008 by Ismail Ibrahim <whirleyes@gmail.com> to
* add support for single channel FTDI chip with 4 bit wiring mode.
*
+1 -1
View File
@@ -28,7 +28,7 @@
* Configuration:
* device=/dev/i2c-0 # the device file of the i2c bus
* port=0x20 # the i2c address of the i2c port expander
*
*
* Attention: Bit 8 of the address given in port is special:
* It tells the driver to treat the device as PCA9554 or similar,
* a device that needs a 2-byte command, and it will be stripped
+2 -2
View File
@@ -7,7 +7,7 @@
/*-
* Copyright (C) 2007 Peter Marschall <peter@adpm.de>
* 2007,2009 Markus Dolze
*
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*/
@@ -91,7 +91,7 @@ hd_init_lcd2usb(Driver *drvthis)
if ((dev->descriptor.idVendor == LCD2USB_VENDORID) &&
(dev->descriptor.idProduct == LCD2USB_PRODUCTID)) {
/*
/*
* LCD2USB device found; try to find its
* description
*/
+3 -3
View File
@@ -226,7 +226,7 @@ static unsigned char rowNum = 0;
// extract character to set from given info
charNum = (ch & ~SETCHAR) / 8;
// offset it by one to avoid collisions with command prefix
// offset it by one to avoid collisions with command prefix
// TODO: check if this is correct
charNum++;
@@ -234,7 +234,7 @@ static unsigned char rowNum = 0;
// TODO: check if this is correct
if (charNum == 8)
charNum = 7;
}
}
// MPlay devices don't need the char num;
// they always set all custom characters
@@ -280,7 +280,7 @@ static void gotoXY(int fd, unsigned char x, unsigned char y)
/**
* Set a custom character, valid on MPlay devices only.
* \param fd File handle to write to.
* \param chars Pixel definition of all custom chars.
* \param chars Pixel definition of all custom chars.
*/
static void setMPlayCustomChars(int fd, CGram *chars)
{
+4 -4
View File
@@ -104,9 +104,9 @@ typedef struct hd44780_private_data {
// serial connection types
int fd; /* file handle to serial device */
int serial_type;
int serial_type;
#if defined(HAVE_LIBUSB)
#if defined(HAVE_LIBUSB)
// USB connection types
usb_dev_handle *usbHandle; /* USB device handle */
int usbIndex; /* USB interface index */
@@ -168,7 +168,7 @@ typedef struct hd44780_private_data {
// its bus to LPT port
char lastline; // lastline controls the use of the last line, if pixel addressable (true, default) or
// underline effect (false). To avoid the underline effect, last line is always zeroed
// for whatever redefined character
// for whatever redefined character
// keyMapDirect contains an array of the ascii-codes that should be generated
// when a directly connected key is pressed (not in matrix).
@@ -193,7 +193,7 @@ typedef struct hd44780_private_data {
int keepalivedisplay; // When >0 refresh upper left char every <keepalivedisplay> seconds to keep display alive
int output_state; // what was most recently output to the output port
int contrast; // Contrast setting (range 0 - 1000)
int brightness; // Brightness when backlight is "on" (range 0 - 1000)
int offbrightness; // Brightness when backlight is "off" (range 0 - 1000)
+2 -2
View File
@@ -8,10 +8,10 @@
/*
* Copyright (C) 2002 Adams IT Services <info@usblcd.de>
*
*
* This driver is based on pic-an-lcd driver. See file hd44780-serial.c for
* additional Copyrights.
*
*
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
+28 -28
View File
@@ -12,15 +12,15 @@
*
* This is a uss720 driver module for Hitachi HD44780 based LCD displays
* connected to a uss720 USB-to-IEEE 1284 Bridge chip in 8 bit mode.
* The uss720 chip is found in many (but not all)
* The uss720 chip is found in many (but not all)
* Belkin F5U002 USB->parallel printer adapters.
*
* Applicable Data Sheets:
* - http://digilander.libero.it/demarchidaniele/qcamvc/uss-720.pdf
*
*
* Wiring is same as winamp connection.
* Uncomment //#define USS720_MAC_USB_LCD_KIT_WIRING 1 below to use a
* Mac USB LCD Kit instead.
* Uncomment //#define USS720_MAC_USB_LCD_KIT_WIRING 1 below to use a
* Mac USB LCD Kit instead.
*
*/
@@ -133,41 +133,41 @@ hd_init_uss720(Driver *drvthis)
/* load config */
vendor_id = drvthis->config_get_int(drvthis->name, "VendorID", 0, 0x1293);
product_id = drvthis->config_get_int(drvthis->name, "ProductID", 0, 0x0002);
/* Hardware Init */
/* try to find USB device */
usb_init();
usb_find_busses();
usb_find_devices();
p->usbHandle = NULL;
p->usbIndex = 0;
for (bus = usb_get_busses(); bus != NULL; bus = bus->next) {
struct usb_device *dev;
for (dev = bus->devices; dev != NULL; dev = dev->next) {
/* Check if this device is a uss720 device */
if (dev->descriptor.idVendor != vendor_id || dev->descriptor.idProduct != product_id) {
continue;
}
/* uss720 device found; try to open it */
p->usbHandle = usb_open(dev);
if (p->usbHandle == NULL) {
report(RPT_WARNING, "hd_init_uss720: unable to open device");
continue;
}
debug(RPT_DEBUG, "hd_init_uss720: opening device succeeded");
errno = 0;
if (usb_claim_interface(p->usbHandle, p->usbIndex) < 0) {
#if defined(LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP)
report(RPT_WARNING, "hd_init_uss720: interface may be claimed by "
"kernel driver, attempting to detach it");
errno = 0;
if ((usb_detach_kernel_driver_np(p->usbHandle, p->usbIndex) < 0) ||
(usb_claim_interface(p->usbHandle, p->usbIndex) < 0)) {
@@ -184,7 +184,7 @@ hd_init_uss720(Driver *drvthis)
#endif
}
/* Use the alternate, vendor-specific, interface so we have access to the registers */
errno = usb_set_altinterface(p->usbHandle, 2);
if (errno) {
report(RPT_WARNING, "hd_init_uss720: unable to set alt interface: %s", strerror(errno));
@@ -200,7 +200,7 @@ hd_init_uss720(Driver *drvthis)
/* init the HD44780 LCD */
common_init(p, IF_8BIT);
return 0;
}
}
@@ -225,17 +225,17 @@ uss720_HD44780_senddata(PrivateData *p, unsigned char displayID, unsigned char f
portControl = RS; /* enable RS for data */
else
portControl = 0; /* disable RS for instruction */
portControl |= VCC; /* keep the power on */
portControl |= p->backlight_bit;
if (displayID == 0)
enableLines = EnMask[0]
enableLines = EnMask[0]
| ((p->have_backlight) ? 0 : EnMask[1])
| ((p->numDisplays == 3) ? EnMask[2] : 0);
else
enableLines = EnMask[displayID - 1];
uss720_set_1284_register(p->usbHandle, ControlRegAdr, portControl ^ OUTMASK);
uss720_set_1284_register(p->usbHandle, DataRegAdr, ch);
@@ -243,7 +243,7 @@ uss720_HD44780_senddata(PrivateData *p, unsigned char displayID, unsigned char f
uss720_set_1284_register(p->usbHandle, ControlRegAdr, (portControl | enableLines ) ^ OUTMASK);
p->hd44780_functions->uPause(p, 1);
uss720_set_1284_register(p->usbHandle, ControlRegAdr, portControl ^ OUTMASK);
}
@@ -303,13 +303,13 @@ uss720_get_1284_register(usb_dev_handle *usbHandle, unsigned int regIndex, unsig
/* Data */ (char *)regData,
/* wLength */ 7,
10000 );
if (res) {
} else if (value && (regIndex < 8)) {
*value = regData[(int)regIndex];
}
return res;
}
@@ -332,7 +332,7 @@ uss720_set_1284_register(usb_dev_handle *usbHandle, unsigned int regAddress, uns
#pragma mark -Extended Methods
int
uss720_set_1284_mode(usb_dev_handle *usbHandle, unsigned int mode)
uss720_set_1284_mode(usb_dev_handle *usbHandle, unsigned int mode)
{
unsigned char regByte = 0x00;
int res = 0;
@@ -340,15 +340,15 @@ uss720_set_1284_mode(usb_dev_handle *usbHandle, unsigned int mode)
res = uss720_get_1284_register(usbHandle, 3, &regByte);
regByte &= ~0x01;
res = uss720_set_1284_register(usbHandle, 7, regByte);
if (res) return res;
res = uss720_get_1284_register(usbHandle, 2, &regByte);
regByte &= ~(mode<<5); /* Mask off the mode bits 7-5. */
regByte &= ~(mode<<5); /* Mask off the mode bits 7-5. */
regByte |= (mode<<5); /* Set the mode bits 7-5. */
return uss720_set_1284_register(usbHandle, 6, regByte);
}
+23 -23
View File
@@ -67,7 +67,7 @@
#define KEYPAD_AUTOREPEAT_DELAY 500
#define KEYPAD_AUTOREPEAT_FREQ 15
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
@@ -276,7 +276,7 @@ HD44780_init(Driver *drvthis)
if (timing_init() == -1) {
report(RPT_ERR, "%s: timing_init() failed (%s)", drvthis->name, strerror(errno));
return -1;
}
}
#if defined DELAY_NANOSLEEP
// Change to Round-Robin scheduling for nanosleep
@@ -399,7 +399,7 @@ HD44780_init(Driver *drvthis)
report(RPT_ERR, "%s: incomplete functions for connection type",
drvthis->name);
return -1;
}
}
// set scankeypad function if local readkeypad function is defined
if ((p->hd44780_functions->readkeypad != NULL) &&
@@ -538,7 +538,7 @@ HD44780_close(Driver *drvthis)
free(p->backingstore);
free(p);
}
}
drvthis->store_private_ptr(drvthis, NULL);
}
@@ -710,7 +710,7 @@ HD44780_flush(Driver *drvthis)
}
}
if (p->hd44780_functions->flush != NULL)
p->hd44780_functions->flush(p);
p->hd44780_functions->flush(p);
debug(RPT_DEBUG, "%s: flushed %d custom chars", drvthis->name, count);
}
@@ -879,7 +879,7 @@ HD44780_backlight(Driver *drvthis, int on)
if (p->hd44780_functions->backlight != NULL)
p->hd44780_functions->backlight(p, on);
p->backlightstate = on;
}
@@ -1047,7 +1047,7 @@ HD44780_set_char(Driver *drvthis, int n, unsigned char *dat)
int letter = 0;
if (p->lastline || (row < p->cellheight - 1))
letter = dat[row] & mask;
letter = dat[row] & mask;
if (p->cc[n].cache[row] != letter)
p->cc[n].clean = 0; /* only mark dirty if really different */
@@ -1068,7 +1068,7 @@ HD44780_set_char(Driver *drvthis, int n, unsigned char *dat)
MODULE_EXPORT int
HD44780_icon(Driver *drvthis, int x, int y, int icon)
{
static unsigned char heart_open[] =
static unsigned char heart_open[] =
{ b__XXXXX,
b__X_X_X,
b_______,
@@ -1077,7 +1077,7 @@ HD44780_icon(Driver *drvthis, int x, int y, int icon)
b__X___X,
b__XX_XX,
b__XXXXX };
static unsigned char heart_filled[] =
static unsigned char heart_filled[] =
{ b__XXXXX,
b__X_X_X,
b___X_X_,
@@ -1086,7 +1086,7 @@ HD44780_icon(Driver *drvthis, int x, int y, int icon)
b__X_X_X,
b__XX_XX,
b__XXXXX };
static unsigned char arrow_up[] =
static unsigned char arrow_up[] =
{ b____X__,
b___XXX_,
b__X_X_X,
@@ -1095,7 +1095,7 @@ HD44780_icon(Driver *drvthis, int x, int y, int icon)
b____X__,
b____X__,
b_______ };
static unsigned char arrow_down[] =
static unsigned char arrow_down[] =
{ b____X__,
b____X__,
b____X__,
@@ -1105,7 +1105,7 @@ HD44780_icon(Driver *drvthis, int x, int y, int icon)
b____X__,
b_______ };
/*
static unsigned char arrow_left[] =
static unsigned char arrow_left[] =
{ b_______,
b____X__,
b___X___,
@@ -1114,7 +1114,7 @@ HD44780_icon(Driver *drvthis, int x, int y, int icon)
b____X__,
b_______,
b_______ };
static unsigned char arrow_right[] =
static unsigned char arrow_right[] =
{ b_______,
b____X__,
b_____X_,
@@ -1124,7 +1124,7 @@ HD44780_icon(Driver *drvthis, int x, int y, int icon)
b_______,
b_______ };
*/
static unsigned char checkbox_off[] =
static unsigned char checkbox_off[] =
{ b_______,
b_______,
b__XXXXX,
@@ -1133,7 +1133,7 @@ HD44780_icon(Driver *drvthis, int x, int y, int icon)
b__X___X,
b__XXXXX,
b_______ };
static unsigned char checkbox_on[] =
static unsigned char checkbox_on[] =
{ b____X__,
b____X__,
b__XXX_X,
@@ -1142,7 +1142,7 @@ HD44780_icon(Driver *drvthis, int x, int y, int icon)
b__X___X,
b__XXXXX,
b_______ };
static unsigned char checkbox_gray[] =
static unsigned char checkbox_gray[] =
{ b_______,
b_______,
b__XXXXX,
@@ -1152,7 +1152,7 @@ HD44780_icon(Driver *drvthis, int x, int y, int icon)
b__XXXXX,
b_______ };
/*
static unsigned char selector_left[] =
static unsigned char selector_left[] =
{ b___X___,
b___XX__,
b___XXX_,
@@ -1161,7 +1161,7 @@ HD44780_icon(Driver *drvthis, int x, int y, int icon)
b___XX__,
b___X___,
b_______ };
static unsigned char selector_right[] =
static unsigned char selector_right[] =
{ b_____X_,
b____XX_,
b___XXX_,
@@ -1170,7 +1170,7 @@ HD44780_icon(Driver *drvthis, int x, int y, int icon)
b____XX_,
b_____X_,
b_______ };
static unsigned char ellipsis[] =
static unsigned char ellipsis[] =
{ b_______,
b_______,
b_______,
@@ -1179,8 +1179,8 @@ HD44780_icon(Driver *drvthis, int x, int y, int icon)
b_______,
b__X_X_X,
b_______ };
*/
static unsigned char block_filled[] =
*/
static unsigned char block_filled[] =
{ b__XXXXX,
b__XXXXX,
b__XXXXX,
@@ -1312,7 +1312,7 @@ HD44780_get_key(Driver *drvthis)
* - excluding one for EN1, 5 status pins).
*
* Note that a connection type may support even less rows/columns!
*
*
* \param p Pointer to PrivateData structure.
* \return Scancode of the key.
*/
@@ -1416,7 +1416,7 @@ HD44780_output(Driver *drvthis, int on)
p->output_state = on;
// call output function only if it is defined for the commenction type
// call output function only if it is defined for the commenction type
if (p->hd44780_functions->output != NULL)
p->hd44780_functions->output(p, on);
}
+1 -1
View File
@@ -167,7 +167,7 @@ icp_a106_close (Driver *drvthis)
close(p->fd);
}
free(p);
}
}
drvthis->store_private_ptr(drvthis, NULL);
report(RPT_INFO, "%s: closed", drvthis->name);
+27 -27
View File
@@ -106,7 +106,7 @@ typedef struct imonlcd_private_data {
int backlightOn; /* stores the backlight state */
/*
* 0 = two disc-segments spinning as default, 1 = their complement
* 0 = two disc-segments spinning as default, 1 = their complement
* spinning
*/
int discMode;
@@ -266,7 +266,7 @@ static void send_packet(PrivateData *p);
* \retval 0 Success.
* \retval <0 Error.
*/
MODULE_EXPORT int
MODULE_EXPORT int
imonlcd_init(Driver *drvthis)
{
PrivateData *p = NULL;
@@ -433,7 +433,7 @@ imonlcd_init(Driver *drvthis)
* Send the "initialize" commands to the screen.
* \param drvthis Pointer to driver structure.
*/
static void
static void
imonlcd_display_init(Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
@@ -458,7 +458,7 @@ imonlcd_display_init(Driver *drvthis)
* Close the driver (do necessary clean-up).
* \param drvthis Pointer to driver structure.
*/
MODULE_EXPORT void
MODULE_EXPORT void
imonlcd_close(Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
@@ -539,7 +539,7 @@ imonlcd_get_info(Driver *drvthis)
* Clear the screen.
* \param drvthis Pointer to driver structure.
*/
MODULE_EXPORT void
MODULE_EXPORT void
imonlcd_clear(Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
@@ -552,7 +552,7 @@ imonlcd_clear(Driver *drvthis)
* Flush data on screen to the LCD.
* \param drvthis Pointer to driver structure.
*/
MODULE_EXPORT void
MODULE_EXPORT void
imonlcd_flush(Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
@@ -592,7 +592,7 @@ imonlcd_flush(Driver *drvthis)
* \param y Vertical character position (row).
* \param string String that gets written.
*/
MODULE_EXPORT void
MODULE_EXPORT void
imonlcd_string(Driver *drvthis, int x, int y, const char string[])
{
int i;
@@ -610,7 +610,7 @@ imonlcd_string(Driver *drvthis, int x, int y, const char string[])
* \param y Vertical character position (row).
* \param ch Character that gets written. (ISO 8859-1 + special characters)
*/
MODULE_EXPORT void
MODULE_EXPORT void
imonlcd_chr(Driver *drvthis, int x, int y, char ch)
{
PrivateData *p = drvthis->private_data;
@@ -643,7 +643,7 @@ imonlcd_chr(Driver *drvthis, int x, int y, char ch)
* \param promille Current height level of the bar in promille.
* \param options Options (currently unused).
*/
MODULE_EXPORT void
MODULE_EXPORT void
imonlcd_vbar(Driver *drvthis, int x, int y, int len, int promille, int options)
{
PrivateData *p = drvthis->private_data;
@@ -666,7 +666,7 @@ imonlcd_vbar(Driver *drvthis, int x, int y, int len, int promille, int options)
* \param promille Current length level of the bar in promille (i.e. from 0 to 1000).
* \param options Options (currently unused).
*/
MODULE_EXPORT void
MODULE_EXPORT void
imonlcd_hbar(Driver *drvthis, int x, int y, int len, int promille, int options)
{
PrivateData *p = drvthis->private_data;
@@ -709,7 +709,7 @@ imonlcd_hbar(Driver *drvthis, int x, int y, int len, int promille, int options)
* \retval 0 Icon has been successfully defined/written.
* \retval <0 Server core shall define/write the icon.
*/
MODULE_EXPORT int
MODULE_EXPORT int
imonlcd_icon(Driver *drvthis, int x, int y, int icon)
{
char ch1 = '?';
@@ -797,7 +797,7 @@ imonlcd_icon(Driver *drvthis, int x, int y, int icon)
* \param x The x-coordinate to display the character at.
* \param num The number to display ("10" is the colon).
*/
MODULE_EXPORT void
MODULE_EXPORT void
imonlcd_num(Driver *drvthis, int x, int num)
{
PrivateData *p = drvthis->private_data;
@@ -850,7 +850,7 @@ imonlcd_num(Driver *drvthis, int x, int num)
* 0 <= length <= 32, bars extend from left to right.
* length > 32, bars extend from right to left, length is counted
* from 32 up (i.e. 35 means a length of 3).
*
*
* Remember: There are two kinds of calls!
* With bit 28 set to 1: Set all bars (leaving the symbols as is),
* with bit 28 set to 0: Set the symbols (leaving the bars as is).
@@ -863,7 +863,7 @@ imonlcd_num(Driver *drvthis, int x, int num)
* \param drvthis Pointer to driver structure.
* \param state This symbols or bars to display.
*/
MODULE_EXPORT void
MODULE_EXPORT void
imonlcd_output(Driver *drvthis, int state)
{
@@ -1096,7 +1096,7 @@ imonlcd_output(Driver *drvthis, int state)
* \param drvthis Pointer to driver structure.
* \return Number of characters the display is wide.
*/
MODULE_EXPORT int
MODULE_EXPORT int
imonlcd_width(Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
@@ -1110,7 +1110,7 @@ imonlcd_width(Driver *drvthis)
* \param drvthis Pointer to driver structure.
* \return Number of characters the display is high.
*/
MODULE_EXPORT int
MODULE_EXPORT int
imonlcd_height(Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
@@ -1124,7 +1124,7 @@ imonlcd_height(Driver *drvthis)
* \param drvthis Pointer to driver structure.
* \return Number of pixel columns a character cell is wide.
*/
MODULE_EXPORT int
MODULE_EXPORT int
imonlcd_cellwidth(Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
@@ -1138,7 +1138,7 @@ imonlcd_cellwidth(Driver *drvthis)
* \param drvthis Pointer to driver structure.
* \return Number of pixel lines a character cell is high.
*/
MODULE_EXPORT int
MODULE_EXPORT int
imonlcd_cellheight(Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
@@ -1157,7 +1157,7 @@ imonlcd_cellheight(Driver *drvthis)
* the device. The kernel module doesn't actually do validation.
* \param p The private data containing the file descriptor to write to.
*/
static void
static void
send_command_data(uint64_t value, PrivateData *p)
{
int i;
@@ -1175,7 +1175,7 @@ send_command_data(uint64_t value, PrivateData *p)
*
* \param p The private data structure containing a tx_buf with the data to send.
*/
static void
static void
send_packet(PrivateData *p)
{
int err;
@@ -1195,7 +1195,7 @@ send_packet(PrivateData *p)
* \return 0 on failure, >0 on success.
*/
MODULE_EXPORT
void
void
imonlcd_set_contrast(Driver *drvthis, int promille)
{
PrivateData *p = drvthis->private_data;
@@ -1222,7 +1222,7 @@ imonlcd_set_contrast(Driver *drvthis, int promille)
* \return The current contrast in promille (0 = lowest contrast;
* 1000 = highest contrast).
*/
MODULE_EXPORT int
MODULE_EXPORT int
imonlcd_get_contrast(Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
@@ -1235,7 +1235,7 @@ imonlcd_get_contrast(Driver *drvthis)
* \param drvthis Pointer to driver structure.
* \param on The backlight state boolean-like: 0 = off; >0 = on.
*/
MODULE_EXPORT void
MODULE_EXPORT void
imonlcd_backlight(Driver *drvthis, int on)
{
PrivateData *p = drvthis->private_data;
@@ -1262,7 +1262,7 @@ imonlcd_backlight(Driver *drvthis, int on)
* \param y vertical position
* \param p pointer to the PrivateData structure
*/
static void
static void
draw_bigchar(imon_bigfont *font, int ch, int x, int y, PrivateData *p)
{
imon_bigfont *defn = font;
@@ -1305,7 +1305,7 @@ draw_bigchar(imon_bigfont *font, int ch, int x, int y, PrivateData *p)
* \param botProgress Length of the bottom progress bar (-32 to 32)
* \param p The private data structure containing the file descriptor to write to.
*/
static void
static void
setLineLength(int topLine, int botLine, int topProgress, int botProgress, PrivateData *p)
{
setBuiltinProgressBars(lengthToPixels(topLine),
@@ -1328,7 +1328,7 @@ setLineLength(int topLine, int botLine, int topProgress, int botProgress, Privat
* \param botProgress Pitmap of the bottom progress bar
* \param p The private data structure containing the file descriptor to write to.
*/
static void
static void
setBuiltinProgressBars(int topLine, int botLine,
int topProgress, int botProgress, PrivateData *p)
{
@@ -1359,7 +1359,7 @@ setBuiltinProgressBars(int topLine, int botLine,
* \param length The length of the bar.
* \return The pixmap that represents the given length.
*/
static int
static int
lengthToPixels(int length)
{
int pixLen[] =
+1 -1
View File
@@ -49,7 +49,7 @@ MODULE_EXPORT int imonlcd_cellheight (Driver *drvthis);
/* Hardware functions */
MODULE_EXPORT int imonlcd_get_contrast (Driver *drvthis);
MODULE_EXPORT void imonlcd_set_contrast (Driver *drvthis, int promille);
MODULE_EXPORT void imonlcd_set_contrast (Driver *drvthis, int promille);
/* MODULE_EXPORT int imonlcd_get_brightness (Driver *drvthis, int state); NOT IMPLEMENTED */
/* MODULE_EXPORT void imonlcd_set_brightness (Driver *drvthis, int state, int promille); NOT IMPLEMENTED */
MODULE_EXPORT void imonlcd_backlight(Driver *drvthis, int on);
+1 -1
View File
@@ -1,7 +1,7 @@
// -*- coding:iso-8859-15 -*-
/** \file server/drivers/imonlcd_font.h
* This is a definition of a font for use with the iMON LCD.
*
*
* The iMON LCD doesn't have a "text mode" - everthing is pixel-based.
* So we need to define our own font, basically.
*/
+4 -4
View File
@@ -109,7 +109,7 @@ joy_init (Driver *drvthis)
/* End of config file parsing (1st part) */
if ((p->fd = open(p->device, O_RDONLY)) < 0) {
report(RPT_ERR, "%s: open(%s) failed (%s)",
report(RPT_ERR, "%s: open(%s) failed (%s)",
drvthis->name, p->device, strerror(errno));
return -1;
}
@@ -147,7 +147,7 @@ joy_init (Driver *drvthis)
p->axismap[2*i] = strdup(mapval);
report(RPT_DEBUG, "%s: map Axis%dneg to %s",
drvthis->name, i+1, p->axismap[2*i]);
}
}
snprintf(mapkey, sizeof(mapkey), "Map_Axis%dpos", i+1);
mapval = drvthis->config_get_string(drvthis->name, mapkey, 0, NULL);
@@ -155,7 +155,7 @@ joy_init (Driver *drvthis)
p->axismap[2*i + 1] = strdup(mapval);
report(RPT_DEBUG, "%s: map Axis%dpos to %s",
drvthis->name, i+1, p->axismap[2*i + 1]);
}
}
}
for (i = 0; i < p->buttons; i++) {
@@ -168,7 +168,7 @@ joy_init (Driver *drvthis)
p->buttonmap[i] = strdup(mapval);
report(RPT_DEBUG, "%s: map Button%d to %s",
drvthis->name, i+1, p->buttonmap[i]);
}
}
}
/* End of config file parsing (2nd part) */
+3 -3
View File
@@ -22,7 +22,7 @@
* This function places a hbar using the v0.5 API format and the given cellwidth.
* It assumes that custom chars have been statically defined, so that number
* 1 has 1 pixel, number 2 has 2 etc.
*
*
* LCDs that have the custom chars at other char numbers than 0 should put the
* first custom char number in cc_offset.
*/
@@ -38,7 +38,7 @@ lib_hbar_static (Driver *drvthis, int x, int y, int len, int promille, int optio
if ( pixels >= cellwidth ) {
/* write a "full" block to the screen... */
#if defined(SEAMLESS_HBARS)
#if defined(SEAMLESS_HBARS)
drvthis->chr (drvthis, x+pos, y, cellwidth + cc_offset);
#else
drvthis->icon (drvthis, x+pos, y, ICON_BLOCK_FILLED);
@@ -59,7 +59,7 @@ lib_hbar_static (Driver *drvthis, int x, int y, int len, int promille, int optio
* This function places a vbar using the v0.5 API format and the given cellwidth.
* It assumes that custom chars have been statically defined, so that number
* 1 has 1 pixel, number 2 has 2 etc., just like in good old times.
*
*
* LCDs that have the custom chars at other char numbers than 0 should put the
* first custom char number in cc_offset.
*/
+5 -5
View File
@@ -5,9 +5,9 @@
/*
* lcd_sem.c -- semaphore code written for lcdtime and meter to mediate
* access to the parallel port.
*
*
* Written by Benjamin Tse (blt@mundil.cs.mu.edu.au); August,October 1995
*
*
* Functions in this file:
* getkey returns the key for the semaphore
* sem_get create the semaphore (and initialise) if one doesn't exist
@@ -15,13 +15,13 @@
* sem_wait wait on the semaphore
* sem_signal signal on the semaphore
* sem_remove remove the semaphore
*
*
* Legal stuff: At no stage was this program written, assembled or compiled on
* any computer at the University of Melbourne, Australia. This program is
* Copyright (C) 1995 Benjamin Tse (blt@mundil.cs.mu.oz.au) and covered by
* GNU's GPL. In particular, this program is free software and comes WITHOUT
* ANY WARRANTY.
*
*
*/
#include <stdio.h>
@@ -75,7 +75,7 @@ getkey(register char *p)
/**
* Get semaphore.
* If the semaphore does not exist, create it and initialise it to 1,
* If the semaphore does not exist, create it and initialise it to 1,
* otherwise simply return the semaphore ID.
* \return Semaphore ID on success; terminate program with code \c 1 on error.
*/
+11 -11
View File
@@ -19,8 +19,8 @@
* This file is released under the GNU General Public License. Refer to the
* COPYING file distributed with this package.
*
*
*
*
*
*
*/
@@ -42,7 +42,7 @@
* 2007/05/22 Removed useless Device= config option.
* Added VendorID= and ProductID= config
* option parsting. Moved constants to
* lis.h where they belong. Added
* lis.h where they belong. Added
* lis_cellheight() and lis_cellwidth().
* Completely commented out lis_test() to
* save memory.
@@ -145,7 +145,7 @@ const unsigned char UPD16314_charmap[] = {
224, 225, 226, 227, 228, 229, 230, 231,
232, 233, 234, 235, 237, 237, 238, 239,
240, 241, 242, 243, 244, 245, 246, 247,
248, 249, 250, 251, 252, 253, 254, 1
248, 249, 250, 251, 252, 253, 254, 1
};
/////////////////////////////////////////
@@ -155,7 +155,7 @@ lis_standard_custom_chars (Driver *drvthis) {
PrivateData *p = drvthis->private_data;
static unsigned char checkbox_gray[] =
static unsigned char checkbox_gray[] =
{ b_______,
b_______,
b__XXXXX,
@@ -165,7 +165,7 @@ PrivateData *p = drvthis->private_data;
b__XXXXX,
b_______ };
static unsigned char block_filled[] =
static unsigned char block_filled[] =
{ b__XXXXX,
b__XXXXX,
b__XXXXX,
@@ -177,7 +177,7 @@ PrivateData *p = drvthis->private_data;
lis_set_char(drvthis, 1, block_filled);
lis_set_char(drvthis, 2, checkbox_gray);
p->ccmode = standard;
}
@@ -320,7 +320,7 @@ lis_set_brightness(Driver *drvthis, int state, int promille)
unsigned char buffer[2];
int err;
PrivateData *p = (PrivateData *) drvthis->private_data;
if (promille < 0 || promille > 1000) {
report(RPT_WARNING, "%s: invalid brightness %d less then 0 or greater than 1000",
drvthis->name, promille);
@@ -446,7 +446,7 @@ lis_init(Driver *drvthis)
// open the device
err = ftdi_usb_open(&p->ftdic, p->VendorID, p->ProductID);
if (err < 0) {
report(RPT_ERR, "%s: cannot open USB device %x:%x",
report(RPT_ERR, "%s: cannot open USB device %x:%x",
drvthis->name,
p->VendorID,
p->ProductID);
@@ -1022,7 +1022,7 @@ lis_init(Driver *drvthis)
// }
//
// timing_uPause(16000);
// set DTR high
err = ftdi_setdtr(&p->ftdic, SIO_SET_DTR_HIGH);
if (err < 0) {
@@ -1420,7 +1420,7 @@ lis_set_char(Driver *drvthis, int n, unsigned char *dat)
int letter = 0;
if (p->lastline || (row < p->cellheight - 1))
letter = dat[row] & mask;
letter = dat[row] & mask;
if (p->cc[n].cache[row] != letter) {
p->cc[n].clean = 0; /* only mark dirty if really different */
+2 -2
View File
@@ -66,7 +66,7 @@ typedef struct lis_private_data {
// the width and the height (in number of characters) of the display
int width, height;
// pixel width and height of each character
int cellwidth, cellheight;
@@ -98,7 +98,7 @@ typedef struct lis_private_data {
/* lastline controls the use of the last line, if pixel addressable (true, default) or */
/* underline effect (false). To avoid the underline effect in the latter case, the last */
/* line is always zeroed for whatever redefined character */
char lastline;
char lastline;
} PrivateData;
+3 -3
View File
@@ -225,7 +225,7 @@ ms6931_init (Driver *drvthis)
tcsetattr(p->fd, TCSANOW, &portset);
// set display to comunications mode
// set display to comunications mode
ms6931_write(p->fd, "~\040", 2);
sleep(1);
@@ -255,7 +255,7 @@ ms6931_close (Driver *drvthis)
ms6931_clear(drvthis);
ms6931_flush(drvthis);
ms6931_backlight (drvthis, BACKLIGHT_OFF);
}
}
if (p->fd >= 0)
close(p->fd);
@@ -508,7 +508,7 @@ ms6931_get_key (Driver *drvthis)
key = "Down";
break;
default:
report(RPT_DEBUG, "%s get_key: illegal key 0x%02X",
report(RPT_DEBUG, "%s get_key: illegal key 0x%02X",
drvthis->name, buf);
return NULL;
}
+1 -1
View File
@@ -214,7 +214,7 @@ MTC_S16209X_init (Driver *drvthis)
if (reboot) {
report(RPT_INFO, "%s: rebooting LCD...", drvthis->name);
MTC_S16209X_reboot();
}
}
#endif // CAN_REBOOT_LCD
result = write(p->fd, lcd_clearscreen, sizeof(lcd_clearscreen)); // Clear the LCD, unbuffered
+13 -13
View File
@@ -2,7 +2,7 @@
* LCDd \c mx5000 driver for the Logitech MX5000 keyboard.
*/
/*
/*
Author: Christian Jodar (tian@gcstar.org)
Copyright (C) 2008 Christian Jodar
@@ -150,7 +150,7 @@ mx5000_height (Driver *drvthis)
/*
* Returns the display's character cell width
*/
MODULE_EXPORT int
MODULE_EXPORT int
mx5000_cellwidth(Driver *drvthis)
{
return CELL_WIDTH;
@@ -160,7 +160,7 @@ mx5000_cellwidth(Driver *drvthis)
/*
* Returns the display's character cell height
*/
MODULE_EXPORT int
MODULE_EXPORT int
mx5000_cellheight(Driver *drvthis)
{
return CELL_HEIGHT;
@@ -179,7 +179,7 @@ mx5000_flush (Driver *drvthis)
We could only update the needed part. But it would be hard to really
figure out what has been changed
*/
if (p->changed)
{
mx5000_sc_send(p->sc, p->fd);
@@ -200,15 +200,15 @@ mx5000_chr (Driver *drvthis, int x, int y, char c)
char str[2];
// The position should be given in pixels
int px, py;
if ((x <= 0) || (y <= 0) || (x > SCREEN_WIDTH) || (y > SCREEN_HEIGHT))
{
return;
}
px = (x - 1) * CELL_WIDTH;
py = y * CELL_HEIGHT;
str[0] = c;
str[1] = 0;
mx5000_sc_add_text(p->sc, str, -1, STATIC, py, px);
@@ -226,7 +226,7 @@ mx5000_string (Driver *drvthis, int x, int y, const char string[])
int actual_len;
// The position should be given in pixels
int px, py;
if ((x <= 0) || (y <= 0) || (x > SCREEN_WIDTH) || (y > SCREEN_HEIGHT))
{
return;
@@ -238,7 +238,7 @@ mx5000_string (Driver *drvthis, int x, int y, const char string[])
{
actual_len = SCREEN_WIDTH - x + 1;
}
px = (x - 1) * CELL_WIDTH;
py = y * CELL_HEIGHT;
@@ -274,8 +274,8 @@ mx5000_hbar (Driver *drvthis, int x, int y, int len, int promille, int options)
//printf("Bar : %d, %d, %d, %d, %d\n", x, y, len, promille, options);
px = (x - 1) * CELL_WIDTH;
py = y * CELL_HEIGHT;
mx5000_sc_add_progress_bar(p->sc,
mx5000_sc_add_progress_bar(p->sc,
promille * len / 1000,
len,
STATIC,
@@ -292,7 +292,7 @@ mx5000_num (Driver *drvthis, int x, int num)
char text[10];
px = (x - 1) * CELL_WIDTH;
py = 33;
if (num < 10)
{
sprintf(text, "%d", num);
@@ -352,7 +352,7 @@ mx5000_icon(Driver *drvthis, int x, int y, int icon)
}
else
{
return -1; /* Let the core do other icons */
}
}
+66 -66
View File
@@ -6,7 +6,7 @@
* (c) 2007 NitroSecurity, Inc.
* Written by Gatewood Green <woody@nitrosecurity.com> or <woody@linif.org>
* (c) 2007-2008 Peter Marschall - adapted coding style and reporting to LCDproc
* (c) 2007 Mini-Box.com, Nicu Pavel <npavel@ituner.com>
* (c) 2007 Mini-Box.com, Nicu Pavel <npavel@ituner.com>
* - removed libusblcd and hid dependency
* - added vbar, hbar, custom char, bignum support
* (c) 2008 Jack Cleaver - add LIRC connection
@@ -18,16 +18,16 @@
* - Removed usb_clear_halt, because it breaks picoLCD 20x2 (1.57) communication
* License: GPL (same as usblcd and lcdPROC)
*
* picoLCD: http://www.mini-box.com/picoLCD-20x2-OEM
* Can be purchased separately or preinstalled in units such as the
* picoLCD: http://www.mini-box.com/picoLCD-20x2-OEM
* Can be purchased separately or preinstalled in units such as the
* M300 http://www.mini-box.com/Mini-Box-M300-LCD
* picoLCD 4x20: http://www.mini-box.com/PicoLCD-4X20-Sideshow
*
* The picoLCD is usb connected and is driven (currently) via userspace
* The picoLCD is usb connected and is driven (currently) via userspace
* using libusb library.
*
* libusb: http://www.libusb.org/
*
*
*/
/* lcdPROC includes */
@@ -61,7 +61,7 @@
#define DEFAULT_KEYLIGHTS 1 /* On */
#define DEFAULT_TIMEOUT 500 /* Half second */
#define NUM_CCs 8 /* max. number of custom characters */
#define NUM_CCs 8 /* max. number of custom characters */
typedef enum {
standard, /* only char 0 is used for heartbeat */
@@ -148,7 +148,7 @@ picolcd_device picolcd_device_ids[] = {
.write = picolcd_20x4_write,
.cchar = picolcd_20x4_set_char,
/* all keymap labels must be shorter than KEYPAD_LABEL_MAX */
.keymap = { NULL, "Escape", "F1", "F2", "F3", "Home", "Down",
.keymap = { NULL, "Escape", "F1", "F2", "F3", "Home", "Down",
"Enter", "Up", "", "", "", ""},
.initseq = { 0x94, 0x00, 0x07, 0x00, 0x32, 0x30, 0x00, 0x32,
0x30, 0x00, 0x32, 0x30, 0x00, 0x32, 0x38, 0x00,
@@ -243,12 +243,12 @@ MODULE_EXPORT int picoLCD_init(Driver *drvthis)
else {
report(RPT_ERR, "%s: no device found", drvthis->name);
return -1;
}
}
/* if the device has a init sequence sent it to device */
picolcd_send(p->lcd, p->device->initseq, PICOLCD_MAX_DATA_LEN);
p->width = p->device->width;
p->width = p->device->width;
p->height = p->device->height;
p->info = p->device->description;
p->cellwidth = LCD_DEFAULT_CELLWIDTH;
@@ -267,7 +267,7 @@ MODULE_EXPORT int picoLCD_init(Driver *drvthis)
sprintf(configkey, "Key%dLight", x);
p->key_light[x] = drvthis->config_get_bool(drvthis->name, configkey, 0, 1);
}
}
p->framebuf = (unsigned char *) malloc(p->width * p->height + 1);
if (p->framebuf == NULL) {
@@ -299,8 +299,8 @@ MODULE_EXPORT int picoLCD_init(Driver *drvthis)
p->flush_threshold = drvthis->config_get_int(drvthis->name, "LircFlushThreshold", 0,
DEFAULT_FLUSH_THRESHOLD_JIFFY);
if (p->flush_threshold < 16) /* Prevent small 'foolish' values these will disable the check also! */
p->flush_threshold = 0x8000; /* Disabled, send check will always fail! */
p->flush_threshold = 0x8000; /* Disabled, send check will always fail! */
p->IRenabled = (lirchost != NULL && *lirchost != '\0') ? 1 : 0;
/* Simulate that the last value send was a PULSE,
@@ -329,8 +329,8 @@ MODULE_EXPORT int picoLCD_init(Driver *drvthis)
p->lircserver.sin_addr = *(struct in_addr *) hostinfo->h_addr; /* IP address */
p->lircserver.sin_port = htons(lircport); /* server port */
report(RPT_INFO, "%s: IR events will be sent to LIRC on %s:%d, with flush threshold=%d",
drvthis->name, lirchost, lircport, p->flush_threshold);
report(RPT_INFO, "%s: IR events will be sent to LIRC on %s:%d, with flush threshold=%d",
drvthis->name, lirchost, lircport, p->flush_threshold);
}
report(RPT_INFO, "%s: init complete", drvthis->name);
@@ -410,8 +410,8 @@ MODULE_EXPORT void picoLCD_flush(Driver *drvthis)
debug(RPT_DEBUG, "%s: flush started", drvthis->name);
for (line = 0; line < p->height; line++) {
memset(text, 0, sizeof(text));
for (line = 0; line < p->height; line++) {
memset(text, 0, sizeof(text));
offset = line * p->width;
fb = p->framebuf + offset;
lf = p->lstframe + offset;
@@ -513,7 +513,7 @@ MODULE_EXPORT void picoLCD_chr(Driver *drvthis, int x, int y, unsigned char c)
MODULE_EXPORT void picoLCD_set_char (Driver *drvthis, int n, unsigned char *dat)
{
PrivateData *p = drvthis->private_data;
p->device->cchar(drvthis, n, dat);
}
@@ -650,16 +650,16 @@ MODULE_EXPORT void picoLCD_num (Driver *drvthis, int x, int num)
MODULE_EXPORT int picoLCD_icon (Driver *drvthis, int x, int y, int icon)
{
PrivateData *p = drvthis->private_data;
/* 8x5 icons each number represents one row in binary */
static unsigned char heart_open[] =
static unsigned char heart_open[] =
{ 0x0, 0xa, 0x15, 0x11, 0x1b, 0xa, 0x4, 0x0 };
static unsigned char heart_filled[] =
static unsigned char heart_filled[] =
{ 0x0, 0xa, 0x1f, 0x1f, 0x1f, 0xe, 0x4, 0x0 };
switch (icon) {
case ICON_BLOCK_FILLED:
picoLCD_chr(drvthis, x, y, 255);
@@ -763,32 +763,32 @@ MODULE_EXPORT char *picoLCD_get_key(Driver *drvthis)
return NULL;
/*
* Due to how key events are reported, we need to keep reading key presses
/*
* Due to how key events are reported, we need to keep reading key presses
* until we get the all clear (all keys up) event.
*
* Key events come back in such a way to report up to two simultanious keys
* pressed. The highest numbered key always comes back as the first key and
* the lower numbered key follows. If only one key was pressed, the second
*
* Key events come back in such a way to report up to two simultanious keys
* pressed. The highest numbered key always comes back as the first key and
* the lower numbered key follows. If only one key was pressed, the second
* key is 0. I will refer to a key event as: <high key, low key>.
*
*
* The picoLCD also sends key-up events.
*
* On a single key press, the return is <keynum, 0>. The key-up event is a
* read that returns <0, 0> (all clear). On a dual key press, if one key is
* released later than the other key, the first key-up event is
* <remainingkey, 0>. This will be followed by a final "all clear" key-up
* <0, 0>. If both keys are release simultaniously, then after <hk, lk>,
* you will receive <0, 0>. If the keys are pressed down in a staggard
* fashion, you will receive <first key, 0> followed by <hk, lk> followed by
* On a single key press, the return is <keynum, 0>. The key-up event is a
* read that returns <0, 0> (all clear). On a dual key press, if one key is
* released later than the other key, the first key-up event is
* <remainingkey, 0>. This will be followed by a final "all clear" key-up
* <0, 0>. If both keys are release simultaniously, then after <hk, lk>,
* you will receive <0, 0>. If the keys are pressed down in a staggard
* fashion, you will receive <first key, 0> followed by <hk, lk> followed by
* key-up events as already detailed.
*
* What this means is that we need to keep reading key presses until we get
* What this means is that we need to keep reading key presses until we get
* the <0, 0> all clear.
*
* For keymapping see the picolcd_device structs.
*/
}
@@ -823,11 +823,11 @@ MODULE_EXPORT void picoLCD_set_contrast(Driver *drvthis, int promille)
PrivateData *p = drvthis->private_data;
int inv; /* The hardware seems to go dark on higher values, so we turn it around */
unsigned char packet[2] = { 0x92 }; /* set contrast id */
if (promille <= 1000 && promille > 0) {
p->contrast = promille;
if (p->device->contrast_max == 1)
if (p->device->contrast_max == 1)
packet[1] = 0x00; /* picoLCD20x4 permits contrast as 0/1 value */
else {
inv = 1000 - promille;
@@ -842,7 +842,7 @@ MODULE_EXPORT void picoLCD_set_contrast(Driver *drvthis, int promille)
p->contrast = 0;
packet[1] = p->device->contrast_max;
}
picolcd_send(p->lcd, packet, 2);
}
@@ -869,13 +869,13 @@ MODULE_EXPORT void picoLCD_set_contrast(Driver *drvthis, int promille)
MODULE_EXPORT void picoLCD_set_brightness(Driver *drvthis, int state, int promille)
{
PrivateData *p = drvthis->private_data;
if (promille < 0 || promille > 1000)
if (promille < 0 || promille > 1000)
return;
if (state)
p->brightness = promille;
return;
}
@@ -889,19 +889,19 @@ MODULE_EXPORT void picoLCD_backlight(Driver *drvthis, int state)
{
PrivateData *p = drvthis->private_data;
unsigned char packet[2] = { 0x91 }; /* set backlight id */
int s = p->brightness / 10; /* scale in 0-100 range for picoLCDs */
/* picoLCD 20x2 doesn't have brightness levels */
if (s > p->device->bklight_max)
s = p->device->bklight_max;
if (state == BACKLIGHT_OFF) {
//packet[1] = (unsigned char) p->device->bklight_min;
//packet[1] = (unsigned char) p->device->bklight_min;
packet[1] = 0xff;
picolcd_send(p->lcd, packet, 2);
set_key_lights(p->lcd, p->key_light, state);
}
}
else if (state == BACKLIGHT_ON) {
packet[1] = (unsigned char) s;
picolcd_send(p->lcd, packet, 2);
@@ -944,12 +944,12 @@ MODULE_EXPORT char *picoLCD_get_info(Driver *drvthis)
* Transcode from picoLCD USB format to LIRC UDP format.
* LIRC UDP packets expect 16-bit intervals, with MSB set for space.
* Intervals are measured in jiffies (1/16384 s).
* PicoLCD USB packets contain 16-bit intervals, with value negated
* PicoLCD USB packets contain 16-bit intervals, with value negated
* for space. Intervals are in microseconds.
* PicoLCD presents the bytes in network order, and they must be put back
* in that order for transmission via UDP.
* One jiffy == 61 us. 537 us == 9j.
*
* One jiffy == 61 us. 537 us == 9j.
*
* \param drvthis Pointer to driver structure [used for debug() and report()].
* \param data Buffer of integers to be transcoded.
* \param cbdata Buffer of integers to be transcoded.
@@ -961,7 +961,7 @@ MODULE_EXPORT char *picoLCD_get_info(Driver *drvthis)
* To fix this I queue the samples and send it when a sync is detected or by a timeout.
* 2. The sync (long space) are not send by the picoLCD.
* To fix this we look for a pulse at the end of the last message and a pulse at the
* begin new message, we then flush the queue and start with a (sync) space, with
* begin new message, we then flush the queue and start with a (sync) space, with
* the duration of the time between the last and current message.
*
* \note To make LIRC happy I send the queued samples with the sync space a the begin,
@@ -1153,7 +1153,7 @@ static void picolcd_20x2_write(usb_dev_handle *lcd, const int row, const int col
static void picolcd_20x2_set_char(Driver *drvthis, int n, unsigned char *dat)
{
PrivateData *p = drvthis->private_data;
unsigned char packet[10] = { 0x9c }; /* define character */
unsigned char packet[10] = { 0x9c }; /* define character */
unsigned char mask = (1 << p->cellwidth) - 1;
int row;
@@ -1167,7 +1167,7 @@ static void picolcd_20x2_set_char(Driver *drvthis, int n, unsigned char *dat)
for (row = 0; row < p->cellheight; row++) {
packet[row + 2] = dat[row] & mask;
}
picolcd_send(p->lcd, packet, 10);
}
@@ -1176,17 +1176,17 @@ static void picolcd_20x2_set_char(Driver *drvthis, int n, unsigned char *dat)
static void picolcd_20x4_set_char(Driver *drvthis, int n, unsigned char *dat)
{
PrivateData *p = drvthis->private_data;
if ((n < 0) || (n >= NUM_CCs))
return;
if (!dat)
return;
unsigned char command[6] = { OUT_REPORT_CMD, 0x00, 0x01, 0x00, 0x64, 0x40+8*n }; /* 0x94 */
unsigned char data[13] = { OUT_REPORT_DATA, 0x01, 0x00, 0x01, 0x08,
dat[0], dat[1], dat[2], dat[3],
dat[0], dat[1], dat[2], dat[3],
dat[4], dat[5], dat[6], dat[7]}; /* 0x95 */
picolcd_send(p->lcd, command, 6);
picolcd_send(p->lcd, data, 13);
}
@@ -1219,22 +1219,22 @@ static void get_key_event(usb_dev_handle *lcd, lcd_packet *packet, int timeout)
static void set_key_lights(usb_dev_handle *lcd, int keys[], int state)
{
unsigned char packet[2] = { 0x81 }; /* set led */
unsigned int leds = 0;
unsigned int leds = 0;
int i;
if (state) {
/* Only LEDs we want on */
for (i = 0; i < KEYPAD_LIGHTS; i++)
if(keys[i])
for (i = 0; i < KEYPAD_LIGHTS; i++)
if(keys[i])
leds |= (1 << i);
else
else
leds &= ~ (1 << i);
}
else {
/* All LEDs off */
leds = 0;
}
packet[1] = leds;
picolcd_send(lcd, packet, 2);
}
+8 -8
View File
@@ -4,7 +4,7 @@
* (c) 2007 NitroSecurity, Inc.
* Written by Gatewood Green <woody@nitrosecurity.com> or <woody@linif.org>
* (c) 2007-2008 Peter Marschall - adapted coding style and reporting to LCDproc
* (c) 2007 Mini-Box.com, Nicu Pavel <npavel@ituner.com>
* (c) 2007 Mini-Box.com, Nicu Pavel <npavel@ituner.com>
* - removed libusblcd and hid dependency
* - added vbar, hbar, custom char, bignum support
* (c) 2008 Jack Cleaver - add LIRC connection
@@ -12,16 +12,16 @@
* - Added support for 4x20 picoLCD
* License: GPL (same as usblcd and lcdPROC)
*
* picoLCD: http://www.mini-box.com/picoLCD-20x2-OEM
* Can be purchased separately or preinstalled in units such as the
* picoLCD: http://www.mini-box.com/picoLCD-20x2-OEM
* Can be purchased separately or preinstalled in units such as the
* M300 http://www.mini-box.com/Mini-Box-M300-LCD
* picoLCD 4x20: http://www.mini-box.com/PicoLCD-4X20-Sideshow
*
* The picoLCD is usb connected and is driven (currently) via userspace
* The picoLCD is usb connected and is driven (currently) via userspace
* using libusb library.
*
* libusb: http://www.libusb.org/
*
*
*/
#ifndef PICOLCD_H
@@ -41,8 +41,8 @@
#define IN_REPORT_KEY_STATE 0x11
#define IN_REPORT_IR_DATA 0x21
#define OUT_REPORT_CMD 0x94
#define OUT_REPORT_DATA 0x95
#define OUT_REPORT_CMD 0x94
#define OUT_REPORT_DATA 0x95
#define PICOLCD_MAX_DATA_LEN 24
@@ -69,7 +69,7 @@ typedef struct _picolcd_device {
int width; /* width of lcd screen */
int height; /* height of lcd screen */
/* Pointer to function that writes data to the LCD format */
void (*write)(usb_dev_handle *lcd, const int row, const int col, const unsigned char *data);
void (*write)(usb_dev_handle *lcd, const int row, const int col, const unsigned char *data);
/* Pointer to function that defines a custom character */
void (*cchar) (Driver *drvthis, int n, unsigned char *dat);
} picolcd_device;
+2 -2
View File
@@ -1,4 +1,4 @@
/*
/*
* Low level I/O functions taken from led-stat.txt
* Jan 22 95 copyright damianf@wpi.edu
*
@@ -63,7 +63,7 @@ not be in this file but in lpt-port.h ...
#if defined HAVE_IOPERM
/* Glibc2 and Glibc1 */
# ifdef HAVE_SYS_IO_H
# ifdef HAVE_SYS_IO_H
# include <sys/io.h>
# endif
+31 -31
View File
@@ -30,7 +30,7 @@
*/
/*
/*
* Changes:
* 2006-02-20 Stefan Reinauer <stepan@coresystems.de>
* - add support for onboard LEDs via "output" command
@@ -163,13 +163,13 @@ read_ACK(PrivateData *p)
return (retval && buffer[0]=='Q');
}
/* Send the input as telegramm.
*
/* Send the input as telegramm.
*
* The telegram buffer just contains the raw telegram data
* - It shall not contain <STX> and <ETX> marks
* - It may contain bytes below 0x20, they are automatically escaped by
* real_sent_tele
*
*
* NOTE: This function does not wait for any ACKs.
*/
int
@@ -179,7 +179,7 @@ real_send_tele(PrivateData *p, char *buffer, int len)
int i, j;
char buffer2[255];
i=0; j=0;
i=0; j=0;
buffer2[j++]=2; // emit <STX>
/* copy the whole telegram package and escape
@@ -195,7 +195,7 @@ real_send_tele(PrivateData *p, char *buffer, int len)
buffer2[j++]=buffer[i++];
}
}
buffer2[j++]=3; // emit <ETX>
buffer2[j++]=3; // emit <ETX>
len=j; // new package length
/* calculate <BCC> over all bytes */
@@ -301,7 +301,7 @@ set_leds(PrivateData *p)
* \retval 0 Success.
* \retval <0 Error.
*/
MODULE_EXPORT int
MODULE_EXPORT int
pyramid_init (Driver *drvthis)
{
char buffer[6]="";
@@ -335,7 +335,7 @@ pyramid_init (Driver *drvthis)
strcpy(p->framebuffer, "D ");
p->FB_modified = 1;
/* read config file, fill configuration
/* read config file, fill configuration
* dependent elements of private data
*/
@@ -408,7 +408,7 @@ pyramid_init (Driver *drvthis)
* Close the driver (do necessary clean-up).
* \param drvthis Pointer to driver structure.
*/
MODULE_EXPORT void
MODULE_EXPORT void
pyramid_close (Driver *drvthis)
{
PrivateData *p = (PrivateData *) drvthis->private_data;
@@ -422,7 +422,7 @@ pyramid_close (Driver *drvthis)
* \param drvthis Pointer to driver structure.
* \return Number of characters the display is wide.
*/
MODULE_EXPORT int
MODULE_EXPORT int
pyramid_width (Driver *drvthis)
{
PrivateData *p = (PrivateData *) drvthis->private_data;
@@ -436,7 +436,7 @@ pyramid_width (Driver *drvthis)
* \param drvthis Pointer to driver structure.
* \return Number of characters the display is high.
*/
MODULE_EXPORT int
MODULE_EXPORT int
pyramid_height (Driver *drvthis)
{
PrivateData *p = (PrivateData *) drvthis->private_data;
@@ -449,7 +449,7 @@ pyramid_height (Driver *drvthis)
* Clear the screen.
* \param drvthis Pointer to driver structure.
*/
MODULE_EXPORT void
MODULE_EXPORT void
pyramid_clear (Driver *drvthis)
{
PrivateData *p = (PrivateData *) drvthis->private_data;
@@ -465,7 +465,7 @@ pyramid_clear (Driver *drvthis)
* that means, nothing has to be done
* \param drvthis Pointer to driver structure.
*/
MODULE_EXPORT void
MODULE_EXPORT void
pyramid_flush (Driver *drvthis)
{
static char mesg[33];
@@ -513,7 +513,7 @@ pyramid_flush (Driver *drvthis)
* \param y Vertical character position (row).
* \param string String that gets written.
*/
MODULE_EXPORT void
MODULE_EXPORT void
pyramid_string (Driver *drvthis, int x, int y, const char string[])
{
int offset;
@@ -537,7 +537,7 @@ pyramid_string (Driver *drvthis, int x, int y, const char string[])
* \param y Vertical character position (row).
* \param c Character that gets written.
*/
MODULE_EXPORT void
MODULE_EXPORT void
pyramid_chr (Driver *drvthis, int x, int y, char c)
{
PrivateData *p = (PrivateData *) drvthis->private_data;
@@ -580,7 +580,7 @@ MODULE_EXPORT void pyramid_set_char (Driver *drvthis, int n, char *dat)
tele[1]=n+0x40;
for (row = 0; row < p->cellheight; row++) {
pixels=0;
pixels=0;
for (column = 0; column < p->cellwidth; column++) {
pixels <<= 1;
pixels |= (dat[(row * p->cellwidth) + column] != 0);
@@ -931,7 +931,7 @@ pyramid_icon (Driver *drvthis, int x, int y, int icon)
},
{
0, 0, 1, 0, 0, // Arrow up
0, 0, 1, 0, 0, // Arrow up
0, 1, 1, 1, 0,
1, 0, 1, 0, 1,
0, 0, 1, 0, 0,
@@ -953,7 +953,7 @@ pyramid_icon (Driver *drvthis, int x, int y, int icon)
},
{
0, 0, 0, 0, 0, // Checkbox off
0, 0, 0, 0, 0, // Checkbox off
0, 0, 0, 0, 0,
1, 1, 1, 1, 1,
1, 0, 0, 0, 1,
@@ -975,7 +975,7 @@ pyramid_icon (Driver *drvthis, int x, int y, int icon)
},
{
0, 0, 0, 0, 0, // Checkbox gray
0, 0, 0, 0, 0, // Checkbox gray
0, 0, 0, 0, 0,
1, 1, 1, 1, 1,
1, 0, 1, 0, 1,
@@ -1002,7 +1002,7 @@ pyramid_icon (Driver *drvthis, int x, int y, int icon)
// notify the others that we messed up their character set.
// Unused for heartbeats as we should always leave that icon alone.
//
//
// Leaving this in the code as notification for other similar cases
if (p->custom == bign) {
debug(RPT_DEBUG, "%s: Switching to beat", __FUNCTION__);
@@ -1074,9 +1074,9 @@ pyramid_icon (Driver *drvthis, int x, int y, int icon)
/*
MODULE_EXPORT void
MODULE_EXPORT void
pyramid_num (Driver *drvthis, int x, int num){};
MODULE_EXPORT void
MODULE_EXPORT void
pyramid_heartbeat (Driver *drvthis, int state){};
*/
@@ -1087,7 +1087,7 @@ pyramid_heartbeat (Driver *drvthis, int state){};
* \param y Vertical cursor position (row).
* \param state New cursor state.
*/
MODULE_EXPORT void
MODULE_EXPORT void
pyramid_cursor (Driver *drvthis, int x, int y, int state)
{
PrivateData *p = (PrivateData *) drvthis->private_data;
@@ -1116,15 +1116,15 @@ pyramid_cursor (Driver *drvthis, int x, int y, int state)
#if 0
// all of these are not supported by the display (data sheet)
MODULE_EXPORT int
MODULE_EXPORT int
pyramid_get_contrast (Driver *drvthis){return 0;};
MODULE_EXPORT void
MODULE_EXPORT void
pyramid_set_contrast (Driver *drvthis, int promille){};
MODULE_EXPORT int
MODULE_EXPORT int
pyramid_get_brightness (Driver *drvthis, int state){return 0;};
MODULE_EXPORT void
MODULE_EXPORT void
pyramid_set_brightness (Driver *drvthis, int state, int promille){};
MODULE_EXPORT void
MODULE_EXPORT void
pyramid_backlight (Driver *drvthis, int on)
#endif
@@ -1136,13 +1136,13 @@ pyramid_backlight (Driver *drvthis, int on)
* \param drvthis Pointer to driver structure.
* \param state Integer with bits representing port states.
*/
MODULE_EXPORT void
MODULE_EXPORT void
pyramid_output (Driver *drvthis, int state)
{
PrivateData *p = (PrivateData *) drvthis->private_data;
int i;
for (i = 0; i < 7; i++)
for (i = 0; i < 7; i++)
p->led[i] = state & (1 << i);
set_leds(p);
@@ -1172,7 +1172,7 @@ pyramid_get_key (Driver *drvthis)
PrivateData *p = (PrivateData *) drvthis->private_data;
/* Now we read everything from the display,
* and as long as we got ACKs, we ignore them.
* and as long as we got ACKs, we ignore them.
* (eat up all pending ACKs)
*/
+11 -11
View File
@@ -196,11 +196,11 @@
* type=G191D
* type=G2446
* type=SP14Q002
*
*
* You can also change the wiring scheme by using the ConnectionType= option:
* ConnectionType=<classic|bitshaker>
* If not set, classic wiring is used.
*
*
* The port= value should be set to the LPT port address that the LCD is
* connected to. Examples:
* port=0x378
@@ -428,7 +428,7 @@ sed1330_init( Driver * drvthis )
// Use classic wiring
p->A0 = SEL; // port 17
p->nRESET = STRB; // port 1
p->nWR = INIT; // port 16
p->nWR = INIT; // port 16
} else if(strcmp(s, "bitshaker") == 0) {
// Use bitshaker wiring
p->A0 = nLF; // port 14
@@ -437,7 +437,7 @@ sed1330_init( Driver * drvthis )
} else {
report(RPT_ERR, "%s: Unknown ConnectionType %s", drvthis->name, s);
return -1;
}
}
report(RPT_INFO, "%s: Using ConnectionType %s", drvthis->name, s);
// Keypad ?
@@ -502,14 +502,14 @@ sed1330_init( Driver * drvthis )
if (p->framebuf_text == NULL) {
report(RPT_ERR, "%s: error allocating text framebuffer", drvthis->name);
return -1;
}
}
memset(p->framebuf_text, ' ', p->bytesperline * p->textlines_in_memory);
p->lcd_contents_text = (unsigned char *) malloc(p->bytesperline * p->textlines_in_memory);
if (p->lcd_contents_text == NULL) {
report(RPT_ERR, "%s: error allocating lcd_contents_text", drvthis->name);
return -1;
}
}
memset(p->lcd_contents_text, 0, p->bytesperline * p->textlines_in_memory);
p->framebuf_graph = (unsigned char *) malloc(p->bytesperline * p->graph_height);
@@ -523,7 +523,7 @@ sed1330_init( Driver * drvthis )
if (p->lcd_contents_graph == NULL) {
report(RPT_ERR, "%s: error allocating lcd_contents_graph", drvthis->name);
return -1;
}
}
memset(p->lcd_contents_graph, 0xFF, p->bytesperline * p->graph_height);
// Arrange for access to port
@@ -538,7 +538,7 @@ sed1330_init( Driver * drvthis )
report(RPT_ERR, "%s: timing_init() failed (%s)",
drvthis->name, strerror(errno));
return -1;
}
}
// INITIALIZE THE LCD
// End reset-state
@@ -650,7 +650,7 @@ sed1330_close( Driver * drvthis )
if (p->keyMapMatrix[i][j] != NULL)
free(p->keyMapMatrix[i][j]);
}
}
}
if (p->framebuf_text != NULL)
free(p->framebuf_text);
@@ -700,7 +700,7 @@ sed1330_height( Driver * drvthis )
* \param drvthis Pointer to driver structure.
* \return Number of pixel columns a character cell is wide.
*/
MODULE_EXPORT int
MODULE_EXPORT int
sed1330_cellwidth(Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
@@ -716,7 +716,7 @@ PrivateData *p = drvthis->private_data;
* \param drvthis Pointer to driver structure.
* \return Number of pixel lines a character cell is high.
*/
MODULE_EXPORT int
MODULE_EXPORT int
sed1330_cellheight(Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
+34 -34
View File
@@ -3,14 +3,14 @@
* various protocols.
*/
/* This is the LCDproc driver for Point Of Sale ("POS") devices using
various protocols. While it currently only supports AEDEX,
/* This is the LCDproc driver for Point Of Sale ("POS") devices using
various protocols. While it currently only supports AEDEX,
it can be extended to provide support for many POS emulation types.
Copyright (C) 2006, 2007 Eric Pooch
This driver is based on MtxOrb.c driver and is subject to its copyrights.
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
@@ -107,7 +107,7 @@ get_info Implemented.
typedef enum {
POS_IEE = 0,
POS_IEE = 0,
POS_AEDEX, /* http://www.posguys.com/download/CD5220_Manual.pdf */
POS_Epson, /* http://www.barcode-manufacturer.com/pdf/vfd_manual.pdf */
POS_Emax,
@@ -146,7 +146,7 @@ typedef enum {
/** private data for the \c serialPOS driver */
typedef struct serialPOS_private_data {
int fd; /**< LCD file descriptor */
/* dimensions */
int width, height;
int cellwidth, cellheight;
@@ -157,7 +157,7 @@ typedef struct serialPOS_private_data {
/* defineable characters */
CGmode ccmode;
/* feature enable */
int hardwrap;
int hardscroll;
@@ -243,7 +243,7 @@ serialPOS_init (Driver *drvthis)
p->hardscroll = 0;
p->emulation_mode = POS_AEDEX;
debug(RPT_INFO, "serialPOS: init(%p)", drvthis);
/* READ CONFIG FILE */
@@ -395,7 +395,7 @@ serialPOS_close (Driver *drvthis)
p->backingstore = NULL;
free(p);
}
}
drvthis->store_private_ptr(drvthis, NULL);
debug(RPT_DEBUG, "serialPOS: closed");
}
@@ -552,19 +552,19 @@ serialPOS_flush (Driver *drvthis)
/* there are differences, ... */
report(RPT_DEBUG, "%s: l=%d string='%.*s'", __FUNCTION__, i, p->width, sp);
switch ((int)p->emulation_mode) {
case POS_AEDEX: {
int command = i+1;
if ( i == 0 && p->hardscroll == 1 )
command = AEDEXContinuousScroll;
snprintf(out, length, "%s%d%.*s%c", AEDEXPrefix, command, p->width, sp, 13);
debug(RPT_DEBUG, "%s%d%.*s%c", AEDEXPrefix, command, p->width, sp, 13);
break;
}
default:
/* Send to correct line, then write the data */
serialPOS_cursor_goto(drvthis, 1, i+1);
@@ -618,10 +618,10 @@ serialPOS_hardware_init(Driver *drvthis)
{
PrivateData *p = drvthis->private_data;
switch ((int)p->emulation_mode) {
case POS_AEDEX: {
/* The # character might interfere with the AEDEX command set,
/* The # character might interfere with the AEDEX command set,
so change the AEDEX attention code.
*/
unsigned int length = 8;
@@ -635,11 +635,11 @@ serialPOS_hardware_init(Driver *drvthis)
case POS_Epson:
write(p->fd, "\x1B\x40", 2);
break;
case POS_LogicControls:
write(p->fd, "\x11", 1);
break;
default:
return;
}
@@ -655,29 +655,29 @@ serialPOS_hardware_clear (Driver *drvthis)
{
/* Do a hardware clear, if possible. */
PrivateData *p = drvthis->private_data;
switch ((int)p->emulation_mode) {
case POS_AEDEX: {
unsigned int length = 7;
char out[length];
snprintf(out, length, "%s%c %d", AEDEXPrefix, AEDEXAllLineDisplay, 13);
write(p->fd, out, length);
break;
}
case POS_Epson:
write(p->fd, "\x0C", 1);
break;
case POS_LogicControls:
write(p->fd, "\x1F", 1);
break;
default:
return;
}
debug(RPT_DEBUG, "serialPOS: cleared LCD");
}
@@ -691,7 +691,7 @@ static void
serialPOS_linewrap (Driver *drvthis, int on)
{
PrivateData *p = drvthis->private_data;
p->hardwrap = on;
debug(RPT_DEBUG, "serialPOS: linewrap turned %s", (on) ? "on" : "off");
@@ -741,24 +741,24 @@ serialPOS_cursor_goto(Driver *drvthis, int x, int y)
PrivateData *p = drvthis->private_data;
unsigned int length = 8;
char out[length];
switch ((int)p->emulation_mode) {
case POS_Epson:
case POS_Epson:
length = 7;
snprintf(out, length, "%c%c%02d%02d", 0x1F, 0x24, x, y);
break;
case POS_LogicControls:
length = 4;
snprintf(out, length, "%c%02d", 0x10, (x-1+((y-1)*(p->width))));
break;
default:
return;
}
write(p->fd, out, length);
}
@@ -899,11 +899,11 @@ serialPOS_num(Driver * drvthis, int x, int num)
* \param y Vertical cursor position (row).
* \param state New cursor state.
*/
MODULE_EXPORT void
MODULE_EXPORT void
serialPOS_cursor (Driver *drvthis, int x, int y, int state)
{
PrivateData *p = drvthis->private_data;
switch ((int)p->emulation_mode) {
case POS_LogicControls:
switch (state) {
@@ -917,7 +917,7 @@ serialPOS_cursor (Driver *drvthis, int x, int y, int state)
break;
}
break;
default:
/* set cursor state not supported */
break;
@@ -988,7 +988,7 @@ serialPOS_get_key (Driver *drvthis)
key = "Escape";
break;
default:
report(RPT_DEBUG, "%s get_key: illegal key 0x%02X",
report(RPT_DEBUG, "%s get_key: illegal key 0x%02X",
drvthis->name, buf);
return NULL;
}
+6 -6
View File
@@ -142,11 +142,11 @@ serialVFD_init (Driver *drvthis)
debug(RPT_INFO, "%s(%p)", __FUNCTION__, drvthis);
/* Read config file */
p->use_parallel = drvthis->config_get_bool(drvthis->name, "use_parallel", 0, 0);
/* Which device should be used */
strncpy(p->device, drvthis->config_get_string(drvthis->name, "Device", 0, DEFAULT_DEVICE), sizeof(p->device));
p->device[sizeof(p->device)-1] = '\0';
@@ -210,7 +210,7 @@ serialVFD_init (Driver *drvthis)
/* Which displaytype */
p->display_type = drvthis->config_get_int(drvthis->name, "Type", 0, DEFAULT_DISPLAYTYPE);
/* Number of custom characters */
tmp = drvthis->config_get_int(drvthis->name, "Custom-Characters", 0, -83);
if ((tmp < 0) || (tmp > 99)) {
@@ -425,13 +425,13 @@ serialVFD_flush (Driver *drvthis)
Port_Function[p->use_parallel].write_fkt(drvthis, &p->hw_cmd[pos1_cursor][1], p->hw_cmd[pos1_cursor][0]);
last_chr = -1;
}
for (i = 0; i < (p->height * p->width); i++) {
/* Backing-store implementation. If it's already
* on the screen, don't put it there again
*/
if ((p->framebuf[i] != p->backingstore[i]) || (p->hw_cmd[hor_tab][0] == 0) ||
((p->framebuf[i] <= 30) && (custom_char_changed[(int)p->framebuf[i]] != 0))) {
if (last_chr < i-1) { // if not last char written cursor has to be moved.
+1 -1
View File
@@ -104,7 +104,7 @@ typedef struct serialVFD_private_data {
unsigned char hw_cmd[11][10]; // hardwarespecific commands
int usr_chr_dot_assignment[57]; // how to setup usercharacters
unsigned int usr_chr_mapping[31];// where to place the usercharacters (0..30) in the asciicode
unsigned int usr_chr_load_mapping[31];// needed for displays with different read and write mapping
unsigned int usr_chr_load_mapping[31];// needed for displays with different read and write mapping
int hbar_cc_offset; // character offset of the bars
int vbar_cc_offset; // character offset of the bars
char info[255];
+10 -10
View File
@@ -108,15 +108,15 @@ serialVFD_load_NEC_FIPC (Driver *drvthis)
{1 ,0x03},
{1 ,0x02},
{1 ,0x01}, // bright
{1 ,0x0D}, // pos1
{1 ,0x0D}, // pos1
// pos1 command is only used (and needed), when mv_cursor command is not supported
{1 ,0x1B}, // move cursor (set to 0 if not supported)
{1 ,0x0C}, // reset
{2 ,0x14, 0x11}, // init
{1 ,0x1A}, // set user char
{1 ,0x09}, // tab
{1 ,0x09}, // tab
{0 }}; // next_line (only used in line mode)
// Line mode will be used if Next_line command is set!!!
// Line mode will be used if Next_line command is set!!!
// Do not set if the display supports normal mode (most displays should do this).
for (tmp = 0; tmp < 11; tmp++)
@@ -467,7 +467,7 @@ serialVFD_load_IEE_95B (Driver *drvthis)
{0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9, 0xF8, 0xF7, 0xF6};
for (tmp = 0; tmp < 31; tmp++)
p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp];
// The following is only needet to set if the display needs a different setting
// for loading the usercharacters.
// Example: The character loaded to 0x00 will be shown at 0xFD.
@@ -556,7 +556,7 @@ serialVFD_load_IEE_96 (Driver *drvthis)
{0xFF, 0xFE, 0xFD};
for (tmp = 0; tmp < 31; tmp++)
p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp];
// The following is only needet to set if the display needs a different setting
// for loading the usercharacters.
// Example: The character loaded to 0x00 will be shown at 0xFD.
@@ -589,7 +589,7 @@ serialVFD_load_Futaba_NA202SD08FA (Driver *drvthis)
const char hw_cmd[10][4] ={{2 ,0x04, 0x20}, // dark
{2 ,0x04, 0x40},
{2 ,0x04, 0x60},
{2 ,0x04, 0xFF}, // bright
{2 ,0x04, 0xFF}, // bright
{1 ,0x16}, // pos1
{1 ,0x1B}, // move cursor (set to 0 if not supported)
{1 ,0x15}, // reset
@@ -639,7 +639,7 @@ serialVFD_load_Futaba_NA202SD08FA (Driver *drvthis)
{0,0,0,0,0,0, 0xF4, 0xF4, 0xF5, 0xF6, 0xF6, 0xF7, 0, 0xF0, 0xF1, 0xF2, 0xF3};
for (tmp = 0; tmp < 31; tmp++)
p->usr_chr_mapping[tmp] = usr_chr_mapping[tmp];
}
@@ -748,10 +748,10 @@ serialVFD_load_Nixdorf_BA6x (Driver *drvthis)
{4 ,0x1B, 0x5B, 0x32, 0x4A}, // reset
{3 ,0x1B, 0x52, 0x00}, // init
{0 }, // set user char
{0 }, // tab
{0 }, // tab
{2 ,0x0D, 0x0A} // next_line
// Next_line command is only used in line mode.
// Line mode will be used if Next_line command is set!!!
// Next_line command is only used in line mode.
// Line mode will be used if Next_line command is set!!!
// Set to "0" if display supports normal_mode!
};
for (tmp = 0; tmp < 11; tmp++)
+3 -3
View File
@@ -2,17 +2,17 @@
* ShuttleVFD driver
*
* Copyright (C) 2007 Thien Vu
*
*
* 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
+2 -2
View File
@@ -13,7 +13,7 @@
*
* Copyright (c) 2001 Manuel Stahl <mythos@xmythos.de>
*
*
*
*/
#include <stdlib.h>
@@ -487,7 +487,7 @@ t6963_low_dsp_ready (Driver *drvthis)
t6963_low_set_control(drvthis, 1, 0, 1, 0);
t6963_low_set_control(drvthis, 1, 1, 1, 1);
port_out(0x80, 0x00); // wait 1ms
}
}
T6963_DATAOUT(p->port);
}
+4 -4
View File
@@ -5,17 +5,17 @@
*/
/* Copyright (C) 1998-2004 The LCDproc Team
*
*
* 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
@@ -121,7 +121,7 @@ text_close (Driver *drvthis)
free(p->framebuf);
free(p);
}
}
drvthis->store_private_ptr(drvthis, NULL);
}

Some files were not shown because too many files have changed in this diff Show More