older version for rasplex, hope it works.
This commit is contained in:
@@ -233,11 +233,3 @@ missing
|
||||
mkinstalldirs
|
||||
stamp-h1
|
||||
tags
|
||||
|
||||
*.a
|
||||
*.o
|
||||
*.so
|
||||
.deps
|
||||
*.debian
|
||||
*.LSB
|
||||
*.rpm
|
||||
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
# Travis-CI file for Espruino
|
||||
|
||||
language: c
|
||||
|
||||
before_install:
|
||||
- chmod +x ./autogen.sh
|
||||
|
||||
script:
|
||||
- ./autogen.sh && ./configure --enable-drivers=all
|
||||
- make
|
||||
-436
@@ -1,436 +0,0 @@
|
||||
# Introduction
|
||||
|
||||
LCDproc wouldn't have been possible without the efforts and work of many
|
||||
dedicated enthusiasts and dabblers who have contributed to its development
|
||||
over the years. We acknowledge their contributions here.
|
||||
|
||||
Please help us keeping this file up to date. If you're submitting a pull
|
||||
request for the project, be sure to update this file to include yourself
|
||||
if you're not already listed. Include a brief bio if you'd like, and be sure
|
||||
to highlight the contributions you've made to the project. It's your
|
||||
spotlight!
|
||||
|
||||
If you're absent, misattributed or your name and/or contact information
|
||||
is inaccurate, please let us know (or submit a pull request to fix it)!
|
||||
|
||||
If you'd like to be removed from this file for some reason, please let us
|
||||
know so we can take care of it. You're also welcome to list only your
|
||||
name (or profile name) with no email address or other contact information
|
||||
as well. We love putting our contributors' names up in lights, but we're
|
||||
flexible :)
|
||||
|
||||
# Contributors
|
||||
|
||||
(listed in order of appearance)
|
||||
|
||||
- [William Ferrell (willfe)](mailto:willfe@gmail.com)
|
||||
|
||||
- Project founder, author of first versions and much documentation, design
|
||||
for V0.4, "benevolent dictator for life" (to shamelessly borrow a page
|
||||
from Linus Torvald's playbook).
|
||||
|
||||
> It's willfe's fault that LCDproc exists. He wanted his computer to have a
|
||||
heartbeat, like some HP workstations and servers do. So he found a nice LCD,
|
||||
wrote some amazingly spiffy software for it, and life was good.
|
||||
|
||||
- [Selene Scriven (ToyKeeper)](mailto:lcdproc@toykeeper.net)
|
||||
|
||||
- Wrote V0.3 and most of V0.4, and helped procrastinate the rest
|
||||
of the time...
|
||||
|
||||
> ToyKeeper was the main programmer for LCDproc 0.2 - 0.4-pre9. She took
|
||||
willfe's idea and put it in its current form.
|
||||
|
||||
- Gareth Watts (Xeno42)
|
||||
|
||||
- Patches, mailing list, ideas, web hosting, CVS, etc.
|
||||
|
||||
|
||||
- [Matrix Orbital Corporation](http://www.matrixorbital.com/)
|
||||
|
||||
- Free displays for many of the developers, and immeasurable help
|
||||
(especially early on).
|
||||
|
||||
|
||||
- [Crystalfontz America, Inc.](http://www.crystalfontz.com/)
|
||||
|
||||
- Sends us sample/test units to get LCDproc running on all their models
|
||||
- Rescued the lcdproc.org/com/net domains when their registrations
|
||||
expired and they were "ransomed" by a domain squatter
|
||||
|
||||
|
||||
- [Lorand Bruhacs](mailto:bruhacs@ip23.net)
|
||||
|
||||
- Developed LCDproc v0.3.5, which added lots of nifty stuff while
|
||||
keeping the old program model
|
||||
|
||||
|
||||
- [Benjamin Tse](mailto:blt@Comports.com), [Matthias Prinke](mailto:m.prinke@trashcan.mcnet.de)
|
||||
|
||||
- HD44780 driver and predecessors
|
||||
|
||||
|
||||
- [Richard Rognlie](mailto:rrognlie@gamerz.net)
|
||||
|
||||
- Work on HD44780 driver
|
||||
- GIF driver (lost code)
|
||||
|
||||
|
||||
- Tom Wheeley
|
||||
|
||||
- IRMan input driver
|
||||
|
||||
|
||||
- Bjoern Andersson
|
||||
|
||||
- Autoconf/automake build system
|
||||
- Curses driver
|
||||
|
||||
|
||||
- [Andrew McMeikan](mailto:andrewm@engineer.com)
|
||||
|
||||
- HD44780 driver
|
||||
|
||||
|
||||
- David Glaude
|
||||
|
||||
- Lirc driver (not the current version)
|
||||
- IRMAN driver,
|
||||
- lcdproc big clocK screen.
|
||||
- Matrix Orbital enhancement: Big Number, general-purpose output,
|
||||
dynamic custom char allocation, i2c support (lost)
|
||||
- Crystal Fontz drivers
|
||||
- Matrix orbital GLK driver
|
||||
|
||||
|
||||
- Todd Porter
|
||||
|
||||
- Windows 95/98 and NT version
|
||||
|
||||
|
||||
- Jason Dale Woodward
|
||||
|
||||
- widget scrolling
|
||||
|
||||
|
||||
- Ethan Dicks
|
||||
|
||||
- PIC-an-LCD original driver (later merged into HD44780 driver)
|
||||
- fixes & tests to the MtxOrb driver and some clients
|
||||
- lcdident.pl client
|
||||
|
||||
|
||||
- Michael Reinelt
|
||||
|
||||
- SED1520 (copied work of him)
|
||||
|
||||
|
||||
- Simon Harrison
|
||||
|
||||
- SVGAlib driver
|
||||
|
||||
|
||||
- Horizon Technologies
|
||||
|
||||
- WIRZ-SLI driver
|
||||
|
||||
|
||||
- Charles Steinkuehler
|
||||
|
||||
- Work on HD44780 timing code
|
||||
|
||||
|
||||
- Harald Klein
|
||||
|
||||
- Lirc driver (initial version of the current code)
|
||||
- Metar Client
|
||||
|
||||
- Philip Pokorny
|
||||
|
||||
- Crystal Fontz driver
|
||||
- Matrix Orbital driver
|
||||
- Matrix Orbital GLK driver
|
||||
- Curses driver
|
||||
|
||||
|
||||
- Glen Gray
|
||||
|
||||
- David Douthitt
|
||||
|
||||
- Crystal Fontz driver
|
||||
- Matrix Orbital driver
|
||||
- Matrix Orbital GLK driver
|
||||
- Curses driver
|
||||
|
||||
- Eddie Sheldrake
|
||||
|
||||
- Crystal Fontz driver
|
||||
|
||||
|
||||
- Rene Wagner
|
||||
|
||||
- LCDM001 driver
|
||||
- ASCII emulation of BigNum
|
||||
- CFontz v2.0 patches merging,
|
||||
- LIRC driver updates (new API, merged David's code)
|
||||
- Lots of driver updates for v0.4.3 (configfile, reporting):
|
||||
- CFontz
|
||||
- curses
|
||||
- glk
|
||||
- MtxOrb
|
||||
- EPM list file for automatic package generation,
|
||||
- current documentation in docbook format
|
||||
- v0.4.3 backlight and heartbeat implementation
|
||||
- Lots of other stuff for the v0.4.3 release
|
||||
|
||||
|
||||
- Andre Breiler
|
||||
|
||||
- Matrix Orbital driver
|
||||
|
||||
|
||||
- Joris Robijn
|
||||
|
||||
- HD44780 driver maintenance and enhancement
|
||||
- Config file stuff
|
||||
- Reporting stuff
|
||||
- Work on API v0.5 architecture and implementation, loadable drivers.
|
||||
- Menu stuff of v0.5
|
||||
- SED1330 driver
|
||||
|
||||
|
||||
- Guillaume Filion
|
||||
|
||||
- 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.
|
||||
- Autoconf/automake stuff.
|
||||
- Various small 0.4.3 changes.
|
||||
|
||||
|
||||
- Chris Debenham
|
||||
|
||||
- Matrix Orbital GLK driver
|
||||
- LB216 driver
|
||||
|
||||
|
||||
- Mark Haemmerling
|
||||
|
||||
- HD44780 character conversion table
|
||||
|
||||
- Robin Adams
|
||||
|
||||
- SED1520 driver
|
||||
- STV5730 driver
|
||||
|
||||
|
||||
- Manuel Stahl
|
||||
|
||||
- T6963 driver
|
||||
|
||||
|
||||
- Mike Patnode
|
||||
|
||||
- Crystal Fontz
|
||||
- Various 0.4.3 changes
|
||||
|
||||
|
||||
- Peter Marschall
|
||||
|
||||
- new drivers: IOWarrior, xosdlib
|
||||
- bwctusb connectiontype for the HD44780 driver
|
||||
- extensions to CFontz* drivers: support CF631 & CF635
|
||||
- various fixes in preparation of 0.5
|
||||
- lcd2usb connectiontype for the HD44780 driver
|
||||
|
||||
|
||||
- Markus Dolze
|
||||
|
||||
- project maintainer
|
||||
- various fixes (especially for *BSD)
|
||||
- merged and extended network interface statistics to lcdproc client
|
||||
- new LCDd network input buffering
|
||||
|
||||
|
||||
- Volker Boerchers
|
||||
|
||||
- fixes and extensions to the menu system
|
||||
|
||||
- Lucian Muresan
|
||||
|
||||
- glcdlib meta driver
|
||||
|
||||
- Matteo Pillon
|
||||
|
||||
- lcdserializer connectiontype to the hd44780 driver
|
||||
- various improvements to the serial connections of the hd44780 driver
|
||||
|
||||
|
||||
- Laurent Arnal
|
||||
|
||||
- connectiontype for LIS2 displays from VLSystem
|
||||
(http://www.vlsys.co.kr)
|
||||
|
||||
|
||||
- Simon Funke
|
||||
|
||||
- driver for Noritake VFD
|
||||
|
||||
|
||||
- Matthias Goebl <matthias.goebl@goebl.net>
|
||||
|
||||
- I2C connectiontype for the HD44780 driver
|
||||
|
||||
|
||||
- Stefan Herdler
|
||||
|
||||
- serialVFD driver
|
||||
- bignum library
|
||||
|
||||
|
||||
- Bernhard Walle
|
||||
|
||||
- driver for the ULA-200 device from ELV (http://www.elv.de)
|
||||
|
||||
|
||||
- Andrew Foss
|
||||
|
||||
- menu support for lcdproc client
|
||||
|
||||
|
||||
- Anthony J. Mirabella
|
||||
|
||||
- Logitech g15 driver
|
||||
|
||||
|
||||
- Cedric Tessier
|
||||
|
||||
- EyeBoxOne driver
|
||||
|
||||
|
||||
- John Sanders
|
||||
|
||||
- iMon driver graphics support
|
||||
|
||||
|
||||
- Eric Pooch
|
||||
|
||||
- Mac OS X / Darwin support
|
||||
- serialPOS driver
|
||||
- uss720 connection type for hd44780 driver
|
||||
- driver for SoundGraph iMON OEM LCD Modules
|
||||
|
||||
|
||||
- Benjamin Wiedmann
|
||||
|
||||
- Added functionality for HITACHI SP14Q002 gLCD (320x240)
|
||||
- Implemented dynamic wiring scheme selection for SED1330 driver
|
||||
("ConnectionType")
|
||||
|
||||
|
||||
- Frank Jepsen
|
||||
|
||||
- vdr-wakeup support in hd44780 driver (originally for v0.4.5)
|
||||
- new options for the hd44780 driver
|
||||
|
||||
- Karsten Festag
|
||||
|
||||
- ea65 driver
|
||||
|
||||
|
||||
- Gatewood Green
|
||||
|
||||
- picolcd driver
|
||||
|
||||
|
||||
- Dave Platt
|
||||
|
||||
- overhauled CwLnx driver
|
||||
|
||||
|
||||
- Nicu Pavel
|
||||
|
||||
- overhauled & extended picolcd driver
|
||||
|
||||
|
||||
- Daryl Fonseca-Holt
|
||||
|
||||
- lis driver
|
||||
|
||||
|
||||
- Thien Vu
|
||||
|
||||
- shuttleVFD driver
|
||||
|
||||
|
||||
- Thomas Jarosch
|
||||
|
||||
- support reporting in hd44780's ConnectionType functions
|
||||
- build-system clean up: use pkg-config for some libs
|
||||
- HD44780 connection type for a USB connection via a FTDI FT2232D chip
|
||||
- i2500vfd driver
|
||||
|
||||
|
||||
- Christian Jodar
|
||||
|
||||
- mx5000 driver
|
||||
|
||||
|
||||
- Mariusz Bialonczyk
|
||||
|
||||
- ethlcd connection type for HD44780
|
||||
|
||||
|
||||
- Jack Cleaver
|
||||
|
||||
- LIRC support in picolcd
|
||||
|
||||
|
||||
- Aron Parsons (Phant0m)
|
||||
|
||||
-IRtrans driver
|
||||
|
||||
|
||||
- Malte Poeggel
|
||||
|
||||
- support for ST7036 controller in hd44780
|
||||
|
||||
|
||||
- Dean Harding, Christian Leuschen, Jonathan Kyler
|
||||
|
||||
- driver for SoundGraph iMON OEM LCD Modules
|
||||
|
||||
|
||||
- Laurent Latil
|
||||
|
||||
- SureElec driver for devices made by SURE Electronics
|
||||
|
||||
|
||||
- Christoph Rasim
|
||||
|
||||
- MDM166A driver for Futaba/Targa USB VFD
|
||||
|
||||
|
||||
- bjo81
|
||||
|
||||
- Driver for lcm162-module (by H. Rasch)
|
||||
(https://github.com/lcdproc/lcdproc/pull/6)
|
||||
|
||||
|
||||
- [Harald Geyer](mailto:harald@ccbib.org)
|
||||
|
||||
- Driver for the linux input subsystem
|
||||
- Driver and font for Olimex MOD-LCD1x9 14 segment display
|
||||
- Various minor and not-so-minor cleanups and fixes
|
||||
|
||||
|
||||
- M. Feser and R. Geigenberger <yard2lcdproc (.A.T.) yard2usb.de>
|
||||
|
||||
- Driver for YARD2 display devices
|
||||
|
||||
|
||||
- Colin Munro (colinmunro)
|
||||
- Shane Spencer (hardwire)
|
||||
- Jim McCracken (merlin_jim)
|
||||
- Luis Llorente (luisllo)
|
||||
-516
@@ -1,516 +0,0 @@
|
||||
v0.5dev (ongoing development)
|
||||
- [added] Add travis file for Auto build testing of lcdproc (https://github.com/lcdproc/lcdproc/pull/2)
|
||||
- [fixed] Update hd44780-i2c driver, pins defined via config file, rather than hardcoded (https://github.com/lcdproc/lcdproc/pull/1)
|
||||
- [fixed] Portability fixes (https://github.com/lcdproc/lcdproc/pull/4)
|
||||
- [added] Add driver for lcm162-module (by H. Rasch) (https://github.com/lcdproc/lcdproc/pull/6)
|
||||
- [added] New driver linux_input (https://github.com/lcdproc/lcdproc/pull/7)
|
||||
- [fixed] Cleanup I2C handling (https://github.com/lcdproc/lcdproc/pull/8)
|
||||
- [fixed] Add more patterns to .gitignore (https://github.com/lcdproc/lcdproc/pull/9)
|
||||
- [added] New driver for Olimex MOD-LCD1x9
|
||||
- [fixed] Allow multibyte characters (from string widget)
|
||||
- [added] New driver for YARD2 devices (https://github.com/lcdproc/lcdproc/pull/19)
|
||||
|
||||
v0.5.7
|
||||
- [fixed] Fix using the left key to change the ring and checkbox menu items
|
||||
- [fixed] sed1520: Add an option for inverted segment mapping (idea by R. Buchert)
|
||||
- [fixed] Fix build if compiled with --enable-permissive-menu-goto (#3599609)
|
||||
- [fixed] glcd driver: Add direct support for framebuffer with paged memory layout
|
||||
- [added] hd44780: Added 'raspberrypi' connection type (P. Corner)
|
||||
- [fixed] Build system: Rename configure.in to configure.ac
|
||||
- [added] hd44780: Add support for FreeBSD's iic I2C framework
|
||||
- [added] hd44780: New connection type 'piplate' (J. Brogdon)
|
||||
- [fixed] lcdproc client: Add option to turn off title on OldTime screen
|
||||
- [added] glcd driver: Connection type 'x11' that draws to a X window (S. Meharg)
|
||||
- [added] glcd driver: 'picolcdgfx' for picoLCD 256x64 from Mini-Box.com (S. Meharg)
|
||||
- [fixed] picolcd: Improvements to IR processing (M. Jones)
|
||||
- [added] hd44780: Added 'spi' connection type (S. Dawson)
|
||||
- [fixed] hd55780/serial: Change data escape handling (G. Smith)
|
||||
- [added] hd44780: New connection type 'pifacecad' (T. Preston)
|
||||
- [added] new driver: rawserial - dump framebuffer to serial port (C. Wolf)
|
||||
|
||||
v0.5.6
|
||||
- [removed] Remove deprecated CFontz633 driver. Use CFontzPacket with Model=633 instead!
|
||||
- [added] new driver: glcd unified graphic display driver (M. Dolze)
|
||||
- [added] new driver: vlsys_m428 driver for Moneual MonCaso 320 (W. Hauck)
|
||||
- [fixed] hd44780/serial: Fix handling of keys for LoS-Panel (M. Kirchner)
|
||||
- [fixed] hd44780/serial: Change backlight handling (see commit message)
|
||||
- [added] glcd driver: Add FreeType 2 rendering support (B. Walle and M. Dolze)
|
||||
- [added] glcd driver: New connection type 'png', writes framebuffer as PNG image
|
||||
- [added] hd44780: Fix vBars and block icon not working correctly on the same screen
|
||||
- [fixed] Build system: Link LCDd itself with pthread library if available
|
||||
- [fixed] lcdproc client: Unbreak build on OpenBSD non-i386 (E. Barrett)
|
||||
- [fixed] lcdproc client: Fix core dumps on FreeBSD if started as non-root
|
||||
- [added] glcd driver: new connection type 'serdisplib'
|
||||
- [added] glcd driver: new connection type 'glcd2usb'
|
||||
- [fixed] lcdproc client: On FreeBSD show only unique processes in 'S' screen
|
||||
- [fixed] picolcd: Use libusb-1.0 asynchronous transfers to fix missed keys (M. Jones)
|
||||
- [fixed] sed1520: Make it work without using an external inverter
|
||||
- [fixed] lis driver: Make the last pixel row work (add lastline option parsing)
|
||||
- [fixed] hd44780/ftdi: Fix error in setting backlight and add backlight for 4bit mode
|
||||
- [added] new driver: sdeclcd for Watchguard FireBox appliances (F. Mertz)
|
||||
- [added] hd44780: Added 'usb4all' connection type (T. Mohaupt)
|
||||
- [fixed] Fix RPM init script hanging on recent OS (#3488223)
|
||||
- [fixed] lcdproc client: Fix build on OpenBSD >= 5.0
|
||||
- [fixed] hd44780/serial: Add support for adjustable backlight
|
||||
- [fixed] Build system: Fix build with automake >= 1.11.3 (#3494755)
|
||||
- [fixed] Fix clang compiler warnings about obsolete GNU designated initializers
|
||||
- [fixed] Fix crash when adding a menu item without text and options (S. Dawson)
|
||||
|
||||
v0.5.5
|
||||
- [added] sed1330 driver: Add support for HG25504 (L. Lagendijk)
|
||||
- [fixed] Build system: Fix xosd detection
|
||||
- [fixed] Reset ccmode on screen clear for NoritakeVFD, tyan driver
|
||||
- [fixed] All drivers: Refactor CGmode enum into lcd.h
|
||||
- [fixed] hd44780: New (possible faster) screen update algorithm
|
||||
- [added] Add an option to start LCDd with screen rotation disabled (M. Zanetti)
|
||||
- [fixed] Rewrite of the t6963 driver fixing several problems (see commit note).
|
||||
- [fixed] picolcd: Add OffBrightness (S. Crane), more icons and fix bignum
|
||||
- [fixed] lcdproc: Fix a single dot appearing on line 5 of the D screen
|
||||
- [fixed] lcdproc: Make the iface screen more readable on 2x16 displays
|
||||
- [fixed] All drivers: sync functions with prototypes
|
||||
- [fixed] Port remaining drivers to 0.5 API (glk, lcdm001, stv5730)
|
||||
- [fixed] Pyramid: Only send LED state changes, doxygen-ize
|
||||
- [fixed] sed1520: Make it work with 68-family style interface, convert to 0.5 API
|
||||
- [fixed] hd44780/imon: Add charmap for NEC uPD16314 and make it configurable
|
||||
- [fixed] Pyramid: Convert set_char to 8 byte bitmap, add support for bignum
|
||||
- [fixed] Convert set_char of drivers bayrad, lb216, lcterm, mtc_s16209x, wirz-sli
|
||||
- [fixed] CFontzPacket: Fix not using select() even if its available
|
||||
- [fixed] CFontzPacket: Use cellwidth = 5 on CFA-631 and CFA-635 too
|
||||
- [fixed] t6963: Convert font to 8 byte bitmap
|
||||
- [fixed] convert i2500vfd and mdm166a driver to use 8 byte bitmap custom character
|
||||
- [fixed] ula200: convert custom characters to 8 byte bitmap
|
||||
- [fixed] Build system: Fix trying to install svga driver twice
|
||||
- [added] imon: Add bignum support (Y. Scheglyuk)
|
||||
- [fixed] hd44780/ethlcd: fix LCDd hang up on network error (exits now) (M. Bialonczyk)
|
||||
- [added] New common 5x8 font for t6963, sed1520, mdm166a and i2500vfd
|
||||
- [fixed] t6963: Size has now to be configured in pixels instead of characters
|
||||
- [added] Build system: --enable-extra-charmaps option adds language specific charmaps
|
||||
- [fixed] imonlcd: Fix spinning of disc icon (E. Pooch)
|
||||
- [fixed] SureElec: Change port initialization (SF 3212891)
|
||||
- [fixed] curses: Fix missed keystrokes (from Debian)
|
||||
- [fixed] curses: Correct the name of the info function.
|
||||
- [fixed] Update LCDd.conf to be better understood by Config::Model (D. Dumont)
|
||||
- [fixed] CFontz: Fix display of bars
|
||||
|
||||
v0.5.4
|
||||
- [fixed] Update driver includes and LDFLAGS (fixed glk and bayrad binding error)
|
||||
- [fixed] Modify all drivers to use server/drivers/report.h instead of shared/report.h
|
||||
- [fixed] Make all drivers using parallel port fail if they cannot get IO permission
|
||||
- [fixed] Include <errno.h> instead of <sys/errno.h> everywhere (found by S. Klauer)
|
||||
- [fixed] configure: Fix de-selecting of drivers
|
||||
- [fixed] Build system: Add a check testing if SA_RESTART flag is available.
|
||||
- [fixed] picolcd driver: Fix RC-5 for picoLCD 20x2 (A. van Schie)
|
||||
- [fixed] Introduce shared/defines.h to collect commonly used macros
|
||||
- [added] new driver: SureElec for devices made by SURE Electronics (Laurent Latil)
|
||||
- [fixed] hd44780-4bit: Fix bug not checking for keypad rows 7-10 correctly
|
||||
- [fixed] Modify serial drivers to use cfmakeraw
|
||||
- [added] hd44780: Add a 'none' charmap which does not replace any character
|
||||
- [fixed] hd44780: Change mapping for spanish 'n with tilde' characters
|
||||
- [fixed] hd44780: Exclude pin for switchable backlight from keypad scanning
|
||||
- [fixed] server core: New network input buffering
|
||||
- [fixed] hd44780: Extended subdriver API and performance improvement for lcd2usb
|
||||
- [fixed] hd44780: Add KOI8-R character mapping (Yura Scheglyuk)
|
||||
- [fixed] shuttleVFD: Add support for devices with USB VID 0x1308 again
|
||||
- [fixed] CFontzPacket: Add CFA-533. Use HD44780 character mapping for CFA533/633.
|
||||
- [fixed] CFontzPacket: Report cell size correctly, use block character for icon.
|
||||
- [fixed] CFontz633: Deprecate this driver. Use CFontzPacket with Model=633 instead!
|
||||
- [removed] Remove native win32 support.
|
||||
- [fixed] picolcd: Use module output function to control key LEDs (Martin Jones)
|
||||
- [added] hd44780: Added 'usbtiny' connection type (Siarhei Herasimchuk)
|
||||
- [fixed] SureElec: Fix stall on startup
|
||||
- [added] new driver: MDM166A for Futaba/Targa USB VFD (Christoph Rasim)
|
||||
- [fixed] picolcd: Fix backlight and contrast handling (M. T. Jones)
|
||||
- [fixed] picolcd: Fix heartbeat icon messing up with vbar
|
||||
- [fixed] imonlcd: Fix possible lockup in output (icons) function (E. Pooch)
|
||||
- [fixed] pyramid: Fix buffer overflow in set_leds, incorrect escaping, and icons
|
||||
|
||||
v0.5.3
|
||||
- [added] lcdexec: notification when called program finishes
|
||||
- [added] xosd driver: offset from top-left corner
|
||||
- [added] LCDd: Hello= config option for startup message
|
||||
- [fixed] glk driver: bignum support fixed
|
||||
- [fixed] update local snprintf to the last one, which is GPL
|
||||
- [removed] server core: cleanup - remove unnecessary cruft
|
||||
- [fixed] server core: refactor rendering code
|
||||
- [added] LCDd: config options TitleSpeed= and Heartbeat=
|
||||
- [fixed] overhauled CwLnx driver (Dave Platt)
|
||||
- [fixed] overhauled picolcd driver (Nicu Pavel)
|
||||
- [added] add ServerScreen=blank option value
|
||||
- [fixed] MtxOrb driver: fix VFD/VKD support (Ethan Dicks)
|
||||
- [added] new driver lis for VLSystem L.I.S VFD (Daryl Fonseca-Holt)
|
||||
- [fixed] serialPOS driver: input support, cleanup (Eric Pooch)
|
||||
- [added] new driver shuttleVFD for USB-based Shuttle VFDs (Thien Vu)
|
||||
- [fixed] enable building lcdproc client on FreeBSD AMD64 platform (M. Dolze)
|
||||
- [fixed] Autoconf fixes for Net/FreeBSD (M. Dolze)
|
||||
- [fixed] fixes for the lcpdroc client iface screen on *BSD (M.Dolze)
|
||||
- [added] key support for hd44780/lcd2usb (M. Dolze)
|
||||
- [added] option Priority for NoritakeVFD (idea: Richard Muratti)
|
||||
- [fixed] overhauled NoritakeVFD driver (idea: Richard Muratti)
|
||||
- [fixed] allow wrapping slider menu items with <= 4 keys (M. Dolze)
|
||||
- [fixed] a bit more Doxygen-ation and documentation
|
||||
- [fixed] hd44780 driver: make ConnectionType 4bit more fool-proof (M. Dolze)
|
||||
- [fixed] picolcd driver: overhaul USB init for more portability (M. Dolze)
|
||||
- [added] curses driver: new option DrawBorder (Bruno Schwander)
|
||||
- [fixed] avoid sending duplicate "success" messages in response to menu_add_item
|
||||
- [added] lcdexec: parameter support using widgets
|
||||
- [fixed] server core: display values in menu for all input MenuEntry types
|
||||
- [fixed] hd44780 driver: reorganize ConnectionType recognition
|
||||
- [added] hd44780 driver: new ConnectionType mplay
|
||||
- [added] hd44780 driver: get/set contrast & brightness support for lcd2usb (M. Dolze)
|
||||
- [added] hd44780 driver: reporting in ConnectionType functions (Thomas Jarosch)
|
||||
- [fixed] clean up build system (T. Jarosch, with tests/fixes by M. Dolze)
|
||||
- [added] hd44780 driver: new ConnectionType ftdi (Thomas Jarosch)
|
||||
- [fixed] shuttleVFD driver: fix VendorID, support newer models (Miska Sulander)
|
||||
- [added] i2500vfd driver for a graphical Noritake VFD (Thomas Jarosch)
|
||||
- [fixed] hd44780 driver: more complete initialization (idea by Pierre Ossman)
|
||||
- [fixed] hd44780 driver: "euro" character mapping table (Markus Dolze)
|
||||
- [fixed] CwLnx driver: support for CW12832
|
||||
- [added] new driver mx5000 for Logitech MX5000 keyboards (Christian Jodar)
|
||||
- [fixed] update debian init scripts to allow multiple instances of clients
|
||||
- [added] serialVFD driver: support for 4 more display types (Stefan Herdler)
|
||||
- [fixed] IOWarrior driver: fixed 4-line display use
|
||||
- [added] IOWarrior driver: add ExtendedMode option
|
||||
- [fixed] lcdproc: unbreak compilation on OS X 1.5 and higher (Topher Fangio)
|
||||
- [fixed] server: fix interpretation of numeric priorities (Andrew M. Bishop)
|
||||
- [added] hd44780 driver: new ConnectionType ethlcd (Mariusz Bialonczyk)
|
||||
- [added] picolcd driver: support to send IR commands to LIRC (Jack Cleaver)
|
||||
- [added] picolcd driver: support for 20x4 picoLCDs (Nicu Pavel)
|
||||
- [added] hd44780 driver: new ConnectionType uss720 (Eric Pooch)
|
||||
- [fixed] new make targets to compile & install server & clients separately
|
||||
- [fixed] autoconf fixes: check for pkg-config macros
|
||||
- [added] new driver irtrans (Phant0m / Aron Parsons)
|
||||
- [added] serialVFD driver: support Siemens/Wincor Nixdorf BA63/66 (Stefan Herdler)
|
||||
- [added] new client lcdident.pl (Ethan Dicks)
|
||||
- [fixed] server: prevent stalling if time goes backwards (M. Vallevand)
|
||||
- [fixed] hd44780 driver: update the backlight setting only on change
|
||||
- [added] hd44780 driver: add lineaddress option to support ST7036 (Malte Poeggel)
|
||||
- [added] lcdproc: Retrieve per CPU usage statistics on FreeBSD (M. Dolze)
|
||||
- [fixed] Change drivers to start in background by default: bayrad, CFontz, ea65, glk
|
||||
- [fixed] imon driver: Change hbars to make last char in-/decrease vertically
|
||||
- [added] hd44780 driver: port usblcd connection type from 0.4.5 to 0.5 (M. Dolze)
|
||||
- [fixed] server: Fix interpretation of named screen priorities
|
||||
- [added] new driver imonlcd for SoundGraph iMON LCD (Dean Harding, Jonathan Kyler)
|
||||
- [fixed] MtxOrb driver: Fix backlight for old firmware
|
||||
- [fixed] Add checks for null pointer / failed malloc to menu code
|
||||
- [fixed] lcdproc, lcdexec, lcdvc clients: Use our included getopt.h
|
||||
- [fixed] documentation: Fix XML errors in user and developer guide
|
||||
- [added] documentation: Add man page for lcdvc
|
||||
|
||||
v.0.5.2
|
||||
- [fixed] fix switching on/off the Load screen in lcdproc client using the menu
|
||||
- [fixed] refactor adv_bignum: support height > 4, loadable chars with offset
|
||||
- [fixed] ged rid of global variables buffer & tmp in lcdproc client
|
||||
- [added] add init-script templates for LSB 3.x conforming systems
|
||||
- [fixed] fix cellwidth in iMon driver
|
||||
- [added] graphics character support in iMon driver (John Saunders)
|
||||
- [fixed] try harder to find a shell in lcdexec
|
||||
- [added] big number support in CwLnx driver via bignum library
|
||||
- [fixed] do not copy more bytes than reserved in get_fs() in lcdproc's machine_*.c
|
||||
- [fixed] update lcdproc's About screen with credits
|
||||
- [fixed] fixes to ula200 build environment and documentation (B. Walle)
|
||||
- [fixed] update g15 driver to be compatible with g15daemon > 1.2 (Anthony J. Mirabella)
|
||||
- [fixed] allow compiling with LDFLAG "--as-needed" (Robert Buchholz)
|
||||
- [fixed] optimize MtxOrb flush()
|
||||
- [fixed] make MtxOrb use Brightness and OffBrightness like CFontzPacket
|
||||
- [fixed] make Brightness & OffBrightness run-time configurable in CFontz & MtxOrb
|
||||
- [fixed] add support for Iface and ProcSize screens for OS X / Darwin (Eric Pooch)
|
||||
- [fixed] update & fix serialVFD driver (Stefan Herdler)
|
||||
- [added] Hitachi SP14Q002 support & ConnectionType setting for sed1330 (Benjamin Wiedmann)
|
||||
- [fixed] replace obsolete index() by strchr() (Guillaume LECERF)
|
||||
- [fixed] fixes for CwLinux driver (Gideon Tsang)
|
||||
- [added] new ConnectionType vdr-wakeup in hd44780 driver (originally Frank Jepsen)
|
||||
- [fixed] fixes for the hd44780-serial drivers (Matteo Pillon)
|
||||
- [added] new options for the hd44780 driver (Frank Jepsen)
|
||||
- [added] new driver for text based serial Point of Sale displays (Eric Pooch)
|
||||
- [added] new 2-line bignum mode using 6 user defined characters (Robin Gilks)
|
||||
- [fixed] fix custom characters [with NewFirmware=yes] & backlight in CFontz
|
||||
- [added] ea65 - driver for VFD in AOpen XC Cube AV EA65 barebones (Karsten Festag)
|
||||
- [added] picolcd - driver for Mini-box.com USB LCD picoLCD (Gatewood Green)
|
||||
- [added] new ConnectionType pertelian in hd44780 driver (Matteo Pillon)
|
||||
- [added] new ConnectionType lcd2usb in hd44780 driver
|
||||
- [added] make LCDd's GoodBye message configurable
|
||||
- [removed] remove compile-time option to read configuration from LDAP
|
||||
|
||||
v.0.5.1
|
||||
- [added] config file support in lcdproc client (Andrew Foss)
|
||||
- [fixed] install server & client config files in $(sysconfdir)
|
||||
- [added] new client lcdvc: virtual console on LCD
|
||||
- [fixed] convert adv_bignum library to bitwise set_char()
|
||||
- [fixed] adapt drivers to modified bignum library:
|
||||
- [added] CFontz
|
||||
- [added] CFontz633
|
||||
- [added] CFontzPacket
|
||||
- [added] hd44780
|
||||
- [added] IOWarrior
|
||||
- [added] MtxOrb
|
||||
- [added] serialVFD
|
||||
- [added] tyan
|
||||
- [added] add iface screen(s) to lcdproc client (Andrew Foss/Markus Dolze)
|
||||
- [fixed] update sample Perl clients
|
||||
- [fixed] fix LCDd crash on shutdown of clients using "menu_set_main" (Andrew Foss)
|
||||
- [fixed] fix sock_connect() to allow 0 as legal socket (Frederick Nacino)
|
||||
- [fixed] improve serialVFD driver (Stefan Herdler)
|
||||
- [added] add MD8800 driver for LCDs in Medion MD8800 PCs (Stefan Herdler/Martin Møller)
|
||||
- [fixed] make bigclock client screen more flexible: centered, require only 14 chars
|
||||
- [fixed] correct axis mapping logic for joystick driver (Jannis Achstetter)
|
||||
- [fixed] fixes to the CFontz driver
|
||||
- [added] new unified serial sub-driver for hd44780 (Matteo Pillon)
|
||||
- [removed] obsolete hd44780 subdrivers-removed: lcdserializer, picanlcd
|
||||
- [fixed] character mapping for special HD44780 modules (Matteo Pillon)
|
||||
- [added] g15 - driver for LCD in Logitech G15 gaming keyboards (Anthony J. Mirabella)
|
||||
- [added] EyeboxOne - driver for the LCD display on the EyeboxOne (Cedric TESSIER)
|
||||
- [fixed] more flexible parsing of config files: allow spaces around sections and keys
|
||||
- [fixed] updated & extended documentation
|
||||
- [fixed] command line options more synchronizd between server and clients
|
||||
- [fixed] CFontzPacket & CFontz633 support big & little endian systems
|
||||
- [fixed] MtxOrb driver completely rewritten to support used-defined characters
|
||||
- [fixed] CwLnx driver completely rewritten to support Cw1602 LCDs in addition
|
||||
to the CW12232 LCDs
|
||||
- [fixed] more options in lcdproc's config file lcdproc.conf:
|
||||
- [added] time and date formats can be changed using strftime formats
|
||||
- [added] Load screen's LowLoad & HighLoad thresholds
|
||||
- [fixed] revamped lcdexec's menu configuration
|
||||
- [fixed] various little fixes
|
||||
|
||||
v0.5.0
|
||||
This version has split off from unstable-0.4.3. Includes major changes.
|
||||
- [added] LCDd now does dynamic loading of driver modules
|
||||
- [fixed] New API in use
|
||||
- [added] LCDd will use fill-in functions for drivers that don't support a certain
|
||||
function. Available for: vbar, hbar, bignum, heartbeat, icon, cursor.
|
||||
- [fixed] Server internal functions cleaned up, moved to other files etc.
|
||||
- [fixed] Menu system rewritten
|
||||
- [added] Client-supplied menus are now supported
|
||||
- [fixed] Key support improved: now keys have descriptive names, not just a letter
|
||||
anymore.
|
||||
- [added] Reloading of configuration and drivers by sending a SIGHUP. Probably
|
||||
needs improvement ;)
|
||||
- [fixed] HD44780 output register support on winamp wiring
|
||||
- [fixed] Reporting levels are now used more consistently
|
||||
- [added] lcdexec client added
|
||||
- [fixed] Display update frequency is now exactly 8Hz. Key scan frequency increased
|
||||
to 32Hz.
|
||||
- [fixed] Priority scheme changed. Priority classes are now used, that indicate what
|
||||
kind of a screen we're dealing with. More useful for interactive clients.
|
||||
- [added] better support for operating systems other than Linux: *BSD, Darwin
|
||||
- [added] menu support for lcdproc client (configure option)
|
||||
- [added] Added CFontz633 driver for CrytalFontz CFA633
|
||||
- [added] Added CFontzPacket driver fro CrystalFontz CFA-633, CFA-631, CFA-635
|
||||
- [added] Added glcdlib meta-driver for all LCDs supported by graphlcd-base
|
||||
- [added] Added icp_a106 driver for A106 alarm/LCD boards in 19" racks by ICP
|
||||
- [added] Added imon driver for iMON IR/VFD Modules from Silverstone, Uneed, ...
|
||||
- [added] Added IOWarrior driver for IOWarrior USB controllers
|
||||
- [added] Added lcterm driver for serial LCD terminal from Neumark Elektronik
|
||||
- [added] Added ms6931 driver for MSI-6931 displays in 1U rack servers by MSI
|
||||
- [added] Added mtc_s16209x driver for MTC-S16209x by Microtips Technology Inc
|
||||
- [added] Added NoritakeVFD driver for Noritake VFD Device CU20045SCPB-T28A
|
||||
- [added] Added pyramid driver for Pyramid LC-Displays
|
||||
- [added] Added serialVFD driver for NEC FIPC8367 based serial VFDs
|
||||
- [added] Added tyan driver for LCDs in Tyan Barebone GS series
|
||||
- [added] Added ula200 driver for the USB board ULA-200 from ELV
|
||||
- [added] Added xosd driver for On Screen Display on X
|
||||
- [added] Added HD44780 subdriver bwctusb for USB-to-LCD converters from BWCT
|
||||
- [added] Added HD44780 subdriver lcdserializer for an serial-LCD converter
|
||||
- [added] Added HD44780 subdriver i2c to conned LCDs using the I2C bus
|
||||
- [added] Added HD44780 subdriver lis2 for the LIS2 serial-to-USB converter
|
||||
|
||||
v0.4.3
|
||||
- [removed] Removed possibility of passing arguments to the drivers from the
|
||||
command line, which can be done in the configuration file now
|
||||
- [added] Added configuration file support
|
||||
- [added] Added ability of dropping root privileges to LCDd
|
||||
- [added] Added LCDM001 driver (kernelconcepts.de)
|
||||
- [added] Added Toshiba T6963 driver
|
||||
- [added] Added Seiko-Epson SED 1520 driver
|
||||
- [added] Added Seiko-Epson SED 1330 driver
|
||||
- [added] Added STV5730 driver composite TV signal character generation driver
|
||||
- [fixed] Modified the CFontz driver so that the new ROM version is
|
||||
supported
|
||||
- [added] Added ASCII emulation of BigNum to the drivers that did not
|
||||
support custom characters
|
||||
- [added] Added ability of configuring (rearranging) the keypad of MtxOrb
|
||||
displays
|
||||
- [added] Added .lircrc location to the options of the lirc driver
|
||||
- [fixed] Fixed backlight code (partly rewritten)
|
||||
- [fixed] Fixed heartbeat code (completely rewritten analogous to
|
||||
the backlight code)
|
||||
- [added] Added init scripts for debian and Redhat/Mandrake
|
||||
- [added] Added EPM list file so that you can use EPM
|
||||
(http://www.easysw.com/epm) to generate packages of LCDproc
|
||||
- [added] Added documentation in docbook format
|
||||
(LCDproc User's Guide - docs/lcdproc-user)
|
||||
- [fixed] Ported some screens of lcdproc to *BSD.
|
||||
- [fixed] Ported the parallel port functions in port.h to *BSD.
|
||||
|
||||
v0.4.2:
|
||||
- [removed] Removed multiple output driver support - to simplify life
|
||||
- [fixed] Removed use of sprintf() (in favor of snprintf) for security
|
||||
- [added] Added ability to use defined port and address to listen on
|
||||
(for security) - now defaults to 127.0.0.1
|
||||
- [added] Revamped curses driver: now supports color; has border; and
|
||||
can be (with recompile) placed anywhere on screen it fits
|
||||
- [added] Added --waittime server argument. You can now specify how long
|
||||
a screen should stay on the display. The default is 64 ticks or
|
||||
8 seconds.
|
||||
- [added] Fixed compile problems on non-Linux platforms where cfmakeraw,
|
||||
CBAUD, and ioperm don't exist. All drivers now use the same code
|
||||
to initialize a serial port.
|
||||
|
||||
v0.4.1:
|
||||
- [added] Changed protocol to 0.3 because we now accept both -foo and foo
|
||||
as argument introducers. in 0.4-pre10, these were changed
|
||||
from foo to -foo and this broke many clients. This change
|
||||
should fix that and be backward/forward compatible.
|
||||
- [added] Added a noop function to the protocol. This is useful for writing
|
||||
shell script clients of LCDproc.
|
||||
- [added] Changed the shared sock_send_string function to NOT send the
|
||||
ending NUL ('\0') byte with the string. This was confusing
|
||||
in Perl clients which saw NUL's as the first character of
|
||||
each reply. WARNING: The LCDPROC client depended on this
|
||||
behavior, your client may too. Use the newline instead.
|
||||
See the code in clients/lcdproc/main.c (look for "switch(buf[i])")
|
||||
to see one way to handle this. This should allow new clients
|
||||
to connect to old servers and vice-versa.
|
||||
- [added] Messed with include structure in .c files. It should no longer
|
||||
be necessary to specify ../.. to get to shared code headers.
|
||||
Also, since we are using automake, the global config.h can be
|
||||
found with just #include "config.h" as it's location is included
|
||||
in a -I to the compilers. As a result "make distcheck" now works.
|
||||
- [added] Added support for client_add_key and friends. Clients MUST now
|
||||
request keys to get notified. Keys are NO LONGER broadcast to all
|
||||
clients. Keys are now tied to a SCREEN and CLIENT. There are new
|
||||
commands (screen_add_key, screen_del_key) to bind keys to a
|
||||
screen. If the current screen has requested the key just pressed,
|
||||
the client gets the key and no other client gets it. If the current
|
||||
screen has not requested the current key, then the key is broadcast
|
||||
to all clients who requested that key with client_add_key. Clients
|
||||
might want to request a "hotkey" with client_add_key so they will
|
||||
be notified of that key no matter what screen is currently on the
|
||||
display, and then request whatever other keys a screen uses with
|
||||
screen_add_key.
|
||||
- [added] Added driver for Matrix Orbital GLK12232-25 graphical display.
|
||||
Display is run in text mode since there isn't enough information in
|
||||
the widgets. If we knew the max width/height of an hbar/vbar, we
|
||||
could use graphical vbar/hbar's. Oh well. BigNums' look really
|
||||
cool though. You'll need some additional characters in the "Small Font"
|
||||
font (and the BigNumbers font) for this to work.
|
||||
- [added] Rewrote Big Number Clock function in chrono.c. Many problems with
|
||||
it have been fixed. It now uses number value 10 to display a colon
|
||||
in between the digits. Don't know what this will do on a the MtxOrb
|
||||
driver. GLK driver draws a colon.
|
||||
- [added] Cleaned up the CPU GRAPH (G) function in cpu.c and made get_load take
|
||||
a 'struct load' from the caller to save the last time values. This
|
||||
allows two callers (CPU GRAPH and CPU LOAD) to call get_load and
|
||||
both get reaosonable values. Without this, CPU GRAPH was always
|
||||
getting 0 because it was called immediatly after CPU LOAD called
|
||||
get_load and no clock ticks had gone by.
|
||||
- [added] Changed --enable-debug autoconf option to be processed correctly.
|
||||
Debug now turns on -g and turns off -O6
|
||||
- [added] Lots of other little fixes.
|
||||
|
||||
v0.4-pre10:
|
||||
- [added] Metar client added (Weather information)
|
||||
- [added] Linux infrared control (LIRC) driver added.
|
||||
- [added] "rotating slash" heartbeat mode (looks weird on CFontz displays)
|
||||
Use "screen_set s -heartbeat slash" to use this.
|
||||
- [fixed] Switched to client-server protocol V0.2, so arguments can come in
|
||||
any order, and require a "-" on the front. Instead of
|
||||
"widget_set s w 1 2 foo", use "widget_set s w -x 1 -y 2 -text foo".
|
||||
- [fixed] Server info screen no longer enabled by default.
|
||||
- [fixed] Merged Andrew McMeikan's HD44780 driver changes
|
||||
- [removed] Removed WHATSNEW
|
||||
- [added] Added ChangeLog (okay, fine, I renamed WHATSNEW and typed a few
|
||||
entries into it :)
|
||||
|
||||
V0.4-pre9:
|
||||
- [fixed] small fixes for irix
|
||||
- [fixed] Added flag in LCDd to shut off server screen:
|
||||
"-i off" or "--serverinfo off"
|
||||
- [added] Wirz SLI driver
|
||||
- [added] 16x2 support (server only)
|
||||
- [added] MtxOrb generic output support in driver
|
||||
- [fixed] Misc libc5 fixes
|
||||
- [added] support for arbitrary display sizes; anything 16-80 characters
|
||||
wide, and 2-25 characters tall. (doesn't work if you try to use
|
||||
a display size bigger than your LCD.. :)
|
||||
- [fixed] curses driver looks slightly better (titles)
|
||||
- [fixed] sizes > 20x4 no longer crash
|
||||
|
||||
V0.4-pre8:
|
||||
- [fixed] LCDd gives more updated info in the connect string:
|
||||
cell size, lcd dimensions.
|
||||
- [fixed] bargraphs are now the correct length on CFontz displays, in the main
|
||||
lcdproc client. For other clients, please parse the connect string!
|
||||
- [fixed] MtxOrb driver supports simultaneous vbars/hbars now, with a
|
||||
mechanism to automatically use custom characters for as many
|
||||
as possible.
|
||||
- [added] 20x2 support in LCDd! Use "--type 20x2".
|
||||
(LCDd --type 20x2 -d MtxOrb )
|
||||
- [fixed] LCDd can change backlight brightness instead of shutting it "off"
|
||||
- [fixed] HD44780 should work again (LCDd forks earlier now.. oops :)
|
||||
- [added] 20x2 support in lcdproc client for the following screens:
|
||||
C G T M X D B S U A
|
||||
Support will not be added for K and O screens.
|
||||
- [added] BSD support (?)
|
||||
- [fixed] 20x4 screens should display correctly on 40x4 displays
|
||||
|
||||
V0.4-pre7: new driver
|
||||
- [added] CrystalFontz (CFontz) LCD driver added
|
||||
- [fixed] Backlight control improved
|
||||
- [added] Brightness control added
|
||||
|
||||
V0.4-pre6:
|
||||
- [added] Backlight control added. Modes so far are "on", "off", and "open".
|
||||
Client commands are "on", "off", "toggle", "blink", and "flash".
|
||||
- [fixed] Main clients' screen titles now include hostname
|
||||
- [added] New sample client: fortune.pl
|
||||
- [fixed] Added changes from David Glaude:
|
||||
- [added] IRman support
|
||||
- [added] Big Digit support (MtxOrb driver doesn't display it correctly yet)
|
||||
- [added] Big cloc[K] screen
|
||||
- [fixed] MtxOrb serial speed is configurable with "--speed"
|
||||
- [fixed] misc bugfixes
|
||||
- [added] ... more
|
||||
|
||||
V0.4-pre5:
|
||||
- [fixed] Fixed bug which could take server down with a dead client
|
||||
- [fixed] Fixed small scroller bug
|
||||
- [added] Added "frame" widgets.. use "-in <frame_name>" after widget_add
|
||||
to put something in a frame.
|
||||
- [added] The disk screen is back!
|
||||
- [removed] Frame rendering isn't finished.. the renderer probably needs a
|
||||
complete rewrite. Any volunteers? :)
|
||||
|
||||
V0.4-pre4:
|
||||
- [added] Server menus (fairly small so far)
|
||||
- [added] Ability to shut down, reboot, change some options, etc (menu only)
|
||||
- [fixed] Driver arguments no longer required
|
||||
- [fixed] Curses driver doesn't start server in background any more...
|
||||
- [fixed] Argument handling fixed...
|
||||
- [fixed] Drivers support "--help" for command-line info
|
||||
|
||||
V0.4-pre3:
|
||||
- [added] Scroller widgets
|
||||
- [fixed] Proper errno messages...
|
||||
- [fixed] "make install" should work now
|
||||
- [fixed] Joystick driver allows key remapping
|
||||
- [added] Screen "durations" are actually *used* now. (oops)
|
||||
- [added] Initial support for screen priorities (strict priority queue)
|
||||
- [fixed] Misc (but annoying!) bugs fixed, which hadn't yet affected anything
|
||||
- [added] Drivers support parameters now (MtxOrb, joy, at least)
|
||||
|
||||
V0.4-pre2:
|
||||
- [fixed] Memory leaks fixed
|
||||
- [added] Memory "top" screen (S)
|
||||
- [added] Titles now autoscroll
|
||||
- [fix] Fixed small screen-visibility bug (clients weren't always
|
||||
notified of screen cycles)
|
||||
- [added] Heartbeat modes implemented. Clients can remove it with
|
||||
widget_del my_screen heartbeat
|
||||
or turn it back on with
|
||||
widget_add my_screen heartbeat " "
|
||||
Note that the client only has control over this when the heartbeat
|
||||
is in "open" mode. (currently, it always is)
|
||||
|
||||
V0.4-pre1:
|
||||
* Too much to mention...
|
||||
@@ -46,11 +46,10 @@ DriverPath=server/drivers/
|
||||
# The following drivers are supported:
|
||||
# bayrad, CFontz, CFontzPacket, curses, CwLnx, ea65, EyeboxOne, g15, glcd,
|
||||
# glcdlib, glk, hd44780, icp_a106, imon, imonlcd,, IOWarrior, irman, joy,
|
||||
# lb216, lcdm001, lcterm, linux_input, lirc, lis, MD8800, mdm166a, ms6931,
|
||||
# mtc_s16209x, MtxOrb, mx5000, NoritakeVFD, Olimex_MOD_LCD1x9, picolcd,
|
||||
# pyramid, rawserial, sdeclcd, sed1330, sed1520, serialPOS, serialVFD,
|
||||
# shuttleVFD, sli, stv5730, svga, t6963, text, tyan, ula200, vlsys_m428,
|
||||
# xosd, yard2LCD
|
||||
# lb216, lcdm001, lcterm, lirc, lis, MD8800,, mdm166a, ms6931, mtc_s16209x,
|
||||
# MtxOrb, mx5000, NoritakeVFD, picolcd,, pyramid, rawserial, sdeclcd,
|
||||
# sed1330, sed1520, serialPOS, serialVFD, shuttleVFD, sli,, stv5730, svga,
|
||||
# t6963, text, tyan, ula200, vlsys_m428, xosd
|
||||
Driver=curses
|
||||
|
||||
# Tells the driver to bind to the given interface. [default: 127.0.0.1]
|
||||
@@ -798,21 +797,6 @@ Device=/dev/ttyS1
|
||||
Size=16x2
|
||||
|
||||
|
||||
## Linux event device input driver ##
|
||||
[linux_input]
|
||||
|
||||
# Select the input device to use [default: /dev/input/event0]
|
||||
Device=/dev/input/event0
|
||||
|
||||
# specify a non-default key map
|
||||
#key=1,Escape
|
||||
#key=28,Enter
|
||||
#key=96,Enter
|
||||
#key=105,Left
|
||||
#key=106,Right
|
||||
#key=103,Up
|
||||
#key=108,Down
|
||||
|
||||
|
||||
## LIRC input driver ##
|
||||
[lirc]
|
||||
@@ -987,13 +971,6 @@ Reboot=no
|
||||
|
||||
|
||||
|
||||
## Olimex MOD-LCD1x9 driver ##
|
||||
[Olimex_MOD_LCD1x9]
|
||||
|
||||
# device file of the i2c controler
|
||||
Device=/dev/i2c-0
|
||||
|
||||
|
||||
## Mini-box.com picoLCD (usblcd) driver ##
|
||||
[picolcd]
|
||||
|
||||
@@ -1387,9 +1364,4 @@ Offset=200x200
|
||||
# X font to use, in XLFD format, as given by "xfontsel"
|
||||
Font=-*-terminus-*-r-*-*-*-320-*-*-*-*-*
|
||||
|
||||
## Y.A.R.D.2 LCD section
|
||||
[yard2LCD]
|
||||
Size=20x4
|
||||
# If rendering rate is too high, change in server\main.h #define RENDER_FREQ 8 to "1"
|
||||
|
||||
# EOF
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
[](https://travis-ci.org/lcdproc/lcdproc)
|
||||
|
||||
This is the official repository for the LCDproc project.
|
||||
|
||||
_Note: this project is currently being migrated from Sourceforge. Documentation
|
||||
@@ -11,9 +9,10 @@ on GitHub, so please excuse the dust while we set up shop._
|
||||
LCDproc is a client/server suite including drivers for all kinds of nifty LCD
|
||||
devices. The server works with different display sizes and supports several
|
||||
serial devices: Matrix Orbital, Crystal Fontz, Bayrad, LB216, LCDM001
|
||||
(kernelconcepts.de), Wirz-SLI and PIC-an-LCD; some devices connected to the
|
||||
parallel port: HD44780, STV5730, T6963, SED1520 and SED1330; and also some
|
||||
displays connected via USB: CFontzPacket, CwLnx, IOWarrior, LIS2 and BWCT.
|
||||
(kernelconcepts.de), Wirz-SLI and PIC-an-LCD; some devices connected to
|
||||
the parallel port: HD44780, STV5730, T6963, SED1520 and SED1330; and also
|
||||
some displays connected via USB: CFontzPacket, CwLnx, IOWarrior, LIS2 and
|
||||
BWCT.
|
||||
|
||||
Various clients are available that display things like CPU load, system load,
|
||||
memory usage, uptime, and a lot more.
|
||||
@@ -21,102 +20,82 @@ memory usage, uptime, and a lot more.
|
||||
LCDproc also supports key or remote control input for controlling the clients.
|
||||
|
||||
The client and the server use a TCP connection to communicate, so it is
|
||||
possible to have a client on a box in Sweden showing its stats on a LCD device
|
||||
in the United States.
|
||||
possible to have a client on a box in Sweden showing its stats on a LCD
|
||||
display in the United States.
|
||||
|
||||
Visit our [website](http://lcdproc.org/) for more information. The project's
|
||||
repository, issue tracking and pull requests can be found at
|
||||
https://github.com/lcdproc/lcdproc. Our mailing list can be found at
|
||||
https://groups.google.com/d/forum/lcdproc-mailing-list.
|
||||
repository, issue tracking and pull request management can be found at
|
||||
http://github.com/lcdproc/lcdproc.
|
||||
|
||||
LCDproc was originally written by [William Ferrell](mailto:willfe@gmail.com)
|
||||
and [Selene Scriven](mailto:lcdproc@toykeeper.net).
|
||||
and [Selene Scriven](lcdproc@toykeeper.net).
|
||||
|
||||
# Installation
|
||||
|
||||
Refer to [INSTALL](INSTALL) (included with this archive) for installation
|
||||
instructions (including how to connect an LCD to your system).
|
||||
Refer to the INSTALL file included with this archive for installation
|
||||
instructions (including how to connect the LCD to your system).
|
||||
|
||||
# Changes
|
||||
|
||||
Refer to [ChangeLog.md](ChangeLog.md) file for details.
|
||||
Woow... a lot. :)
|
||||
See the ChangeLog file for more details.
|
||||
|
||||
# Contributing
|
||||
|
||||
If you've found a bug or want to add new functionality to LCDproc, feel free to
|
||||
fork the repository, make your changes and send us a pull request. They're
|
||||
If you've found a bug or want to add new functionality to LCDproc, feel free
|
||||
to fork the repository, make your changes and send us a pull request. They're
|
||||
always welcome!
|
||||
|
||||
If you want to help but need some inspiration, take a look at the project's
|
||||
[open issues](https://github.com/lcdproc/lcdproc/issues).
|
||||
If you want to help but need some inspiration, take a look at the TODO
|
||||
file to see what we think that needs to be done.
|
||||
|
||||
To learn more about how LCDproc works, first have a look at the docs/
|
||||
directory. Some important things are documented there, but because this is
|
||||
still somewhat a big hacking project, some documentation will be missing ;)
|
||||
|
||||
Please don't hesitate to ask us for help if you're having trouble getting LCDproc
|
||||
working with your hardware or you'd like to contribute to the project but need
|
||||
guidance on how something works or how things fit together. We're a friendly
|
||||
bunch!
|
||||
|
||||
## Mailing List
|
||||
|
||||
We also maintain a [mailing list](https://groups.google.com/d/forum/lcdproc-mailing-list)
|
||||
for development and user discussions. There are several ways to join the mailing list:
|
||||
|
||||
- If you have a Google account, and you're already logged in, browse to
|
||||
https://groups.google.com/d/forum/lcdproc-mailing-list and click "Join this group".
|
||||
|
||||
- If you'd like to subscribe with a non-Google email address, you can either:
|
||||
|
||||
- Browse to https://groups.google.com/forum/#!forum/lcdproc-mailing-list/join
|
||||
and provide your email address, solve the displayed captcha (if any) and
|
||||
click "Subscribe". You may need to click a confirmation link (that Google will
|
||||
mail to the provided address) to actually be subscribed to the mailing list.
|
||||
|
||||
- Send an email to lcdproc-mailing-list+subscribe@googlegroups.com.
|
||||
|
||||
## Code of Merit
|
||||
|
||||
This project adopts the Code of Merit, version 1.0, originally published at
|
||||
http://code-of-merit.org/. Refer to [CODE_OF_MERIT.md](CODE_OF_MERIT.md) for
|
||||
details, but in short, we focus on writing software and leave politics out of
|
||||
it.
|
||||
This project adopts the Code of Merit, version 1.0, originally published
|
||||
at http://code-of-merit.org/. Refer to CODE_OF_MERIT.md in this project's
|
||||
source tree for a copy of this document.
|
||||
|
||||
In short, let's focus on writing software and leave the politics out of it.
|
||||
|
||||
# Special Thanks
|
||||
|
||||
LCDproc wouldn't be possible without the ongoing patience and efforts by its
|
||||
amazing community of developers and users. We'd like to recognize everyone's
|
||||
contributions to the project, and we've tried to list them all in
|
||||
[CREDITS](CREDITS). If we've overlooked your contributions, please let us know
|
||||
so we can attribute your work immediately!
|
||||
contributions to the project, and we've tried to list them all in the CREDITS
|
||||
file. If we've overlooked your contributions, please let us know so we can
|
||||
attribute your work immediately!
|
||||
|
||||
_From William Ferrell, original developer:_ This project is almost twenty years
|
||||
old as I write this, and I'm so proud of what it's become over the years thanks
|
||||
in no small part to the people (past and present) who not only contributed
|
||||
their work and ideas to the project, but helped to manage and maintain it when
|
||||
I couldn't. To see this project start as a small single-system utility program
|
||||
supporting a single type of device and flourish into a client/server daemon
|
||||
used around the world to drive all sorts of display devices is beyond anything
|
||||
I could have ever hoped for, and I'm eternally grateful to everyone who's
|
||||
contributed over the years. Thank you all for being part of this project and
|
||||
for making it amazing. Here's to another twenty years! :)
|
||||
in no small part to the people (past and present) who not only contributed their
|
||||
work and ideas to the project, but helped to manage and maintain it when I
|
||||
couldn't. To see this project start as a small single-system utility program
|
||||
supporting a single type of device and flourish into a client/server daemon used
|
||||
around the world to drive all sorts of display devices is beyond anything I could
|
||||
have ever hoped for, and I'm eternally grateful to everyone who's contributed
|
||||
over the years. Thank you all for being part of this project and for making it
|
||||
amazing. Here's to another twenty years! :)
|
||||
|
||||
# Legal Stuff
|
||||
|
||||
LCDproc is Copyright (C) 1998-2016 William Ferrell, Selene Scriven and many
|
||||
other contributors.
|
||||
LCDproc is Copyright (C) 1998-2016
|
||||
William Ferrell, Selene Scriven and many other contributors.
|
||||
|
||||
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 (at your option) any later
|
||||
version.
|
||||
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 (at your option) 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.
|
||||
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.
|
||||
|
||||
The file COPYING contains the GNU General Public License. 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.
|
||||
The file COPYING contains the GNU General Public License.
|
||||
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.
|
||||
|
||||
+6
-32
@@ -11,19 +11,18 @@ AC_ARG_ENABLE(drivers,
|
||||
[ bayrad,CFontz,CFontzPacket,curses,CwLnx,ea65,]
|
||||
[ EyeboxOne,g15,glcd,glcdlib,glk,hd44780,i2500vfd,]
|
||||
[ icp_a106,imon,imonlcd,IOWarrior,irman,irtrans,]
|
||||
[ joy,lb216,lcdm001,lcterm,linux_input,lirc,lis,MD8800,mdm166a,]
|
||||
[ joy,lb216,lcdm001,lcterm,lirc,lis,MD8800,mdm166a,]
|
||||
[ ms6931,mtc_s16209x,MtxOrb,mx5000,NoritakeVFD,]
|
||||
[ Olimex_MOD_LCD1x9,picolcd,pyramid,rawserial,]
|
||||
[ sdeclcd,sed1330,sed1520,serialPOS,serialVFD,]
|
||||
[ shuttleVFD,sli,stv5730,SureElec,svga,t6963,text,]
|
||||
[ tyan,ula200,vlsys_m428,xosd,yard2LCD]
|
||||
[ picolcd,pyramid,rawserial,sdeclcd,sed1330,sed1520,]
|
||||
[ serialPOS,serialVFD,shuttleVFD,sli,stv5730,SureElec,]
|
||||
[ svga,t6963,text,tyan,ula200,vlsys_m428,xosd]
|
||||
[ ]
|
||||
[ 'all' compiles all drivers;]
|
||||
[ 'all,!xxx,!yyy' de-selects previously selected drivers],
|
||||
drivers="$enableval",
|
||||
drivers=[bayrad,CFontz,CFontzPacket,curses,CwLnx,glk,lb216,lcdm001,MtxOrb,pyramid,text])
|
||||
|
||||
allDrivers=[bayrad,CFontz,CFontzPacket,curses,CwLnx,ea65,EyeboxOne,g15,glcd,glcdlib,glk,hd44780,i2500vfd,icp_a106,imon,imonlcd,IOWarrior,irman,irtrans,joy,lb216,lcdm001,lcterm,linux_input,lirc,lis,MD8800,mdm166a,ms6931,mtc_s16209x,MtxOrb,mx5000,NoritakeVFD,Olimex_MOD_LCD1x9,picolcd,pyramid,sdeclcd,sed1330,sed1520,serialPOS,serialVFD,shuttleVFD,sli,stv5730,SureElec,svga,t6963,text,tyan,ula200,vlsys_m428,xosd,rawserial,yard2LCD]
|
||||
allDrivers=[bayrad,CFontz,CFontzPacket,curses,CwLnx,ea65,EyeboxOne,g15,glcd,glcdlib,glk,hd44780,i2500vfd,icp_a106,imon,imonlcd,IOWarrior,irman,irtrans,joy,lb216,lcdm001,lcterm,lirc,lis,MD8800,mdm166a,ms6931,mtc_s16209x,MtxOrb,mx5000,NoritakeVFD,picolcd,pyramid,sdeclcd,sed1330,sed1520,serialPOS,serialVFD,shuttleVFD,sli,stv5730,SureElec,svga,t6963,text,tyan,ula200,vlsys_m428,xosd,rawserial]
|
||||
if test "$debug" = yes; then
|
||||
allDrivers=["${allDrivers},debug"]
|
||||
fi
|
||||
@@ -215,7 +214,7 @@ dnl else
|
||||
actdrivers=["$actdrivers glk"]
|
||||
;;
|
||||
hd44780)
|
||||
HD44780_DRIVERS="hd44780-hd44780-serial.o hd44780-hd44780-lis2.o hd44780-hd44780-usblcd.o hd44780-hd44780-lcm162.o"
|
||||
HD44780_DRIVERS="hd44780-hd44780-serial.o hd44780-hd44780-lis2.o hd44780-hd44780-usblcd.o"
|
||||
if test "$ac_cv_port_have_lpt" = yes ; then
|
||||
HD44780_DRIVERS="$HD44780_DRIVERS hd44780-hd44780-4bit.o hd44780-hd44780-ext8bit.o hd44780-lcd_sem.o hd44780-hd44780-winamp.o hd44780-hd44780-serialLpt.o"
|
||||
fi
|
||||
@@ -232,9 +231,6 @@ dnl else
|
||||
if test "$x_ac_have_i2c" = yes; then
|
||||
HD44780_DRIVERS="$HD44780_DRIVERS hd44780-hd44780-i2c.o"
|
||||
HD44780_DRIVERS="$HD44780_DRIVERS hd44780-hd44780-piplate.o"
|
||||
HD44780_I2C="i2c.o"
|
||||
else
|
||||
HD44780_I2C=""
|
||||
fi
|
||||
if test "$x_ac_have_spi" = yes; then
|
||||
HD44780_DRIVERS="$HD44780_DRIVERS hd44780-hd44780-spi.o hd44780-hd44780-pifacecad.o"
|
||||
@@ -314,14 +310,6 @@ dnl else
|
||||
DRIVERS="$DRIVERS lcterm${SO}"
|
||||
actdrivers=["$actdrivers lcterm"]
|
||||
;;
|
||||
linux_input)
|
||||
case $host in
|
||||
*-*-linux*)
|
||||
DRIVERS="$DRIVERS linux_input${SO}"
|
||||
actdrivers=["$actdrivers linux_input"]
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
lirc)
|
||||
AC_CHECK_LIB(lirc_client, main,[
|
||||
LIBLIRC_CLIENT="-llirc_client"
|
||||
@@ -405,15 +393,6 @@ dnl else
|
||||
DRIVERS="$DRIVERS NoritakeVFD${SO}"
|
||||
actdrivers=["$actdrivers NoritakeVFD"]
|
||||
;;
|
||||
Olimex_MOD_LCD1x9)
|
||||
AC_CHECK_HEADERS([linux/i2c.h],[
|
||||
DRIVERS="$DRIVERS Olimex_MOD_LCD1x9${SO}"
|
||||
actdrivers=["$actdrivers Olimex_MOD_LCD1x9"]
|
||||
],[
|
||||
dnl else
|
||||
AC_MSG_WARN([The Olimex MOD-LCD1x9 driver needs linux/i2c.h])
|
||||
])
|
||||
;;
|
||||
rawserial)
|
||||
DRIVERS="$DRIVERS rawserial${SO}"
|
||||
actdrivers=["$actdrivers rawserial"]
|
||||
@@ -557,10 +536,6 @@ dnl else
|
||||
actdrivers=["$actdrivers xosd"]
|
||||
fi
|
||||
;;
|
||||
yard2LCD)
|
||||
DRIVERS="$DRIVERS yard2LCD${SO}"
|
||||
actdrivers=["$actdrivers yard2LCD"]
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown driver $driver])
|
||||
;;
|
||||
@@ -580,7 +555,6 @@ AC_SUBST(LIBLIRC_CLIENT)
|
||||
AC_SUBST(LIBSVGA)
|
||||
AC_SUBST(DRIVERS)
|
||||
AC_SUBST(HD44780_DRIVERS)
|
||||
AC_SUBST(HD44780_I2C)
|
||||
AC_SUBST(GLCD_DRIVERS)
|
||||
AC_SUBST(LIBG15)
|
||||
AC_SUBST(LIBGLCD)
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#ifndef _lcdproc_machine_h_
|
||||
#define _lcdproc_machine_h_
|
||||
|
||||
#include <time.h>
|
||||
#include "shared/LL.h"
|
||||
|
||||
#ifndef LOADAVG_NSTATS
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <string.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/sched.h>
|
||||
#include <sys/dkstat.h>
|
||||
#include <sys/ucred.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
@@ -247,9 +247,6 @@ kernelconcepts.de 20x4 serial LCD displays
|
||||
.B lcterm
|
||||
serial LCD terminal from Helmut Neumark Elektronik (http://www.neumark.de)
|
||||
.TP
|
||||
.B linux_input
|
||||
Linux event devices (input)
|
||||
.TP
|
||||
.B lirc
|
||||
Infrared (input)
|
||||
.TP
|
||||
@@ -277,9 +274,6 @@ LCD display on the Logitech MX5000 keyboard
|
||||
.B NoritakeVFD
|
||||
Noritake VFD Device CU20045SCPB-T28A
|
||||
.TP
|
||||
.B Olimex_MOD_LCD1x9
|
||||
Olimex MOD-LCD1x9 14 segment display
|
||||
.TP
|
||||
.B rawserial
|
||||
Dumps the entire framebuffer to the serial port at a configurable rate.
|
||||
.TP
|
||||
@@ -334,9 +328,6 @@ ULA-200 device from ELV (http://www.elv.de)
|
||||
.B vlsys_m428
|
||||
VFD/IR combination in case MonCaso 320 from Moneual
|
||||
.TP
|
||||
.B yard2
|
||||
yard2 LCD module
|
||||
.TP
|
||||
.B xosd
|
||||
On Screen Display on X11
|
||||
.PP
|
||||
|
||||
@@ -30,7 +30,6 @@ well as the configuration of LCDd.
|
||||
&lb216;
|
||||
&lcdm001;
|
||||
&lcterm;
|
||||
&linux_input;
|
||||
&lirc;
|
||||
&lis;
|
||||
&MD8800;
|
||||
@@ -40,7 +39,6 @@ well as the configuration of LCDd.
|
||||
&MtxOrb;
|
||||
&mx5000;
|
||||
&NoritakeVFD;
|
||||
&Olimex_MOD_LCD1x9;
|
||||
&rawserial;
|
||||
&picolcd;
|
||||
&pylcd;
|
||||
@@ -60,7 +58,6 @@ well as the configuration of LCDd.
|
||||
&ula200;
|
||||
&vlsys_m428;
|
||||
&xosd;
|
||||
&yard2;
|
||||
|
||||
&ppttrouble;
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ EXTRA_DIST = bayrad.docbook \
|
||||
mtxorb.docbook \
|
||||
mx5000.docbook \
|
||||
NoritakeVFD.docbook \
|
||||
Olimex_MOD_LCD1x9.docbook \
|
||||
picolcd.docbook \
|
||||
ppttrouble.docbook \
|
||||
pylcd.docbook \
|
||||
@@ -52,7 +51,6 @@ EXTRA_DIST = bayrad.docbook \
|
||||
tyan.docbook \
|
||||
ula200.docbook \
|
||||
vlsys_m428.docbook \
|
||||
yard2.docbook \
|
||||
xosd.docbook
|
||||
|
||||
## EOF
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
<sect1 id="olimex1x9-howto">
|
||||
<title>The Olimex_MOD_LCD1x9 Driver</title>
|
||||
|
||||
<para>
|
||||
The Olimex_MOD_LCD1x9 driver supports the popular MOD-LCD1x9 14 segment
|
||||
display on I2C lines. Currently this driver only supports Linux.
|
||||
</para>
|
||||
|
||||
<!-- ## Olimex_MOD_LCD1x9 driver ## -->
|
||||
<sect2 id="olimex1x9-config">
|
||||
<title>Configuration in LCDd.conf</title>
|
||||
|
||||
<sect3 id="olimex1x9-config-section">
|
||||
<title>[Olimex_MOD_LCD1x9]</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<property>Device</property> =
|
||||
<parameter><replaceable>DEVICE</replaceable></parameter>
|
||||
</term>
|
||||
<listitem><para>
|
||||
Set the I2C device [default: <filename>/dev/i2c-0</filename>]
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</sect3>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
@@ -2516,61 +2516,6 @@ Size=40x2
|
||||
DelayBus=false
|
||||
DelayMult=1
|
||||
Keypad=no
|
||||
#i2c_line_RS=0x10
|
||||
#i2c_line_RW=0x20
|
||||
#i2c_line_EN=0x40
|
||||
#i2c_line_BL=0x80
|
||||
#i2c_line_D4=0x01
|
||||
#i2c_line_D5=0x02
|
||||
#i2c_line_D6=0x04
|
||||
#i2c_line_D7=0x08
|
||||
# BacklightInvert=yes
|
||||
# The Backlight Invert is used if a 0 turns the backlight on, and 1 turns it off, i.e. npn transistor
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
||||
<para>
|
||||
If your port expander has different wiring you can re-assign the pins in the config file
|
||||
</para>
|
||||
|
||||
<example id="hd44780-i2c-config.example alternative wiring">
|
||||
<title>HD44780: Configuration for I<superscript>2</superscript>C with port expander
|
||||
Alternative Wiring</title>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
- PCF8574AP: P0 P1 P2 P3 P4 P5 P6 P7
|
||||
- | | | | | | | |
|
||||
- HD44780: RS RW EN BL D4 D5 D6 D7
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
||||
<example id="hd44780-i2c-config.example alternative config">
|
||||
<title>HD44780: Configuration for I<superscript>2</superscript>C with port expander
|
||||
alternative config</title>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
[HD44780]
|
||||
ConnectionType=i2c
|
||||
Device=/dev/i2c-0
|
||||
Port=0x20
|
||||
Size=40x2
|
||||
DelayBus=false
|
||||
DelayMult=1
|
||||
Keypad=no
|
||||
i2c_line_RS=0x01
|
||||
i2c_line_RW=0x02
|
||||
i2c_line_EN=0x04
|
||||
i2c_line_BL=0x08
|
||||
i2c_line_D4=0x10
|
||||
i2c_line_D5=0x20
|
||||
i2c_line_D6=0x40
|
||||
i2c_line_D7=0x80
|
||||
Backlight=yes
|
||||
BacklightInvert=yes
|
||||
#The Backlight Invert is used if a 0 turns the backlight on, and 1 turns it off,
|
||||
i.e. PNP transistor
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
<sect1 id="linux_input-howto">
|
||||
<title>The Linux Event Device Input Driver</title>
|
||||
|
||||
<para>
|
||||
This section covers the linux event device input driver for LCDd.
|
||||
</para>
|
||||
|
||||
<!-- ## Linux input driver ## -->
|
||||
<sect2 id="linux_input-config">
|
||||
<title>Configuration in LCDd.conf</title>
|
||||
|
||||
<sect3 id="linux_input-config-section">
|
||||
<title>[linux_input]</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<property>Device</property> =
|
||||
<parameter><replaceable>DEVICE</replaceable></parameter>
|
||||
</term>
|
||||
<listitem><para>
|
||||
Select the input device to use [default: <filename>/dev/input/event0</filename>]
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<property>key</property> =
|
||||
<parameter><replaceable>KEYCODE</replaceable>,<replaceable>KEY</replaceable></parameter>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Set an alternate key map, e.g. to use custom buttons instead of the
|
||||
standard codes for Escape, Enter, Left, Right, Up and Down. This entry
|
||||
typically repeaded for any non-standard key code.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<replaceable>KEYCODE</replaceable> is an integer like the ones defined in
|
||||
<filename>/usr/include/linux/input.h</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<replaceable>KEY</replaceable> can be one of the keys that LCDd recognizes
|
||||
(<literal>Left</literal>, <literal>Right</literal>, <literal>Up</literal>,
|
||||
<literal>Down</literal>, <literal>Enter</literal> or <literal>Escape</literal>)
|
||||
or any other string that a client can parse.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</sect3>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
@@ -1,30 +0,0 @@
|
||||
<sect1 id="yard2-howto">
|
||||
<title>The yard2 driver</title>
|
||||
|
||||
<sect2 id="yard2-general">
|
||||
<title>General</title>
|
||||
|
||||
<para>
|
||||
The yard2 driver handles the yard2 LCD device.
|
||||
The driver functionality is currently limited to character LCD.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This driver writes via socket to yard2srvd deamon.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The yard2 driver assumes the character encoding ISO 8859-1.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="yard2-configuration">
|
||||
<title>Configuration</title>
|
||||
|
||||
<para>
|
||||
The only configuration parameter is <property>Size</property>.
|
||||
All other settings are done in yard2srvd daemon.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
@@ -37,7 +37,6 @@
|
||||
<!ENTITY lb216 SYSTEM "drivers/lb216.docbook">
|
||||
<!ENTITY lcdm001 SYSTEM "drivers/lcdm001.docbook">
|
||||
<!ENTITY lcterm SYSTEM "drivers/lcterm.docbook">
|
||||
<!ENTITY linux_input SYSTEM "drivers/linux_input.docbook">
|
||||
<!ENTITY lirc SYSTEM "drivers/lircin.docbook">
|
||||
<!ENTITY lis SYSTEM "drivers/lis.docbook">
|
||||
<!ENTITY MD8800 SYSTEM "drivers/MD8800.docbook">
|
||||
@@ -47,7 +46,6 @@
|
||||
<!ENTITY MtxOrb SYSTEM "drivers/mtxorb.docbook">
|
||||
<!ENTITY mx5000 SYSTEM "drivers/mx5000.docbook">
|
||||
<!ENTITY NoritakeVFD SYSTEM "drivers/NoritakeVFD.docbook">
|
||||
<!ENTITY Olimex_MOD_LCD1x9 SYSTEM "drivers/Olimex_MOD_LCD1x9.docbook">
|
||||
<!ENTITY rawserial SYSTEM "drivers/rawserial.docbook">
|
||||
<!ENTITY picolcd SYSTEM "drivers/picolcd.docbook">
|
||||
<!ENTITY pylcd SYSTEM "drivers/pylcd.docbook">
|
||||
@@ -67,7 +65,6 @@
|
||||
<!ENTITY vlsys_m428 SYSTEM "drivers/vlsys_m428.docbook">
|
||||
<!ENTITY ula200 SYSTEM "drivers/ula200.docbook">
|
||||
<!ENTITY xosd SYSTEM "drivers/xosd.docbook">
|
||||
<!ENTITY yard2 SYSTEM "drivers/yard2.docbook">
|
||||
|
||||
<!-- Note: The parameters include file provides commonly used entities for
|
||||
config file descriptions. DO NOT DELETE! -->
|
||||
|
||||
-3677
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@ AM_LDFLAGS = @LDSHARED@
|
||||
|
||||
lcdexecbindir = $(pkglibdir)
|
||||
lcdexecbin_PROGRAMS = @DRIVERS@
|
||||
EXTRA_PROGRAMS = bayrad CFontz CFontzPacket curses CwLnx debug ea65 EyeboxOne g15 glcd glcdlib glk hd44780 i2500vfd icp_a106 imon imonlcd IOWarrior irman irtrans joy lb216 lcdm001 lcterm linux_input lirc lis MD8800 mdm166a ms6931 mtc_s16209x MtxOrb mx5000 NoritakeVFD Olimex_MOD_LCD1x9 picolcd pyramid rawserial sdeclcd sed1330 sed1520 serialPOS serialVFD shuttleVFD sli stv5730 SureElec svga t6963 text tyan ula200 vlsys_m428 xosd yard2LCD
|
||||
EXTRA_PROGRAMS = bayrad CFontz CFontzPacket curses CwLnx debug ea65 EyeboxOne g15 glcd glcdlib glk hd44780 i2500vfd icp_a106 imon imonlcd IOWarrior irman irtrans joy lb216 lcdm001 lcterm lirc lis MD8800 mdm166a ms6931 mtc_s16209x MtxOrb mx5000 NoritakeVFD picolcd pyramid rawserial sdeclcd sed1330 sed1520 serialPOS serialVFD shuttleVFD sli stv5730 SureElec svga t6963 text tyan ula200 vlsys_m428 xosd
|
||||
noinst_LIBRARIES = libLCD.a libbignum.a
|
||||
|
||||
g15_CFLAGS = @LIBUSB_CFLAGS@ $(AM_CFLAGS)
|
||||
@@ -48,8 +48,8 @@ glcd_LDADD = libLCD.a @GLCD_DRIVERS@ @FT2_LIBS@ @LIBPNG_LIBS@ @LIBSERDIS
|
||||
glcd_DEPENDENCIES = @GLCD_DRIVERS@ glcd-glcd-render.o
|
||||
glcdlib_LDADD = @LIBGLCD@
|
||||
glk_LDADD = libbignum.a
|
||||
hd44780_LDADD = libLCD.a @HD44780_DRIVERS@ @HD44780_I2C@ @LIBUSB_LIBS@ @LIBFTDI_LIBS@ libbignum.a
|
||||
hd44780_DEPENDENCIES = @HD44780_DRIVERS@ @HD44780_I2C@
|
||||
hd44780_LDADD = libLCD.a @HD44780_DRIVERS@ @LIBUSB_LIBS@ @LIBFTDI_LIBS@ libbignum.a
|
||||
hd44780_DEPENDENCIES = @HD44780_DRIVERS@
|
||||
i2500vfd_LDADD = @LIBFTDI_LIBS@
|
||||
imon_LDADD = libLCD.a libbignum.a
|
||||
imonlcd_LDADD = libLCD.a
|
||||
@@ -94,8 +94,8 @@ glcd_SOURCES = lcd.h report.h glcd_drv.c glcd_drv.h glcd-low.h glcd-driver
|
||||
EXTRA_glcd_SOURCES = glcd-t6963.c t6963_low.c t6963_low.h glcd-png.c glcd-serdisp.c glcd-glcd2usb.c glcd-glcd2usb.h glcd-x11.c glcd-picolcdgfx.c
|
||||
glcdlib_SOURCES = lcd.h lcd_lib.h glcdlib.h glcdlib.c report.h
|
||||
glk_SOURCES = lcd.h glk.c glk.h glkproto.c glkproto.h report.h
|
||||
hd44780_SOURCES = lcd.h lcd_lib.h hd44780.h hd44780.c hd44780-drivers.h hd44780-low.h hd44780-charmap.h report.h adv_bignum.h i2c.h
|
||||
EXTRA_hd44780_SOURCES = port.h lpt-port.h timing.h i2c.c lcd_sem.c lcd_sem.h hd44780-4bit.c hd44780-4bit.h hd44780-bwct-usb.c hd44780-bwct-usb.h hd44780-ethlcd.c hd44780-ethlcd.h hd44780-ext8bit.c hd44780-ext8bit.h hd44780-ftdi.c hd44780-ftdi.h hd44780-i2c.c hd44780-i2c.h hd44780-lcd2usb.c hd44780-lcd2usb.h hd44780-lis2.c hd44780-lis2.h hd44780-pifacecad.c hd44780-pifacecad.h hd44780-piplate.c hd44780-piplate.h hd44780-rpi.c hd44780-rpi.h hd44780-serial.c hd44780-serial.h hd44780-serialLpt.c hd44780-serialLpt.h hd44780-spi.c hd44780-spi.h hd44780-usb4all.c hd44780-usb4all.h hd44780-usblcd.c hd44780-usblcd.h hd44780-usbtiny.c hd44780-usbtiny.h hd44780-uss720.c hd44780-uss720.h hd44780-winamp.c hd44780-winamp.h hd44780-lcm162.c hd44780-lcm162.h
|
||||
hd44780_SOURCES = lcd.h lcd_lib.h hd44780.h hd44780.c hd44780-drivers.h hd44780-low.h hd44780-charmap.h report.h adv_bignum.h
|
||||
EXTRA_hd44780_SOURCES = port.h lpt-port.h timing.h lcd_sem.c lcd_sem.h hd44780-4bit.c hd44780-4bit.h hd44780-bwct-usb.c hd44780-bwct-usb.h hd44780-ethlcd.c hd44780-ethlcd.h hd44780-ext8bit.c hd44780-ext8bit.h hd44780-ftdi.c hd44780-ftdi.h hd44780-i2c.c hd44780-i2c.h hd44780-lcd2usb.c hd44780-lcd2usb.h hd44780-lis2.c hd44780-lis2.h hd44780-pifacecad.c hd44780-pifacecad.h hd44780-piplate.c hd44780-piplate.h hd44780-rpi.c hd44780-rpi.h hd44780-serial.c hd44780-serial.h hd44780-serialLpt.c hd44780-serialLpt.h hd44780-spi.c hd44780-spi.h hd44780-usb4all.c hd44780-usb4all.h hd44780-usblcd.c hd44780-usblcd.h hd44780-usbtiny.c hd44780-usbtiny.h hd44780-uss720.c hd44780-uss720.h hd44780-winamp.c hd44780-winamp.h
|
||||
i2500vfd_SOURCES = lcd.h i2500vfd.c i2500vfd.h glcd_font5x8.h report.h
|
||||
icp_a106_SOURCES = lcd.h lcd_lib.h icp_a106.c icp_a106.h report.h
|
||||
imon_SOURCES = lcd.h lcd_lib.h hd44780-charmap.h imon.h imon.c report.h adv_bignum.h
|
||||
@@ -107,7 +107,6 @@ joy_SOURCES = lcd.h joy.c joy.h port.h report.h
|
||||
lb216_SOURCES = lcd.h lcd_lib.h lb216.c lb216.h report.h
|
||||
lcdm001_SOURCES = lcd.h lcdm001.c lcdm001.h report.h
|
||||
lcterm_SOURCES = lcd.h lcd_lib.h lcterm.c lcterm.h report.h
|
||||
linux_input_SOURCES = lcd.h linux_input.h linux_input.c report.h
|
||||
lirc_SOURCES = lcd.h lircin.c lircin.h report.h
|
||||
lis_SOURCES = lcd.h lcd_lib.h lis.h lis.c report.h
|
||||
MD8800_SOURCES = lcd.h lcd_lib.h MD8800.c MD8800.h report.h
|
||||
@@ -117,7 +116,6 @@ mtc_s16209x_SOURCES = lcd.h lcd_lib.h mtc_s16209x.c mtc_s16209x.h report.h
|
||||
MtxOrb_SOURCES = lcd.h lcd_lib.h MtxOrb.c MtxOrb.h report.h adv_bignum.h
|
||||
mx5000_SOURCES = lcd.h mx5000.c mx5000.h report.h
|
||||
NoritakeVFD_SOURCES = lcd.h lcd_lib.h NoritakeVFD.c NoritakeVFD.h report.h adv_bignum.h
|
||||
Olimex_MOD_LCD1x9_SOURCES = lcd.h report.h i2c.h i2c.c Olimex_MOD_LCD1x9.h Olimex_MOD_LCD1x9.c Olimex_MOD_LCD1x9_font.h
|
||||
rawserial_SOURCES = lcd.h rawserial.c rawserial.h
|
||||
picolcd_SOURCES = lcd.h picolcd.h picolcd.c report.h
|
||||
pyramid_SOURCES = lcd.h pylcd.c pylcd.h
|
||||
@@ -137,8 +135,6 @@ tyan_SOURCES = lcd.h lcd_lib.h tyan_lcdm.h tyan_lcdm.c report.h adv_bignum
|
||||
ula200_SOURCES = lcd.h adv_bignum.h ula200.h ula200.c report.h
|
||||
vlsys_m428_SOURCES = lcd.h report.h vlsys_m428.c vlsys_m428.h
|
||||
xosd_SOURCES = lcd.h xosdlib_drv.c xosdlib_drv.h report.h adv_bignum.h
|
||||
yard2LCD = lcd.h yard2LCD.c yard2LCD.h report.h
|
||||
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)
|
||||
|
||||
|
||||
@@ -1,227 +0,0 @@
|
||||
/** \file server/drivers/Olimex_MOD_LCD1x9.c
|
||||
* LCDd \c Olimex_MOD_LCD1x9 driver for MOD-LCD1x9 from Olimex.
|
||||
* This display uses a PCF857DU style controller.
|
||||
*/
|
||||
|
||||
/* Copyright (C) 2015 Harald Geyer <harald@ccbib.org>
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "lcd.h"
|
||||
#include "report.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include "i2c.h"
|
||||
#include "Olimex_MOD_LCD1x9_font.h"
|
||||
|
||||
#define BUS_ADDRESS 0x38
|
||||
#define LEN_INIT_SEQ 24
|
||||
|
||||
/** private data for the \c Olimex_MOD_LCD1x9 driver */
|
||||
typedef struct olimex1x9_private_data {
|
||||
I2CHandle *dev; /**< handle of the i2c device */
|
||||
uint16_t buf[11]; /**< header + frame buffer */
|
||||
} PrivateData;
|
||||
|
||||
/* Vars for the server core */
|
||||
MODULE_EXPORT char *api_version = API_VERSION;
|
||||
MODULE_EXPORT int stay_in_foreground = 0;
|
||||
MODULE_EXPORT int supports_multiple = 1;
|
||||
MODULE_EXPORT char *symbol_prefix = "olimex1x9_";
|
||||
|
||||
/**
|
||||
* Initialize the driver.
|
||||
* \param drvthis Pointer to driver structure.
|
||||
* \retval 0 Success.
|
||||
* \retval <0 Error.
|
||||
*/
|
||||
MODULE_EXPORT int
|
||||
olimex1x9_init (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p;
|
||||
const char *configvalue;
|
||||
char buffer[LEN_INIT_SEQ];
|
||||
uint8_t *preamble;
|
||||
int i;
|
||||
|
||||
/* Allocate and store private data */
|
||||
p = (PrivateData *) malloc(sizeof(PrivateData));
|
||||
if (p == NULL)
|
||||
return -1;
|
||||
if (drvthis->store_private_ptr(drvthis, p))
|
||||
return -1;
|
||||
|
||||
configvalue = drvthis->config_get_string(drvthis->name, "Device", 0, I2C_DEFAULT_DEVICE);
|
||||
p->dev = i2c_open(configvalue, BUS_ADDRESS);
|
||||
if (!p->dev) {
|
||||
report(RPT_ERR, "open i2c device '%s' failed: %s", configvalue, strerror(errno));
|
||||
return(-1);
|
||||
}
|
||||
|
||||
buffer[0] = 0xC8; /* Mode register */
|
||||
buffer[1] = 0xF0; /* Blink register */
|
||||
buffer[2] = 0xE0; /* Device select register */
|
||||
buffer[3] = 0x00; /* Point register */
|
||||
for (i = 4; i < LEN_INIT_SEQ; ++i)
|
||||
buffer[i] = 0xFF;
|
||||
|
||||
if (i2c_write(p->dev, buffer, LEN_INIT_SEQ) < 0) {
|
||||
report(RPT_ERR, "I2C: %s: sending of initialization data failed: %s", configvalue, strerror(errno));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
preamble = (uint8_t *) p->buf;
|
||||
preamble[0] = 0xE0; /* Device select register */
|
||||
preamble[1] = 0x00; /* Point register */
|
||||
|
||||
report(RPT_DEBUG, "%s: init() done", drvthis->name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Close the driver (do necessary clean-up).
|
||||
* \param drvthis Pointer to driver structure.
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
olimex1x9_close (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
if (p != NULL) {
|
||||
i2c_close(p->dev);
|
||||
free(p);
|
||||
}
|
||||
drvthis->store_private_ptr(drvthis, NULL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the display width in characters.
|
||||
* \param drvthis Pointer to driver structure.
|
||||
* \return Number of characters the display is wide.
|
||||
*/
|
||||
MODULE_EXPORT int
|
||||
olimex1x9_width (Driver *drvthis)
|
||||
{
|
||||
return 9;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the display height in characters.
|
||||
* \param drvthis Pointer to driver structure.
|
||||
* \return Number of characters the display is high.
|
||||
*/
|
||||
MODULE_EXPORT int
|
||||
olimex1x9_height (Driver *drvthis)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Clear the screen.
|
||||
* \param drvthis Pointer to driver structure.
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
olimex1x9_clear (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
/* Don't overwrite the preamble part of the buffer */
|
||||
memset(&p->buf[1], 0, sizeof(p->buf) - sizeof(p->buf[0]));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Flush data on screen to the display.
|
||||
* \param drvthis Pointer to driver structure.
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
olimex1x9_flush (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
i2c_write(p->dev, p->buf, sizeof(p->buf));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Print a string on the screen at position (x,y).
|
||||
* The upper-left corner is (1,1), the lower-right corner is (9, 1).
|
||||
* \param drvthis Pointer to driver structure.
|
||||
* \param x Horizontal character position (column).
|
||||
* \param y Vertical character position (row).
|
||||
* \param string String that gets written.
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
olimex1x9_string (Driver *drvthis, int x, int y, const unsigned char string[])
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
int pos = 10 - x; /* The left side is on the upper end of the buffer */
|
||||
int count = 0;
|
||||
|
||||
while (string[count]) {
|
||||
switch (string[count]) {
|
||||
case '\b': /* Allow composition of characters */
|
||||
++pos;
|
||||
break;
|
||||
case ':': /* We can't display a proper ':' */
|
||||
case '.': /* Use the dot between characters if possible */
|
||||
if (pos < 9 &&
|
||||
!(p->buf[pos+1] & htons(olimex1x9_font['.'])))
|
||||
++pos;
|
||||
/* fall through */
|
||||
default:
|
||||
if (pos >= 1 && pos <= 9) /* no buffer overflow */
|
||||
p->buf[pos] |=
|
||||
htons(olimex1x9_font[string[count]]);
|
||||
--pos;
|
||||
}
|
||||
++count;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Print a character on the screen at position (x,y).
|
||||
* The upper-left corner is (1,1), the lower-right corner is (9, 1).
|
||||
* \param drvthis Pointer to driver structure.
|
||||
* \param x Horizontal character position (column).
|
||||
* \param y Vertical character position (row).
|
||||
* \param c Character that gets written.
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
olimex1x9_chr (Driver *drvthis, int x, int y, unsigned char c)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
if (x < 1 || x > 9)
|
||||
return;
|
||||
|
||||
p->buf[10-x] |= olimex1x9_font[c];
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
#ifndef OLIMEX_LCD1x9_H
|
||||
#define OLIMEX_LCD1x9_H
|
||||
|
||||
MODULE_EXPORT int olimex1x9_init (Driver *drvthis);
|
||||
MODULE_EXPORT void olimex1x9_close (Driver *drvthis);
|
||||
MODULE_EXPORT int olimex1x9_width (Driver *drvthis);
|
||||
MODULE_EXPORT int olimex1x9_height (Driver *drvthis);
|
||||
MODULE_EXPORT void olimex1x9_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void olimex1x9_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void olimex1x9_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void olimex1x9_chr (Driver *drvthis, int x, int y, char c);
|
||||
|
||||
#endif
|
||||
@@ -1,131 +0,0 @@
|
||||
#ifndef OLIMEX_LCD1x9_FONT_H
|
||||
#define OLIMEX_LCD1x9_FONT_H
|
||||
|
||||
uint16_t olimex1x9_font[256] = {
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000, /* ' ' */
|
||||
0x9800, /* '!' */
|
||||
0x0101, /* '"' */
|
||||
0x5054, /* '#' -- use this for a degree sign */
|
||||
0x0000, /* '$' */
|
||||
0x0000, /* '%' */
|
||||
0x0000, /* '&' */
|
||||
0x0100, /* ''' */
|
||||
0x0096, /* '(' */
|
||||
0x9090, /* ')' */
|
||||
0x6761, /* '*' */
|
||||
0x4640, /* '+' */
|
||||
0x0020, /* ',' */
|
||||
0x4040, /* '-' */
|
||||
0x0800, /* '.' */
|
||||
0x0120, /* '/' */
|
||||
0x9096, /* '0' */
|
||||
0x9000, /* '1' */
|
||||
0x50d2, /* '2' */
|
||||
0xd0d0, /* '3' */
|
||||
0xd044, /* '4' */
|
||||
0xc0d4, /* '5' */
|
||||
0xc0d6, /* '6' */
|
||||
0x9010, /* '7' */
|
||||
0xd0d6, /* '8' */
|
||||
0xd0d4, /* '9' */
|
||||
0x0800, /* ':' same as '.' */
|
||||
0x0000, /* ';' */
|
||||
0x2100, /* '<' */
|
||||
0x0000, /* '=' */
|
||||
0x0021, /* '>' */
|
||||
0x0000, /* '?' */
|
||||
0xffff, /* '@' */
|
||||
0xd056, /* 'A' */
|
||||
0x21d6, /* 'B' */
|
||||
0x0096, /* 'C' */
|
||||
0x0027, /* 'D' */
|
||||
0x00d6, /* 'E' */
|
||||
0x4056, /* 'F' */
|
||||
0xc0d6, /* 'G' */
|
||||
0xd046, /* 'H' */
|
||||
0x0688, /* 'I' */
|
||||
0x9080, /* 'J' */
|
||||
0x2146, /* 'K' */
|
||||
0x0086, /* 'L' */
|
||||
0x9107, /* 'M' */
|
||||
0xb007, /* 'N' */
|
||||
0x9096, /* 'O' */
|
||||
0x5056, /* 'P' */
|
||||
0xb096, /* 'Q' */
|
||||
0x7056, /* 'R' */
|
||||
0xc0d4, /* 'S' */
|
||||
0x0610, /* 'T' */
|
||||
0x9086, /* 'U' */
|
||||
0x0126, /* 'V' */
|
||||
0xb026, /* 'W' */
|
||||
0x2121, /* 'X' */
|
||||
0xd0c4, /* 'Y' */
|
||||
0x01b0, /* 'Z' */
|
||||
0x0096, /* '[' */
|
||||
0x2001, /* '\' */
|
||||
0x9090, /* ']' */
|
||||
0x0010, /* '^' */
|
||||
0x0080, /* '_' */
|
||||
0x0400, /* '`' */
|
||||
0x02c2, /* 'a' */
|
||||
0xc0c6, /* 'b' */
|
||||
0x00c2, /* 'c' */
|
||||
0xd0c2, /* 'd' */
|
||||
0x00e2, /* 'e' */
|
||||
0x0056, /* 'f' */
|
||||
0xe080, /* 'g' */
|
||||
0xc046, /* 'h' */
|
||||
0x8000, /* 'i' */
|
||||
0x9080, /* 'j' */
|
||||
0x6046, /* 'k' */
|
||||
0x0026, /* 'l' */
|
||||
0xc242, /* 'm' */
|
||||
0xc042, /* 'n' */
|
||||
0xc0c2, /* 'o' */
|
||||
0x5056, /* 'p' */
|
||||
0xd054, /* 'q' */
|
||||
0x0042, /* 'r' */
|
||||
0x6080, /* 's' */
|
||||
0x00c6, /* 't' */
|
||||
0x8082, /* 'u' */
|
||||
0x0022, /* 'v' */
|
||||
0xa022, /* 'w' */
|
||||
0x2121, /* 'x' */
|
||||
0xa080, /* 'y' */
|
||||
0x00e0, /* 'z' */
|
||||
0x0000
|
||||
};
|
||||
|
||||
#endif
|
||||
+6
-21
@@ -188,11 +188,6 @@ glk_init(Driver *drvthis)
|
||||
p->width = 40; p->height = 8;
|
||||
p->gpo_count = 1;
|
||||
break;
|
||||
case 0x20 :
|
||||
p->model = "GLK12232-25-SM-USB";
|
||||
p->width = 20; p->height = 4;
|
||||
p->gpo_count = 2;
|
||||
break;
|
||||
case 0x21 :
|
||||
p->model = "GLK128128-25";
|
||||
p->width = 20; p->height = 16;
|
||||
@@ -203,10 +198,6 @@ glk_init(Driver *drvthis)
|
||||
p->gpo_count = 2;
|
||||
break;
|
||||
case 0x23 :
|
||||
p->model = "GLT12232-SM-USB";
|
||||
p->width = 20; p->height = 4;
|
||||
p->gpo_count = 2;
|
||||
break;
|
||||
case 0x24 :
|
||||
p->model = "GLK12232-25-SM";
|
||||
p->width = 20; p->height = 4;
|
||||
@@ -762,23 +753,17 @@ glk_get_key(Driver *drvthis)
|
||||
|
||||
/* Remap keys according to what LCDproc expects */
|
||||
switch (c) {
|
||||
case 'V' : // default mapping
|
||||
case 'I' : key = "Enter"; // pyramid mapping
|
||||
case 'V' : key = "Enter";
|
||||
break;
|
||||
case 'P' : // default mapping
|
||||
case 'D' : key = "Left"; // pyramid mapping
|
||||
case 'P' : key = "Left";
|
||||
break;
|
||||
case 'Q' : // default mapping
|
||||
case 'E' : key = "Right"; // pyramid mapping
|
||||
case 'Q' : key = "Right";
|
||||
break;
|
||||
case 'L' : // default mapping
|
||||
case 'J' : key = "Escape"; // pyramid mapping
|
||||
case 'L' : key = "Escape";
|
||||
break;
|
||||
case 'U' : // default mapping
|
||||
case 'C' : key = "Up"; // pyramid mapping
|
||||
case 'U' : key = "Up";
|
||||
break;
|
||||
case 'K' : // default mapping
|
||||
case 'H' : key = "Down"; // pyramid mapping
|
||||
case 'K' : key = "Down";
|
||||
break;
|
||||
default : break;
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
# include "hd44780-ext8bit.h"
|
||||
# include "hd44780-serialLpt.h"
|
||||
# include "hd44780-winamp.h"
|
||||
# include "hd44780-lcm162.h"
|
||||
#endif
|
||||
#include "hd44780-serial.h"
|
||||
#include "hd44780-lis2.h"
|
||||
@@ -61,7 +60,6 @@ static const ConnectionMapping connectionMapping[] = {
|
||||
{ "8bit", HD44780_CT_8BIT, IF_TYPE_PARPORT, hd_init_ext8bit },
|
||||
{ "serialLpt", HD44780_CT_SERIALLPT, IF_TYPE_PARPORT, hd_init_serialLpt },
|
||||
{ "winamp", HD44780_CT_WINAMP, IF_TYPE_PARPORT, hd_init_winamp },
|
||||
{ "lcm162", HD44780_CT_LCM162, IF_TYPE_PARPORT, hd_init_lcm162 },
|
||||
#endif
|
||||
/* serial connection types */
|
||||
{ "picanlcd", HD44780_CT_PICANLCD, IF_TYPE_SERIAL, hd_init_serial },
|
||||
|
||||
+102
-109
@@ -13,38 +13,17 @@
|
||||
* 1997 Matthias Prinke <m.prinke@trashcan.mcnet.de>
|
||||
*
|
||||
* The connections are:
|
||||
* PCF8574AP Bit LCD
|
||||
* P0 (4) 0x01 D4 (11)
|
||||
* P1 (5) 0x02 D5 (12)
|
||||
* P2 (6) 0x04 D6 (13)
|
||||
* P3 (7) 0x08 D7 (14)
|
||||
* P4 (9) 0x10 RS (4)
|
||||
* P5 (10) 0x20 RW (5)
|
||||
* P6 (11) 0x40 EN (6)
|
||||
* P7 (12) 0x80 /backlight (optional, active-low)
|
||||
* PCF8574AP LCD
|
||||
* P0 (4) D4 (11)
|
||||
* P1 (5) D5 (12)
|
||||
* P2 (6) D6 (13)
|
||||
* P3 (7) D7 (14)
|
||||
* P4 (9) RS (4)
|
||||
* P5 (10) RW (5)
|
||||
* P6 (11) EN (6)
|
||||
*
|
||||
* Configuration:
|
||||
\verbatim
|
||||
alternative wiring example:
|
||||
PCF8574AP: P0 P1 P2 P3 P4 P5 P6 P7
|
||||
| | | | | | | |
|
||||
HD44780: RS RW EN BL D4 D5 D6 D7
|
||||
|
||||
in LCDd.conf we then need to define
|
||||
i2c_line_RS=0x01
|
||||
i2c_line_RW=0x02
|
||||
i2c_line_EN=0x04
|
||||
i2c_line_BL=0x80
|
||||
i2c_line_D4=0x10
|
||||
i2c_line_D5=0x20
|
||||
i2c_line_D6=0x40
|
||||
i2c_line_D7=0x80
|
||||
Backlight=yes
|
||||
BacklightInvert=yes
|
||||
|
||||
The Backlight Invert is used if a 0 turns the backlight on, and 1 turns it off, i.e. npn transistor
|
||||
\endverbatim
|
||||
|
||||
* Backlight
|
||||
* P7 (12) /backlight (optional, active-low)
|
||||
*
|
||||
* Configuration:
|
||||
* device=/dev/i2c-0 # the device file of the i2c bus
|
||||
@@ -82,8 +61,19 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#ifdef HAVE_DEV_IICBUS_IIC_H
|
||||
#include <dev/iicbus/iic.h>
|
||||
#else /* HAVE_LINUX_I2C_DEV_H */
|
||||
#include <linux/i2c-dev.h>
|
||||
/* I2C_SLAVE is missing in linux/i2c-dev.h from kernel headers of 2.4.x kernels */
|
||||
#ifndef I2C_SLAVE
|
||||
#define I2C_SLAVE 0x0703 /* Change slave address */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "i2c.h"
|
||||
|
||||
// Generally, any function that accesses the LCD control lines needs to be
|
||||
// implemented separately for each HW design. This is typically (but not
|
||||
@@ -99,11 +89,6 @@ void i2c_HD44780_close(PrivateData *p);
|
||||
#define RW 0x20
|
||||
#define EN 0x40
|
||||
#define BL 0x80
|
||||
#define D4 0x01
|
||||
#define D5 0x02
|
||||
#define D6 0x04
|
||||
#define D7 0x08
|
||||
#define BL_INVERT 0
|
||||
// note that the above bits are all meant for the data port of PCF8574
|
||||
|
||||
#define I2C_ADDR_MASK 0x7f
|
||||
@@ -112,9 +97,13 @@ void i2c_HD44780_close(PrivateData *p);
|
||||
static void
|
||||
i2c_out(PrivateData *p, unsigned char val)
|
||||
{
|
||||
unsigned char data[2];
|
||||
char data[2];
|
||||
int datalen;
|
||||
static int no_more_errormsgs=0;
|
||||
#ifdef HAVE_DEV_IICBUS_IIC_H
|
||||
struct iiccmd cmd;
|
||||
bzero(&cmd, sizeof(cmd));
|
||||
#endif
|
||||
|
||||
if (p->port & I2C_PCAX_MASK) { // we have a PCA9554 or similar, that needs a 2-byte command
|
||||
data[0]=1; // command: read/write output port register
|
||||
@@ -125,13 +114,24 @@ i2c_out(PrivateData *p, unsigned char val)
|
||||
datalen=1;
|
||||
}
|
||||
|
||||
if (i2c_write(p->i2c, data, datalen) < 0) {
|
||||
p->hd44780_functions->drv_report(no_more_errormsgs?RPT_DEBUG:RPT_ERR, "HD44780: I2C: i2c write data %u failed: %s",
|
||||
val, strerror(errno));
|
||||
#ifdef HAVE_DEV_IICBUS_IIC_H
|
||||
cmd.slave = (p->port & I2C_ADDR_MASK) << 1;
|
||||
cmd.last = 1;
|
||||
cmd.count = datalen;
|
||||
cmd.buf = data;
|
||||
|
||||
if (ioctl(p->fd, I2CWRITE, &cmd) < 0) {
|
||||
#else /* HAVE_LINUX_I2C_DEV_H */
|
||||
if (write(p->fd,data,datalen) != datalen) {
|
||||
#endif
|
||||
p->hd44780_functions->drv_report(no_more_errormsgs?RPT_DEBUG:RPT_ERR, "HD44780: I2C: i2c write data %u to address 0x%02X failed: %s",
|
||||
val, p->port & I2C_ADDR_MASK, strerror(errno));
|
||||
no_more_errormsgs=1;
|
||||
}
|
||||
}
|
||||
|
||||
#define DEFAULT_DEVICE "/dev/i2c-0"
|
||||
|
||||
|
||||
/**
|
||||
* Initialize the driver.
|
||||
@@ -144,60 +144,61 @@ hd_init_i2c(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = (PrivateData*) drvthis->private_data;
|
||||
HD44780_functions *hd44780_functions = p->hd44780_functions;
|
||||
char device[256] = I2C_DEFAULT_DEVICE;
|
||||
|
||||
p->i2c_backlight_invert = drvthis->config_get_bool(drvthis->name, "BacklightInvert", 0, BL_INVERT);
|
||||
p->i2c_line_RS = drvthis->config_get_int(drvthis->name, "i2c_line_RS", 0, RS);
|
||||
p->i2c_line_RW = drvthis->config_get_int(drvthis->name, "i2c_line_RW", 0, RW);
|
||||
p->i2c_line_EN = drvthis->config_get_int(drvthis->name, "i2c_line_EN", 0, EN);
|
||||
p->i2c_line_BL = drvthis->config_get_int(drvthis->name, "i2c_line_BL", 0, BL);
|
||||
p->i2c_line_D4 = drvthis->config_get_int(drvthis->name, "i2c_line_D4", 0, D4);
|
||||
p->i2c_line_D5 = drvthis->config_get_int(drvthis->name, "i2c_line_D5", 0, D5);
|
||||
p->i2c_line_D6 = drvthis->config_get_int(drvthis->name, "i2c_line_D6", 0, D6);
|
||||
p->i2c_line_D7 = drvthis->config_get_int(drvthis->name, "i2c_line_D7", 0, D7);
|
||||
|
||||
report(RPT_INFO, "HD44780: I2C: Init using D4 and D5, and or'd lines, invert", p->i2c_line_RS);
|
||||
report(RPT_INFO, "HD44780: I2C: Pin RS mapped to 0x%02X", p->i2c_line_RS);
|
||||
report(RPT_INFO, "HD44780: I2C: Pin RW mapped to 0x%02X", p->i2c_line_RW);
|
||||
report(RPT_INFO, "HD44780: I2C: Pin EN mapped to 0x%02X", p->i2c_line_EN);
|
||||
report(RPT_INFO, "HD44780: I2C: Pin BL mapped to 0x%02X", p->i2c_line_BL);
|
||||
report(RPT_INFO, "HD44780: I2C: Pin D4 mapped to 0x%02X", p->i2c_line_D4);
|
||||
report(RPT_INFO, "HD44780: I2C: Pin D5 mapped to 0x%02X", p->i2c_line_D5);
|
||||
report(RPT_INFO, "HD44780: I2C: Pin D6 mapped to 0x%02X", p->i2c_line_D6);
|
||||
report(RPT_INFO, "HD44780: I2C: Pin D7 mapped to 0x%02X", p->i2c_line_D7);
|
||||
report(RPT_INFO, "HD44780: I2C: Invert Backlight %d", p->i2c_backlight_invert);
|
||||
|
||||
int enableLines = EN;
|
||||
char device[256] = DEFAULT_DEVICE;
|
||||
#ifdef HAVE_DEV_IICBUS_IIC_H
|
||||
struct iiccmd cmd;
|
||||
bzero(&cmd, sizeof(cmd));
|
||||
#endif
|
||||
|
||||
p->backlight_bit = p->i2c_line_BL;
|
||||
p->backlight_bit = BL;
|
||||
|
||||
/* READ CONFIG FILE */
|
||||
|
||||
/* Get serial device to use */
|
||||
strncpy(device, drvthis->config_get_string(drvthis->name, "Device", 0, I2C_DEFAULT_DEVICE), sizeof(device));
|
||||
strncpy(device, drvthis->config_get_string(drvthis->name, "Device", 0, DEFAULT_DEVICE), sizeof(device));
|
||||
device[sizeof(device)-1] = '\0';
|
||||
report(RPT_INFO,"HD44780: I2C: Using device '%s' and address 0x%02X for a %s",
|
||||
device, p->port & I2C_ADDR_MASK, (p->port & I2C_PCAX_MASK) ? "PCA9554(A)" : "PCF8574(A)");
|
||||
|
||||
p->i2c = i2c_open(device, p->port & I2C_ADDR_MASK);
|
||||
if (!p->i2c) {
|
||||
report(RPT_ERR, "HD44780: I2C: connecting to device '%s' slave 0x%02X failed:", device, p->port & I2C_ADDR_MASK, strerror(errno));
|
||||
// Open the I2C device
|
||||
p->fd = open(device, O_RDWR);
|
||||
if (p->fd < 0) {
|
||||
report(RPT_ERR, "HD44780: I2C: open i2c device '%s' failed: %s", device, strerror(errno));
|
||||
return(-1);
|
||||
}
|
||||
|
||||
// Set I2C address
|
||||
#ifdef HAVE_DEV_IICBUS_IIC_H
|
||||
cmd.slave = (p->port & I2C_ADDR_MASK) << 1;
|
||||
cmd.last = 0;
|
||||
cmd.count = 0;
|
||||
if (ioctl(p->fd, I2CRSTCARD, &cmd) < 0) {
|
||||
report(RPT_ERR, "HD44780: I2C: reset bus failed: %s", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
if (ioctl(p->fd, I2CSTART, &cmd) < 0) {
|
||||
report(RPT_ERR, "HD44780: I2C: set address to 0x%02X: %s", p->port & I2C_ADDR_MASK, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
#else /* HAVE_LINUX_I2C_DEV_H */
|
||||
if (ioctl(p->fd,I2C_SLAVE, p->port & I2C_ADDR_MASK) < 0) {
|
||||
report(RPT_ERR, "HD44780: I2C: set address to '%i': %s", p->port & I2C_ADDR_MASK, strerror(errno));
|
||||
return(-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (p->port & I2C_PCAX_MASK) { // we have a PCA9554 or similar, that needs special config
|
||||
unsigned char data[2];
|
||||
char data[2];
|
||||
data[0] = 2; // command: set polarity inversion
|
||||
data[1] = 0; // -> no polarity inversion
|
||||
if (i2c_write(p->i2c, data, 2) < 0) {
|
||||
if (write(p->fd,data,2) != 2) {
|
||||
report(RPT_ERR, "HD44780: I2C: i2c set polarity inversion failed: %s", strerror(errno));
|
||||
}
|
||||
data[0] = 3; // command: set output direction
|
||||
data[1] = 0; // -> all pins are outputs
|
||||
if (i2c_write(p->i2c, data, 2) <0) {
|
||||
if (write(p->fd,data,2) != 2) {
|
||||
report(RPT_ERR, "HD44780: I2C: i2c set output direction failed: %s", strerror(errno));
|
||||
}
|
||||
}
|
||||
@@ -208,49 +209,44 @@ hd_init_i2c(Driver *drvthis)
|
||||
|
||||
// powerup the lcd now
|
||||
/* We'll now send 0x03 a couple of times,
|
||||
* which is in fact (FUNCSET | IF_8BIT) >> 4
|
||||
*/
|
||||
i2c_out(p, p->i2c_line_D4 | p->i2c_line_D5);
|
||||
* which is in fact (FUNCSET | IF_8BIT) >> 4 */
|
||||
i2c_out(p, 0x03);
|
||||
if (p->delayBus)
|
||||
hd44780_functions->uPause(p, 1);
|
||||
|
||||
i2c_out(p, p->i2c_line_EN | p->i2c_line_D4 | p->i2c_line_D5);
|
||||
i2c_out(p, enableLines | 0x03);
|
||||
if (p->delayBus)
|
||||
hd44780_functions->uPause(p, 1);
|
||||
i2c_out(p, p->i2c_line_D4 | p->i2c_line_D5);
|
||||
i2c_out(p, 0x03);
|
||||
hd44780_functions->uPause(p, 15000);
|
||||
|
||||
i2c_out(p, p->i2c_line_EN | p->i2c_line_D4 | p->i2c_line_D5);
|
||||
i2c_out(p, enableLines | 0x03);
|
||||
if (p->delayBus)
|
||||
hd44780_functions->uPause(p, 1);
|
||||
i2c_out(p, p->i2c_line_D4 | p->i2c_line_D5);
|
||||
i2c_out(p, 0x03);
|
||||
hd44780_functions->uPause(p, 5000);
|
||||
|
||||
i2c_out(p, p->i2c_line_EN | p->i2c_line_D4 | p->i2c_line_D5);
|
||||
i2c_out(p, enableLines | 0x03);
|
||||
if (p->delayBus)
|
||||
hd44780_functions->uPause(p, 1);
|
||||
i2c_out(p, p->i2c_line_D4 | p->i2c_line_D5);
|
||||
i2c_out(p, 0x03);
|
||||
hd44780_functions->uPause(p, 100);
|
||||
|
||||
i2c_out(p, p->i2c_line_EN | p->i2c_line_D4 | p->i2c_line_D5);
|
||||
i2c_out(p, enableLines | 0x03);
|
||||
if (p->delayBus)
|
||||
hd44780_functions->uPause(p, 1);
|
||||
i2c_out(p, p->i2c_line_D4 | p->i2c_line_D5);
|
||||
i2c_out(p, 0x03);
|
||||
hd44780_functions->uPause(p, 100);
|
||||
|
||||
// now in 8-bit mode... set 4-bit mode
|
||||
/*
|
||||
OLD (FUNCSET | IF_4BIT) >> 4 0x02
|
||||
ALT (FUNCSET | IF_4BIT) 0x20
|
||||
*/
|
||||
i2c_out(p, p->i2c_line_D5);
|
||||
i2c_out(p, 0x02);
|
||||
if (p->delayBus)
|
||||
hd44780_functions->uPause(p, 1);
|
||||
|
||||
i2c_out(p, p->i2c_line_EN | p->i2c_line_D5);
|
||||
i2c_out(p, enableLines | 0x02);
|
||||
if (p->delayBus)
|
||||
hd44780_functions->uPause(p, 1);
|
||||
i2c_out(p, p->i2c_line_D5);
|
||||
i2c_out(p, 0x02);
|
||||
hd44780_functions->uPause(p, 100);
|
||||
|
||||
// Set up two-line, small character (5x8) mode
|
||||
@@ -264,8 +260,12 @@ hd_init_i2c(Driver *drvthis)
|
||||
|
||||
void
|
||||
i2c_HD44780_close(PrivateData *p) {
|
||||
if (p->i2c >= 0)
|
||||
i2c_close(p->i2c);
|
||||
if (p->fd >= 0) {
|
||||
#ifdef HAVE_DEV_IICBUS_IIC_H
|
||||
ioctl(p->fd, I2CSTOP);
|
||||
#endif
|
||||
close(p->fd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -279,28 +279,23 @@ i2c_HD44780_close(PrivateData *p) {
|
||||
void
|
||||
i2c_HD44780_senddata(PrivateData *p, unsigned char displayID, unsigned char flags, unsigned char ch)
|
||||
{
|
||||
unsigned char portControl = 0;
|
||||
unsigned char h=0;
|
||||
unsigned char l=0;
|
||||
if( ch & 0x80 ) h |= p->i2c_line_D7;
|
||||
if( ch & 0x40 ) h |= p->i2c_line_D6;
|
||||
if( ch & 0x20 ) h |= p->i2c_line_D5;
|
||||
if( ch & 0x10 ) h |= p->i2c_line_D4;
|
||||
if( ch & 0x08 ) l |= p->i2c_line_D7;
|
||||
if( ch & 0x04 ) l |= p->i2c_line_D6;
|
||||
if( ch & 0x02 ) l |= p->i2c_line_D5;
|
||||
if( ch & 0x01 ) l |= p->i2c_line_D4;
|
||||
unsigned char enableLines = 0, portControl = 0;
|
||||
unsigned char h = (ch >> 4) & 0x0f; // high and low nibbles
|
||||
unsigned char l = ch & 0x0f;
|
||||
|
||||
if (flags == RS_INSTR)
|
||||
portControl = 0;
|
||||
else //if (flags == RS_DATA)
|
||||
portControl = p->i2c_line_RS;
|
||||
portControl = RS;
|
||||
|
||||
portControl |= p->backlight_bit;
|
||||
|
||||
enableLines = EN;
|
||||
|
||||
i2c_out(p, portControl | h);
|
||||
if (p->delayBus)
|
||||
p->hd44780_functions->uPause(p, 1);
|
||||
i2c_out(p, p->i2c_line_EN | portControl | h);
|
||||
i2c_out(p, enableLines | portControl | h);
|
||||
if (p->delayBus)
|
||||
p->hd44780_functions->uPause(p, 1);
|
||||
i2c_out(p, portControl | h);
|
||||
@@ -308,7 +303,7 @@ i2c_HD44780_senddata(PrivateData *p, unsigned char displayID, unsigned char flag
|
||||
i2c_out(p, portControl | l);
|
||||
if (p->delayBus)
|
||||
p->hd44780_functions->uPause(p, 1);
|
||||
i2c_out(p, p->i2c_line_EN | portControl | l);
|
||||
i2c_out(p, enableLines | portControl | l);
|
||||
if (p->delayBus)
|
||||
p->hd44780_functions->uPause(p, 1);
|
||||
i2c_out(p, portControl | l);
|
||||
@@ -322,9 +317,7 @@ i2c_HD44780_senddata(PrivateData *p, unsigned char displayID, unsigned char flag
|
||||
*/
|
||||
void i2c_HD44780_backlight(PrivateData *p, unsigned char state)
|
||||
{
|
||||
if ( p->i2c_backlight_invert == 0 )
|
||||
p->backlight_bit = ((!p->have_backlight||state) ? 0 : p->i2c_line_BL);
|
||||
else // Inverted backlight - npn transistor
|
||||
p->backlight_bit = ((p->have_backlight && state) ? p->i2c_line_BL : 0);
|
||||
p->backlight_bit = ((!p->have_backlight||state) ? 0 : BL);
|
||||
|
||||
i2c_out(p, p->backlight_bit);
|
||||
}
|
||||
|
||||
@@ -1,133 +0,0 @@
|
||||
/*
|
||||
* 8-bit driver module for Hitachi HD44780 based LCD displays.
|
||||
* The LCD is operated in it's 8 bit-mode to be connected to a single
|
||||
* PC parallel port.
|
||||
*
|
||||
* Copyright (c) 1999, 1995 Benjamin Tse <blt@Comports.com>
|
||||
* 2001 Joris Robijn <joris@robijn.net>
|
||||
* 2009 Holger Rasch <rasch@bytemine.net>
|
||||
*
|
||||
* Created modular driver Dec 1999, Benjamin Tse <blt@Comports.com>
|
||||
*
|
||||
* Based on the code in the lcdtime package which uses the LCD
|
||||
* controller in its 8-bit mode.
|
||||
*
|
||||
* This file is released under the GNU General Public License. Refer to the
|
||||
* COPYING file distributed with this package.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copied from "hd44780-ext8.c" and modified for lcm-162 module
|
||||
* found in nexcom nsaXXXX models.
|
||||
*/
|
||||
|
||||
#include "hd44780-lcm162.h"
|
||||
#include "hd44780-low.h"
|
||||
#include "lpt-port.h"
|
||||
#include "port.h"
|
||||
#include "report.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
// Generally, any function that accesses the LCD control lines needs to be
|
||||
// implemented separately for each HW design. This is typically (but not
|
||||
// restricted to):
|
||||
// HD44780_senddata
|
||||
// HD44780_readkeypad
|
||||
|
||||
void lcm162_HD44780_senddata(PrivateData *p, unsigned char displayID, unsigned char flags, unsigned char ch);
|
||||
void lcm162_HD44780_backlight(PrivateData *p, unsigned char state);
|
||||
unsigned char lcm162_HD44780_readkeypad(PrivateData *p, unsigned int YData);
|
||||
void lcm162_HD44780_output(PrivateData *p, int data);
|
||||
|
||||
/* lcm-162 specific mapping parport <-> hd44780 signals */
|
||||
#define RS SEL
|
||||
#define RW INIT
|
||||
#define EN1 LF
|
||||
|
||||
|
||||
// initialise the driver
|
||||
int
|
||||
hd_init_lcm162(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = (PrivateData*) drvthis->private_data;
|
||||
HD44780_functions *hd44780_functions = p->hd44780_functions;
|
||||
|
||||
// Reserve the port registers
|
||||
if (port_access_multiple(p->port,3)) {
|
||||
report(RPT_ERR, "%s: cannot get IO-permission for 0x%03X: %s",
|
||||
drvthis->name, p->port, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
hd44780_functions->senddata = lcm162_HD44780_senddata;
|
||||
hd44780_functions->backlight = lcm162_HD44780_backlight;
|
||||
hd44780_functions->readkeypad = lcm162_HD44780_readkeypad;
|
||||
|
||||
// setup the lcd in 8 bit mode
|
||||
hd44780_functions->senddata(p, 0, RS_INSTR, FUNCSET | IF_8BIT);
|
||||
hd44780_functions->uPause(p, 4100);
|
||||
hd44780_functions->senddata(p, 0, RS_INSTR, FUNCSET | IF_8BIT);
|
||||
hd44780_functions->uPause(p, 100);
|
||||
hd44780_functions->senddata(p, 0, RS_INSTR, FUNCSET | IF_8BIT | TWOLINE | SMALLCHAR);
|
||||
hd44780_functions->uPause(p, 40);
|
||||
|
||||
common_init (p, IF_8BIT);
|
||||
|
||||
if (p->have_keypad)
|
||||
p->stuckinputs = 0; /* unused here */
|
||||
|
||||
// Writes new value to the "bargraph" latches
|
||||
hd44780_functions->output = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// lcm162_HD44780_senddata
|
||||
void
|
||||
lcm162_HD44780_senddata(PrivateData *p, unsigned char displayID, unsigned char flags, unsigned char ch)
|
||||
{
|
||||
unsigned char enableLines = 0, portControl;
|
||||
|
||||
// Only one controller is supported
|
||||
enableLines = EN1;
|
||||
|
||||
if (flags == RS_INSTR)
|
||||
portControl = 0;
|
||||
else //if (iflags == RS_DATA)
|
||||
portControl = RS;
|
||||
|
||||
portControl |= p->backlight_bit;
|
||||
|
||||
port_out(p->port + 2, portControl ^ OUTMASK);
|
||||
port_out(p->port, ch);
|
||||
if (p->delayBus) p->hd44780_functions->uPause(p, 1);
|
||||
port_out(p->port + 2, (enableLines|portControl) ^ OUTMASK);
|
||||
if (p->delayBus) p->hd44780_functions->uPause(p, 1);
|
||||
port_out(p->port + 2, portControl ^ OUTMASK);
|
||||
}
|
||||
|
||||
void lcm162_HD44780_backlight(PrivateData *p, unsigned char state)
|
||||
{
|
||||
/* ignore config, there is no backlight control on the lcm-162 */
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned char lcm162_HD44780_readkeypad(PrivateData *p, unsigned int YData)
|
||||
{
|
||||
unsigned char readval;
|
||||
|
||||
if (YData) return 0; /* no keymatrix */
|
||||
|
||||
readval = port_in(p->port + 1);
|
||||
if (readval & ACK) { /* a key is pressed */
|
||||
/* 4 keys encoded in signals PAPEREND and FAULT */
|
||||
/* map them to low nibble (multiple keys not supported) */
|
||||
return 1 << (
|
||||
((readval & FAULT) / FAULT << 1) |
|
||||
((readval & PAPEREND) / PAPEREND)
|
||||
);
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#ifndef HD_LCM162_H
|
||||
#define HD_LCM162_H
|
||||
|
||||
#include "lcd.h" /* for Driver */
|
||||
|
||||
// initialise this particular driver
|
||||
int hd_init_lcm162(Driver *drvthis);
|
||||
|
||||
#endif
|
||||
@@ -29,8 +29,6 @@
|
||||
# include <ftdi.h>
|
||||
#endif
|
||||
|
||||
#include "i2c.h"
|
||||
|
||||
/** \name Symbolic names for connection types
|
||||
*@{*/
|
||||
#define HD44780_CT_UNKNOWN 0
|
||||
@@ -59,7 +57,6 @@
|
||||
#define HD44780_CT_PIPLATE 23
|
||||
#define HD44780_CT_SPI 24
|
||||
#define HD44780_CT_PIFACECAD 25
|
||||
#define HD44780_CT_LCM162 26
|
||||
/**@}*/
|
||||
|
||||
/** \name Symbolic names for interface types
|
||||
@@ -158,22 +155,6 @@ typedef struct hd44780_private_data {
|
||||
int ftdi_line_backlight;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_I2C
|
||||
/* i2c based connection types */
|
||||
|
||||
int i2c_backlight_invert;
|
||||
int i2c_line_RS;
|
||||
int i2c_line_RW;
|
||||
int i2c_line_EN;
|
||||
int i2c_line_BL;
|
||||
int i2c_line_D4;
|
||||
int i2c_line_D5;
|
||||
int i2c_line_D6;
|
||||
int i2c_line_D7;
|
||||
|
||||
I2CHandle *i2c;
|
||||
#endif
|
||||
|
||||
#ifdef WITH_ETHLCD
|
||||
int sock; /**< socket for TCP devices */
|
||||
#endif
|
||||
|
||||
@@ -71,8 +71,6 @@ void lcdrpi_HD44780_close(PrivateData *p);
|
||||
*/
|
||||
static volatile unsigned int *gpio_map = NULL;
|
||||
|
||||
static unsigned int gpio_base_address = 0;
|
||||
|
||||
/*
|
||||
* Two different board revisions are currently in widespread use. The
|
||||
* GPIO mappings differ slightly - Not enough to kill a system yet.
|
||||
@@ -121,7 +119,7 @@ setup_io(Driver *drvthis)
|
||||
PROT_READ | PROT_WRITE,
|
||||
MAP_SHARED,
|
||||
mem_fd,
|
||||
gpio_base_address);
|
||||
GPIO_BASE);
|
||||
|
||||
if (gpio_map == MAP_FAILED) {
|
||||
report(RPT_ERR, "setup_io: mmap failed: %s", strerror(errno));
|
||||
@@ -163,8 +161,9 @@ check_board_rev(Driver *drvthis)
|
||||
|
||||
/* On boards that have been overvolted, the MSB will be set */
|
||||
rev &= 0x00ff;
|
||||
if ((strcmp(hw, "BCM2708") != 0 && strcmp(hw, "BCM2709") != 0) || rev == 0) {
|
||||
report(RPT_ERR, "check_board_rev: This board is not recognized as a Raspberry Pi! Found:%s",hw);
|
||||
|
||||
if (strcmp(hw, "BCM2708") != 0 || rev == 0) {
|
||||
report(RPT_ERR, "check_board_rev: This board is not recognized as a Raspberry Pi!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -172,22 +171,17 @@ check_board_rev(Driver *drvthis)
|
||||
* in the wild). */
|
||||
if (rev < 4) {
|
||||
report(RPT_INFO, "check_board_rev: Revision 1 board detected");
|
||||
gpio_base_address = BCM2835_PERI_BASE_PI12 + GPIO_BASE_OFFSET;
|
||||
return gpio_pins_R1;
|
||||
}
|
||||
/* Currently, Rev 2 boards are 0x004, 0x005, or 0x006. This will need
|
||||
* updating as new revisions are released, but it is unlikely that P1
|
||||
* will change. */
|
||||
if (rev > 3 && rev <= 21) {
|
||||
if (rev > 3) {
|
||||
report(RPT_INFO, "check_board_rev: Revision 2 board detected");
|
||||
gpio_base_address = BCM2835_PERI_BASE_PI12 + GPIO_BASE_OFFSET;
|
||||
return gpio_pins_R2;
|
||||
}
|
||||
|
||||
report(RPT_INFO, "check_board_rev: Raspberry Pi 3 board detected");
|
||||
gpio_base_address = BCM2835_PERI_BASE_PI3 + GPIO_BASE_OFFSET;
|
||||
return gpio_pins_R2;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -291,7 +285,7 @@ lcdrpi_HD44780_close(PrivateData *p)
|
||||
|
||||
/* Unmap and free memory */
|
||||
if (gpio_map != NULL)
|
||||
munmap((void *) gpio_map, GPIO_BLOCK_SIZE);
|
||||
munmap((caddr_t) gpio_map, GPIO_BLOCK_SIZE);
|
||||
if (p->rpi_gpio != NULL)
|
||||
free(p->rpi_gpio);
|
||||
p->rpi_gpio = NULL;
|
||||
|
||||
@@ -20,10 +20,9 @@ struct rpi_gpio_map {
|
||||
};
|
||||
|
||||
/** Peripheral base address of the BCM2835 */
|
||||
#define BCM2835_PERI_BASE_PI12 0x20000000
|
||||
#define BCM2835_PERI_BASE_PI3 0x3F000000
|
||||
/** GPIO register start address offset from PERI_BASE */
|
||||
#define GPIO_BASE_OFFSET 0x200000
|
||||
#define BCM2835_PERI_BASE 0x20000000
|
||||
/** GPIO register start address */
|
||||
#define GPIO_BASE BCM2835_PERI_BASE + 0x200000
|
||||
/** Length of register space */
|
||||
#define GPIO_BLOCK_SIZE 180
|
||||
/** The Pi has 32 GPIO pins */
|
||||
|
||||
@@ -1,120 +0,0 @@
|
||||
/** \file server/drivers/i2c.c
|
||||
* OS agnostic functions to access i2c devices.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#ifdef HAVE_DEV_IICBUS_IIC_H
|
||||
#include <dev/iicbus/iic.h>
|
||||
#else /* HAVE_LINUX_I2C_DEV_H */
|
||||
#include <linux/i2c-dev.h>
|
||||
/* I2C_SLAVE is missing in linux/i2c-dev.h from kernel headers of 2.4.x kernels
|
||||
*/
|
||||
#ifndef I2C_SLAVE
|
||||
#define I2C_SLAVE 0x0703 /* ioctl to change slave address */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define I2C_DEFAULT_DEVICE "/dev/i2c-0"
|
||||
|
||||
/** data to access an i2c slave */
|
||||
typedef struct {
|
||||
int fd; /**< file descriptor of the i2c device */
|
||||
#ifdef HAVE_DEV_IICBUS_IIC_H
|
||||
unsigned int slave; /**< slave address */
|
||||
#endif
|
||||
} I2CHandle;
|
||||
|
||||
|
||||
/**
|
||||
* setup connection to i2c slave
|
||||
* \param device device file of the i2c bus
|
||||
* \param addr use this slave address
|
||||
* \retval NULL Error
|
||||
* \retval Pointer to handle of the connection
|
||||
*/
|
||||
I2CHandle *i2c_open(const char *device, unsigned int addr)
|
||||
{
|
||||
I2CHandle *h;
|
||||
#ifdef HAVE_DEV_IICBUS_IIC_H
|
||||
struct iiccmd cmd;
|
||||
bzero(&cmd, sizeof(cmd));
|
||||
#endif
|
||||
|
||||
|
||||
h = malloc(sizeof(*h));
|
||||
if(!h)
|
||||
return NULL;
|
||||
|
||||
h->fd = open(device, O_RDWR);
|
||||
if(h->fd < 0)
|
||||
goto free;
|
||||
|
||||
#ifdef HAVE_DEV_IICBUS_IIC_H
|
||||
cmd.slave = h->slave = addr << 1;
|
||||
cmd.last = 0;
|
||||
cmd.count = 0;
|
||||
if (ioctl(h->fd, I2CRSTCARD, &cmd) < 0)
|
||||
goto close;
|
||||
if (ioctl(h->fd, I2CSTART, &cmd) < 0)
|
||||
goto close;
|
||||
#else /* HAVE_LINUX_I2C_DEV_H */
|
||||
if (ioctl(h->fd, I2C_SLAVE, addr) < 0) {
|
||||
goto close;
|
||||
}
|
||||
#endif
|
||||
|
||||
return h;
|
||||
|
||||
close:
|
||||
close(h->fd);
|
||||
free:
|
||||
free(h);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* close connection to i2c slave
|
||||
*/
|
||||
void i2c_close(I2CHandle *h)
|
||||
{
|
||||
#ifdef HAVE_DEV_IICBUS_IIC_H
|
||||
ioctl(h->fd, I2CSTOP);
|
||||
#endif
|
||||
close(h->fd);
|
||||
free(h);
|
||||
}
|
||||
|
||||
/**
|
||||
* write data to an i2c slave
|
||||
* \param h Handle of i2c slave
|
||||
* \param buf Buffer to send to the device
|
||||
* \param count Number of bytes to write
|
||||
* \retval >=0 Success.
|
||||
* \retval <0 Error.
|
||||
*/
|
||||
int i2c_write(I2CHandle *h, void *buf, unsigned int count)
|
||||
{
|
||||
#ifdef HAVE_DEV_IICBUS_IIC_H
|
||||
struct iiccmd cmd;
|
||||
bzero(&cmd, sizeof(cmd));
|
||||
cmd.slave = h->slave;
|
||||
cmd.last = 1;
|
||||
cmd.count = count;
|
||||
cmd.buf = buf;
|
||||
|
||||
return ioctl(h->fd, I2CWRITE, &cmd);
|
||||
#else /* HAVE_LINUX_I2C_DEV_H */
|
||||
if (write(h->fd, buf, count) != count)
|
||||
return -1;
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
#ifndef I2C_H
|
||||
#define I2C_H
|
||||
|
||||
struct i2c_data;
|
||||
|
||||
typedef struct i2c_data I2CHandle;
|
||||
|
||||
#define I2C_DEFAULT_DEVICE "/dev/i2c-0"
|
||||
|
||||
extern I2CHandle *i2c_open(const char *device, unsigned int addr);
|
||||
extern void i2c_close(I2CHandle *h);
|
||||
extern int i2c_write(I2CHandle *h, void *buf, unsigned int count);
|
||||
|
||||
#endif /* I2C_H */
|
||||
@@ -34,9 +34,9 @@ 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)
|
||||
// drvthis->chr (drvthis, x+pos, y, cellwidth + cc_offset);
|
||||
// #else
|
||||
#if defined(SEAMLESS_HBARS)
|
||||
drvthis->chr (drvthis, x+pos, y, cellwidth + cc_offset);
|
||||
#else
|
||||
drvthis->icon (drvthis, x+pos, y, ICON_BLOCK_FILLED);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,230 +0,0 @@
|
||||
/** \file server/drivers/linux_input.c
|
||||
* LCDd \c linux event device driver for inputting data from the input
|
||||
* subsystem of the linux kernel..
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <linux/input.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "lcd.h"
|
||||
#include "linux_input.h"
|
||||
#include "report.h"
|
||||
#include "shared/LL.h"
|
||||
|
||||
#define LINUXINPUT_DEFAULT_DEVICE "/dev/input/event0"
|
||||
|
||||
/** describe the button of a keycode */
|
||||
struct keycode {
|
||||
unsigned short code;
|
||||
char *button;
|
||||
};
|
||||
|
||||
/**
|
||||
* Parse key definition from config file
|
||||
* \param configvalue value part of the config file entry
|
||||
* \retval NULL Error.
|
||||
* \retval else Pointer to newly allocated struct keycode.
|
||||
*/
|
||||
static struct keycode *
|
||||
keycode_create(const char *configvalue)
|
||||
{
|
||||
int code;
|
||||
char *button;
|
||||
struct keycode *ret;
|
||||
|
||||
code = atoi(configvalue);
|
||||
if (code < 0 || code > UINT16_MAX)
|
||||
return NULL;
|
||||
|
||||
button = strchr(configvalue,',');
|
||||
if (!button)
|
||||
return NULL;
|
||||
button = strdup(&button[1]);
|
||||
if (!button)
|
||||
return NULL;
|
||||
|
||||
ret = malloc(sizeof(*ret));
|
||||
if (ret) {
|
||||
ret->code = code;
|
||||
ret->button = button;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/** private data for the linux event device driver */
|
||||
typedef struct linuxInput_private_data {
|
||||
int fd;
|
||||
LinkedList *buttonmap;
|
||||
} PrivateData;
|
||||
|
||||
|
||||
// Vars for the server core
|
||||
MODULE_EXPORT char *api_version = API_VERSION;
|
||||
MODULE_EXPORT int stay_in_foreground = 0;
|
||||
MODULE_EXPORT int supports_multiple = 1;
|
||||
MODULE_EXPORT char *symbol_prefix = "linuxInput_";
|
||||
|
||||
|
||||
/**
|
||||
* Initialize the driver.
|
||||
* \param drvthis Pointer to driver structure.
|
||||
* \retval 0 Success.
|
||||
* \retval <0 Error.
|
||||
*/
|
||||
MODULE_EXPORT int
|
||||
linuxInput_init (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p;
|
||||
const char *s;
|
||||
struct keycode *key;
|
||||
int i;
|
||||
|
||||
/* Allocate and store private data */
|
||||
p = (PrivateData *) calloc(1, sizeof(PrivateData));
|
||||
if (p == NULL)
|
||||
return -1;
|
||||
if (drvthis->store_private_ptr(drvthis, p))
|
||||
return -1;
|
||||
|
||||
/* initialize private data */
|
||||
p->fd = -1;
|
||||
if ((p->buttonmap = LL_new()) == NULL) {
|
||||
report(RPT_ERR, "%s: cannot allocate memory for buttons", drvthis->name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Read config file */
|
||||
|
||||
/* What device should be used */
|
||||
s = drvthis->config_get_string(drvthis->name, "Device", 0,
|
||||
LINUXINPUT_DEFAULT_DEVICE);
|
||||
report(RPT_INFO, "%s: using Device %s", drvthis->name, s);
|
||||
|
||||
|
||||
if ((p->fd = open(s, O_RDONLY | O_NONBLOCK)) < 0) {
|
||||
report(RPT_ERR, "%s: open(%s) failed (%s)",
|
||||
drvthis->name, s, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 0; (s = drvthis->config_get_string(drvthis->name, "key", i, NULL)) != NULL; i++) {
|
||||
if ((key = keycode_create(s)) == NULL) {
|
||||
report(RPT_ERR, "%s: parsing configvalue '%s' failed",
|
||||
drvthis->name, s);
|
||||
continue;
|
||||
}
|
||||
LL_AddNode(p->buttonmap, key);
|
||||
}
|
||||
|
||||
report(RPT_DEBUG, "%s: init() done", drvthis->name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Close the driver (do necessary clean-up).
|
||||
* \param drvthis Pointer to driver structure.
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
linuxInput_close (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
struct keycode *k;
|
||||
|
||||
if (p != NULL) {
|
||||
if (p->fd >= 0)
|
||||
close(p->fd);
|
||||
|
||||
if (p->buttonmap != NULL) {
|
||||
while ((k = LL_Pop(p->buttonmap)) != NULL) {
|
||||
free(k->button);
|
||||
free(k);
|
||||
}
|
||||
LL_Destroy(p->buttonmap);
|
||||
}
|
||||
|
||||
free(p);
|
||||
}
|
||||
drvthis->store_private_ptr(drvthis, NULL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Helper function to check LL items against a given key code.
|
||||
* \param data Pointer to data of list item
|
||||
* \param codep Pointer to value holding the received key code
|
||||
* \retval 0 We found the right item.
|
||||
* \retval else We need to continue searching.
|
||||
*/
|
||||
static int
|
||||
compare_with_keycode (void *data, void *codep)
|
||||
{
|
||||
uint16_t code = *(uint16_t *)codep;
|
||||
struct keycode *k = data;
|
||||
|
||||
return k->code != code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the next input event.
|
||||
* \param drvthis Pointer to driver structure.
|
||||
* \retval String representation of the key;
|
||||
* \c NULL for nothing available / error.
|
||||
*/
|
||||
MODULE_EXPORT const char *
|
||||
linuxInput_get_key (Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
struct input_event event;
|
||||
struct keycode *k;
|
||||
|
||||
if (read(p->fd, &event, sizeof(event)) != sizeof(event))
|
||||
return NULL;
|
||||
|
||||
/* Ignore release events and not-key events */
|
||||
if (event.type != EV_KEY || event.value == 0)
|
||||
return NULL;
|
||||
|
||||
switch (event.code) {
|
||||
case KEY_ESC:
|
||||
return "Escape";
|
||||
|
||||
case KEY_UP:
|
||||
return "Up";
|
||||
|
||||
case KEY_LEFT:
|
||||
return "Left";
|
||||
|
||||
case KEY_RIGHT:
|
||||
return "Right";
|
||||
|
||||
case KEY_DOWN:
|
||||
return "Down";
|
||||
|
||||
case KEY_ENTER:
|
||||
case KEY_KPENTER:
|
||||
return "Enter";
|
||||
|
||||
default:
|
||||
LL_Rewind(p->buttonmap);
|
||||
k = LL_Find(p->buttonmap, compare_with_keycode, &event.code);
|
||||
if (k)
|
||||
return k->button;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
#ifndef LINUX_INPUT_H
|
||||
#define LINUX_INPUT_H
|
||||
|
||||
#include "lcd.h"
|
||||
|
||||
MODULE_EXPORT int linuxInput_init (Driver *drvthis);
|
||||
MODULE_EXPORT void linuxInput_close (Driver *drvthis);
|
||||
|
||||
MODULE_EXPORT const char *linuxInput_get_key (Driver *drvthis);
|
||||
|
||||
#endif
|
||||
@@ -49,7 +49,6 @@
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/file.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
|
||||
@@ -60,13 +60,13 @@ typedef struct rawserial_private_data {
|
||||
/** \name Event loop timing. refresh_time and refresh_delta form the
|
||||
* event loop timing mechanism for configurable update rates.
|
||||
*@{*/
|
||||
unsigned int refresh_time; /**< time at the last screen update */
|
||||
unsigned int refresh_delta; /**< time step to next screen update */
|
||||
uint refresh_time; /**< time at the last screen update */
|
||||
uint refresh_delta; /**< time step to next screen update */
|
||||
/**@}*/
|
||||
} PrivateData;
|
||||
|
||||
/* Local prototypes */
|
||||
static unsigned int get_millisecond_time(void);
|
||||
static uint get_millisecond_time(void);
|
||||
|
||||
|
||||
/* Vars for the server core */
|
||||
@@ -303,7 +303,7 @@ rawserial_flush(Driver *drvthis)
|
||||
PrivateData *p = drvthis->private_data;
|
||||
char out[LCD_MAX_WIDTH * LCD_MAX_HEIGHT];
|
||||
|
||||
unsigned int currentTime = get_millisecond_time();
|
||||
uint currentTime = get_millisecond_time();
|
||||
int t_delta = currentTime - p->refresh_time;
|
||||
|
||||
/*
|
||||
@@ -415,7 +415,7 @@ rawserial_get_info(Driver *drvthis)
|
||||
*
|
||||
* \return int with current millisecond time.
|
||||
*/
|
||||
static unsigned
|
||||
static uint
|
||||
get_millisecond_time(void)
|
||||
{
|
||||
struct timeval ts;
|
||||
|
||||
@@ -1,658 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2009 by M. Feser *
|
||||
* Copyright (C) 2013 by R. Geigenberger (Update for YARD2) *
|
||||
* yard2lcdproc (.A.T.) yard2usb.de *
|
||||
* *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) 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., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "lcd.h"
|
||||
//#define DEBUG
|
||||
#include "report.h"
|
||||
#include "yard2LCD.h"
|
||||
#include "lcd_lib.h"
|
||||
|
||||
/*
|
||||
//Type of characters currently stored in CGRAM. from lcd.h as info
|
||||
typedef enum {
|
||||
standard, // one char is used for heartbeat
|
||||
vbar, // vertical bars
|
||||
hbar, // horizontal bars
|
||||
icons, // standard icons
|
||||
custom, // custom settings
|
||||
bignum, // big numbers
|
||||
} CGmode;
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
Dmode_standard,
|
||||
Dmode_graphical
|
||||
} Dmode;
|
||||
|
||||
|
||||
/* Driver private data */
|
||||
typedef struct driver_private_data {
|
||||
int fd;
|
||||
int width, height;
|
||||
int gwidth, gheight;
|
||||
int hspace, vspace;
|
||||
int cellwidth, cellheight;
|
||||
int bigcellwidth, bigcellheight;
|
||||
char *framebuf;
|
||||
int on_brightness;
|
||||
int off_brightness;
|
||||
char hw_brightness;
|
||||
CGmode ccmode;
|
||||
Dmode dispmode;
|
||||
char info[255];
|
||||
char LCDtype;
|
||||
} PrivateData;
|
||||
|
||||
/* Prototypes of internal functions */
|
||||
static int yard_hwWrite(Driver *drvthis, unsigned char *yardData, unsigned char Datalen);
|
||||
static int yard_hwClearLCD(Driver *drvthis);
|
||||
static int yard_hwEnterGmode(Driver *drvthis);
|
||||
static int yard_hwGotoXY(Driver *drvthis, unsigned char x, unsigned char y);
|
||||
static int yard_hwPrintChar(Driver *drvthis, char c);
|
||||
static int yard_hwPrintCharArray(Driver *drvthis, char *str, unsigned char len);
|
||||
static int yard_hwSetBrightness(Driver *drvthis, unsigned char brightVal);
|
||||
static int yard_hwWriteCGRam(Driver *drvthis, unsigned char numChar, unsigned char *data);
|
||||
|
||||
|
||||
/* Vars for the server core */
|
||||
MODULE_EXPORT char *api_version = API_VERSION;
|
||||
MODULE_EXPORT int stay_in_foreground = 0;
|
||||
MODULE_EXPORT int supports_multiple = 0;
|
||||
MODULE_EXPORT char *symbol_prefix = "yard_";
|
||||
|
||||
unsigned char yardCmd[64];
|
||||
|
||||
/*
|
||||
* Hardware function: Write YARD command to KeyLcd via socket
|
||||
*/
|
||||
static int
|
||||
yard_hwWrite(Driver *drvthis, unsigned char *yardData, unsigned char Datalen)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 01 - Enter yard_hwWrite: %d - %s",drvthis->name,Datalen,yardData);
|
||||
PrivateData *p = drvthis->private_data;
|
||||
unsigned char byteCnt;
|
||||
|
||||
// Send data to YARD server
|
||||
if ( (Datalen > 0) && (Datalen <= MAX_YARDDATA_SIZE))
|
||||
{
|
||||
byteCnt = write(p->fd, yardData, Datalen); //(char *)&yardCMD
|
||||
//byteCnt = write(p->fd, "WTEST",5);
|
||||
if (byteCnt < 0)
|
||||
{
|
||||
report(RPT_WARNING, "%s: Can't send data to YARD2 LCDserver !", drvthis->name);
|
||||
debug(RPT_DEBUG, "%s: Event 01.1 - Can't send data to YARD2 LCDserver !", drvthis->name);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 01.1 - %s: Too much Data for YARD Server: %d !", drvthis->name,Datalen);
|
||||
report(RPT_WARNING, "%s: Too much Data for YARD Server: %d !", drvthis->name,Datalen);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
// Just wait for YARD server response; No matter of Data received, but > 2 bytes, normally ROK is send
|
||||
byteCnt = read(p->fd, (char *)&yardData, sizeof(yardData) );
|
||||
if (byteCnt < 0)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Cannot receive ROK from YARD2 server !", drvthis->name);
|
||||
report(RPT_ERR, "%s: Cannot receive ROK from YARD2 server !", drvthis->name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Hardware function: Clears screen
|
||||
*/
|
||||
static int
|
||||
yard_hwClearLCD(Driver *drvthis)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 02 - Enter yard_hwClearLCD",drvthis->name);
|
||||
unsigned char cmd;
|
||||
|
||||
cmd = 'C'; // = Clear cmd for YARD
|
||||
return yard_hwWrite(drvthis, &cmd, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Hardware function: Shifts cursor to position (x,y), left upper corner equals (1,1)
|
||||
*/
|
||||
static int
|
||||
yard_hwGotoXY(Driver *drvthis, unsigned char x, unsigned char y)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 03 - Enter yard_hwGotoXY: X.%d - Y.%d",drvthis->name,x,y);
|
||||
PrivateData *p = (PrivateData *)drvthis->private_data;
|
||||
unsigned char cmdBuf[5];
|
||||
|
||||
// Error check
|
||||
switch (p->dispmode)
|
||||
{
|
||||
case Dmode_standard:
|
||||
{
|
||||
if ( (x > p->width) || (x < 1) || (y > p->height) || (y < 1) )
|
||||
return -1;
|
||||
|
||||
// Setup and send YARD command
|
||||
cmdBuf[0] = 'G';
|
||||
cmdBuf[1] = x - 1; // Zero index start ! lcdproc starts with 1,1, YARD 0,0
|
||||
cmdBuf[2] = y - 1;
|
||||
return yard_hwWrite(drvthis, cmdBuf, 3);
|
||||
|
||||
}
|
||||
default: {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Hardware function: Prints a single character
|
||||
*/
|
||||
static int
|
||||
yard_hwPrintChar(Driver *drvthis, char c)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 04 - Enter yard_hwPrintChar: %s",drvthis->name,c);
|
||||
unsigned char cmdBuf[2];
|
||||
|
||||
// Setup YARD command
|
||||
cmdBuf[0] = 'W';
|
||||
cmdBuf[1] = c;
|
||||
|
||||
// Send command
|
||||
return yard_hwWrite(drvthis, cmdBuf, 2);
|
||||
}
|
||||
|
||||
/*
|
||||
* Hardware function: Prints a character array
|
||||
*/
|
||||
static int
|
||||
yard_hwPrintCharArray(Driver *drvthis, char *str, unsigned char len)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 05 - Enter yard_hwPrintCharArray: %d - %s",drvthis->name,len,str);
|
||||
unsigned char cmdBuf[MAX_YARDDATA_SIZE];
|
||||
|
||||
// Error check
|
||||
if (len > MAX_YARDDATA_SIZE)
|
||||
{
|
||||
report(RPT_WARNING, "%s: PrintCharArray parameter too large !", drvthis->name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
cmdBuf[0] = 'W';
|
||||
memcpy(&cmdBuf[1], str, len);
|
||||
|
||||
// Send command
|
||||
return yard_hwWrite(drvthis, cmdBuf, len + 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Hardware function: Sets brightness of the backlight
|
||||
*/
|
||||
yard_hwSetBrightness(Driver *drvthis, unsigned char brightVal)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 06 - Enter yard_hwSetBrightness: %d",drvthis->name,brightVal);
|
||||
unsigned char cmdBuf[3];
|
||||
|
||||
// Setup YARD command
|
||||
cmdBuf[0] = 'B';
|
||||
cmdBuf[1] = brightVal;
|
||||
return yard_hwWrite(drvthis, cmdBuf, 2);
|
||||
}
|
||||
|
||||
/*
|
||||
* Hardware function: Writes a character into the CGRAM
|
||||
*/
|
||||
static int
|
||||
yard_hwWriteCGRam(Driver *drvthis, unsigned char numChar, unsigned char *data)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 07 - Enter yard_hwWriteCGRam: %d - %02X",drvthis->name,numChar,data);
|
||||
unsigned char cmdBuf[11];
|
||||
|
||||
// Setup YARD command
|
||||
cmdBuf[0] = 'I';
|
||||
cmdBuf[1] = numChar;
|
||||
memcpy(&cmdBuf[2], data, 8);
|
||||
return yard_hwWrite(drvthis, cmdBuf, 10);
|
||||
}
|
||||
|
||||
/*
|
||||
* Inits settings and connection
|
||||
*/
|
||||
MODULE_EXPORT int
|
||||
yard_init(Driver *drvthis)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 08 - Enter yard_init",drvthis->name);
|
||||
struct sockaddr_un srvAddr;
|
||||
int tmp, srvAddrLen;
|
||||
PrivateData *p;
|
||||
char sockpath[200] = DEFAULT_SOCK_PATH;
|
||||
unsigned char byteCnt;
|
||||
char Recbuffer[10];
|
||||
|
||||
|
||||
// Allocate and store private data
|
||||
p = (PrivateData *)malloc(sizeof(PrivateData));
|
||||
if (p == NULL)
|
||||
return -1;
|
||||
if (drvthis->store_private_ptr(drvthis, p) < 0)
|
||||
return -1;
|
||||
|
||||
// Initialize cellsize, character spacing and graphical offset
|
||||
p->fd = -1;
|
||||
p->cellwidth = DEFAULT_CELLWIDTH;
|
||||
p->cellheight = DEFAULT_CELLHEIGHT;
|
||||
p->bigcellwidth = DEFAULT_CELLWIDTH_BIG;
|
||||
p->bigcellheight = DEFAULT_CELLHEIGHT_BIG;
|
||||
p->hspace = DEFAULT_HSPACE;
|
||||
p->vspace = DEFAULT_VSPACE;
|
||||
p->ccmode = standard;
|
||||
p->dispmode = Dmode_standard;
|
||||
p->LCDtype = 0; //only use 0=HD44780; not supported now 1=KS0066;2=T6963c;3=KS0108
|
||||
p->width = DEFAULT_WIDTH;
|
||||
p->height = DEFAULT_HEIGHT;
|
||||
p->gwidth = DEFAULT_GWIDTH;
|
||||
p->gheight = DEFAULT_GHEIGHT;
|
||||
|
||||
// Establish connection to YARD server
|
||||
bzero( (char *)&srvAddr, sizeof(srvAddr));
|
||||
srvAddr.sun_family = AF_UNIX;
|
||||
strcpy(srvAddr.sun_path, sockpath);
|
||||
srvAddrLen = strlen(srvAddr.sun_path) + sizeof(srvAddr.sun_family);
|
||||
|
||||
p->fd = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||
if (p->fd < 0) {
|
||||
report(RPT_ERR, "%s: Can't create socket !", drvthis->name);
|
||||
return -1;
|
||||
}
|
||||
if (connect(p->fd, (struct sockaddr *)&srvAddr, srvAddrLen) < 0) {
|
||||
report(RPT_ERR, "%s: Can't connect to yardsrv !", drvthis->name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
//Get the config from yard2srvd. Config is not in LCDd.conf !
|
||||
sprintf(Recbuffer,"LCDPROC\0");
|
||||
byteCnt = write(p->fd,Recbuffer, strlen(Recbuffer));
|
||||
if (byteCnt < 0)
|
||||
{
|
||||
report(RPT_ERR, "%s: Can't send config request to YARD2 LCDserver !", drvthis->name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Wait for YARD server response
|
||||
byteCnt = read(p->fd, Recbuffer, sizeof(Recbuffer) );
|
||||
if (byteCnt < 0)
|
||||
{
|
||||
report(RPT_ERR, "%s: Cannot receive config from YARD server !", drvthis->name);
|
||||
return -1;
|
||||
}
|
||||
else if (byteCnt == 1)
|
||||
{
|
||||
report(RPT_ERR, "%s: YARD communication timeout !", drvthis->name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
//Receiveconfig format: 0='C';1=sizeX;2=sizeY;3=LCDType(0=HD44780,1=KS0066,2=T6963,3=KS0108)
|
||||
if(Recbuffer[0] == 'C') //C=Config
|
||||
{
|
||||
p->width = Recbuffer[1];
|
||||
p->height = Recbuffer[2];
|
||||
p->LCDtype = Recbuffer[3];
|
||||
}
|
||||
else
|
||||
{
|
||||
report(RPT_ERR, "%s: YARD Config Receive error !", drvthis->name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(p->LCDtype > 1) //only char LCDs are currently supported
|
||||
{
|
||||
report(RPT_ERR, "%s: YARD LCD type %d not supported by this version or the driver !", drvthis->name,p->LCDtype);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Allocate framebuf & Setup frame buffer x2 to be sure that the buffer is big enough
|
||||
p->framebuf = (unsigned char *) malloc((p->width * p->height)*2);
|
||||
if (p->framebuf == NULL)
|
||||
{
|
||||
report(RPT_ERR, "%s: Can't create framebuffer !", drvthis->name);
|
||||
return -1;
|
||||
}
|
||||
memset(p->framebuf, ' ', (p->width * p->height)*2);
|
||||
|
||||
/* not done yet
|
||||
// Init size and graphical size
|
||||
*/
|
||||
|
||||
/*
|
||||
// Init backlight-on brightness -> done by YARD2 normally in auto mode
|
||||
*/
|
||||
p->on_brightness = DEFAULT_ON_BRIGHTNESS;
|
||||
/*
|
||||
// Init backlight-off brightness -> done by YARD2 normally in auto mode
|
||||
*/
|
||||
tmp = DEFAULT_OFF_BRIGHTNESS;
|
||||
p->off_brightness = tmp;
|
||||
|
||||
|
||||
report(RPT_DEBUG, "%s: Init done", drvthis->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Closes down the driver
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
yard_close(Driver *drvthis)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 09 - Enter yard_close",drvthis->name);
|
||||
PrivateData *p = (PrivateData *)drvthis->private_data;
|
||||
|
||||
if (p != NULL) {
|
||||
close(p->fd);
|
||||
if (p->framebuf)
|
||||
free(p->framebuf);
|
||||
free(p);
|
||||
}
|
||||
|
||||
drvthis->store_private_ptr(drvthis, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the display width in characters
|
||||
*/
|
||||
MODULE_EXPORT int
|
||||
yard_width(Driver *drvthis)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 10 - Enter yard_width",drvthis->name);
|
||||
PrivateData *p = (PrivateData *)drvthis->private_data;
|
||||
|
||||
return p->width;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the display height in characters
|
||||
*/
|
||||
MODULE_EXPORT int
|
||||
yard_height(Driver *drvthis)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 11 - Enter yard_height",drvthis->name);
|
||||
PrivateData *p = (PrivateData *)drvthis->private_data;
|
||||
|
||||
return p->height;
|
||||
}
|
||||
|
||||
/*
|
||||
* Clears the framebuffer
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
yard_clear(Driver *drvthis)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 12 - Enter yard_clear",drvthis->name);
|
||||
PrivateData *p = (PrivateData *)drvthis->private_data;
|
||||
|
||||
// Reset custom char mode and clear frambuffer
|
||||
p->ccmode = standard;
|
||||
memset(p->framebuf, ' ', p->width * p->height);
|
||||
}
|
||||
|
||||
/*
|
||||
* Flushes a single frame to the LCD
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
yard_flush(Driver *drvthis)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 13 - Enter yard_flush",drvthis->name);
|
||||
PrivateData *p = (PrivateData *)drvthis->private_data;
|
||||
int i;
|
||||
int width, height;
|
||||
|
||||
switch (p->dispmode) {
|
||||
case Dmode_standard:
|
||||
{
|
||||
// Set width and height
|
||||
width = p->width;
|
||||
height = p->height;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 24 - Only Char. Mode supported: %d",drvthis->name,p->dispmode);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Send framebuffer content to LCD
|
||||
for (i = 0; i < height; i++)
|
||||
{
|
||||
// Line feed
|
||||
yard_hwGotoXY(drvthis, 1, i+1);
|
||||
|
||||
// Write single line
|
||||
yard_hwPrintCharArray(drvthis, &(p->framebuf[i*width]), width);
|
||||
debug(RPT_DEBUG, "YARD2: flushed line %d - chars %d", i,width);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Prints a string on the LCD
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
yard_string(Driver *drvthis, int x, int y, const char string[])
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 14 - Enter yard_string: X.%d - Y.%d - %s",drvthis->name,x,y,string);
|
||||
|
||||
PrivateData *p = (PrivateData *)drvthis->private_data;
|
||||
int i;
|
||||
|
||||
// Change display mode if necessary; Only char mode 0 is supported right now
|
||||
if (p->dispmode == Dmode_graphical)
|
||||
{
|
||||
yard_hwClearLCD(drvthis);
|
||||
p->dispmode = Dmode_standard;
|
||||
}
|
||||
|
||||
x--; //start with 0,0
|
||||
y--;
|
||||
|
||||
if ((y < 0) || (y >= p->height)) return;
|
||||
|
||||
|
||||
|
||||
for (i = 0; (string[i] != '\0') && (x < p->width); i++) //, x++)
|
||||
{
|
||||
if (x >= 0) // no write left of left border
|
||||
p->framebuf[(y * p->width) + x + i] = string[i];
|
||||
}
|
||||
|
||||
/*
|
||||
for (i = 0; string[i] != '\0'; i++)
|
||||
{
|
||||
// Check for buffer overflow
|
||||
if ( (y * p->width + x + i) >= (p->width * p->height) )
|
||||
break;
|
||||
p->framebuf[(y * p->width) + x + i] = string[i];
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
* Prints a single character on the LCD
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
yard_chr(Driver *drvthis, int x, int y, char c)
|
||||
{
|
||||
PrivateData *p = (PrivateData *)drvthis->private_data;
|
||||
debug(RPT_DEBUG, "%s: Event 15 - Enter yard_chr",drvthis->name);
|
||||
|
||||
// Error check
|
||||
if ( (x > p->width) || (y > p->height) )
|
||||
return;
|
||||
|
||||
// Change display mode if necessary
|
||||
if (p->dispmode == Dmode_graphical)
|
||||
{
|
||||
yard_hwClearLCD(drvthis);
|
||||
p->dispmode = 0;
|
||||
}
|
||||
|
||||
y--; //start with 0,0
|
||||
x--;
|
||||
p->framebuf[(y * p->width) + x ] = c;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the number of custom characters
|
||||
*/
|
||||
MODULE_EXPORT int
|
||||
yard_get_free_chars(Driver *drvthis)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 16 - Enter yard_get_free_chars",drvthis->name);
|
||||
return NUM_CUSTOMCHARS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets a custom character
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
yard_set_char(Driver *drvthis, int n, unsigned char *dat)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 17 - Enter yard_set_char: Nr.%d - %02X",drvthis->name,n,dat);
|
||||
|
||||
if ( (n < 0) || (n >= NUM_CUSTOMCHARS) )
|
||||
return;
|
||||
if (!dat)
|
||||
return;
|
||||
|
||||
yard_hwWriteCGRam(drvthis, n, dat);
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the width of a character in pixels
|
||||
*/
|
||||
MODULE_EXPORT int
|
||||
yard_cellwidth(Driver *drvthis)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 18 - Enter yard_cellwidth",drvthis->name);
|
||||
PrivateData *p = (PrivateData *)drvthis->private_data;
|
||||
|
||||
return p->cellwidth;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the height of a character in pixels
|
||||
*/
|
||||
MODULE_EXPORT int
|
||||
yard_cellheight(Driver *drvthis)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 19 - Enter yard_cellheight",drvthis->name);
|
||||
PrivateData *p = (PrivateData *)drvthis->private_data;
|
||||
|
||||
return p->cellheight;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reads brightness (in promille)
|
||||
*/
|
||||
MODULE_EXPORT int
|
||||
yard_get_brightness(Driver *drvthis, int state)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 20 - Enter yard_get_brightness: %d",drvthis->name,state);
|
||||
PrivateData *p = (PrivateData *)drvthis->private_data;
|
||||
|
||||
return (state == BACKLIGHT_ON) ? p->on_brightness : p->off_brightness;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets brightness (in promille)
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
yard_set_brightness(Driver *drvthis, int state, int promille)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 21 - Enter yard_set_brightness: %d - %d",drvthis->name,state,promille);
|
||||
PrivateData *p = (PrivateData *)drvthis->private_data;
|
||||
|
||||
// Error check
|
||||
if (promille < 0 || promille > 1000)
|
||||
return;
|
||||
|
||||
// Store values
|
||||
if (state == BACKLIGHT_ON) {
|
||||
p->on_brightness = promille;
|
||||
}
|
||||
else {
|
||||
p->off_brightness = promille;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the backlight on or off
|
||||
* The hardware supports any value between 0 and 255
|
||||
*/
|
||||
MODULE_EXPORT void
|
||||
yard_backlight(Driver *drvthis, int on)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 22 - Enter yard_backlight: %d",drvthis->name,on);
|
||||
PrivateData *p = (PrivateData *)drvthis->private_data;
|
||||
|
||||
int hardware_value = (on == BACKLIGHT_ON) ? p->on_brightness : p->off_brightness;
|
||||
|
||||
// Map range to hardware [0, 1000] -> [0, 255]
|
||||
hardware_value /= 4;
|
||||
if (hardware_value != p->hw_brightness)
|
||||
{
|
||||
// Send command and update private data
|
||||
yard_hwSetBrightness(drvthis, hardware_value);
|
||||
p->hw_brightness = (char)hardware_value;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Provides info about the driver
|
||||
*/
|
||||
MODULE_EXPORT const char *
|
||||
yard_get_info(Driver *drvthis)
|
||||
{
|
||||
debug(RPT_DEBUG, "%s: Event 23 - Enter yard_get_info",drvthis->name);
|
||||
PrivateData *p = (PrivateData *)drvthis->private_data;
|
||||
|
||||
strcpy(p->info, "Socket-based driver for Y.A.R.D.2 USB LCD");
|
||||
return p->info;
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2013 by R. Geigenberger *
|
||||
* *
|
||||
* *
|
||||
* 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 *
|
||||
* (at your option) 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., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
#ifndef yard2LCD_H
|
||||
#define yard2LCD_H
|
||||
|
||||
#define MAX_YARDDATA_SIZE 40
|
||||
#define DEFAULT_SOCK_PATH "/tmp/lcdserver"
|
||||
#define DEFAULT_OFF_BRIGHTNESS 100
|
||||
#define DEFAULT_ON_BRIGHTNESS 1000
|
||||
#define DEFAULT_WIDTH 16
|
||||
#define DEFAULT_HEIGHT 4
|
||||
#define DEFAULT_GWIDTH 64
|
||||
#define DEFAULT_GHEIGHT 32
|
||||
#define DEFAULT_CELLWIDTH 5
|
||||
#define DEFAULT_CELLHEIGHT 8
|
||||
#define DEFAULT_CELLWIDTH_BIG 10
|
||||
#define DEFAULT_CELLHEIGHT_BIG 14
|
||||
#define DEFAULT_HSPACE 2
|
||||
#define DEFAULT_VSPACE 1
|
||||
#define NUM_CUSTOMCHARS 8
|
||||
|
||||
|
||||
MODULE_EXPORT int yard_init (Driver *drvthis);
|
||||
MODULE_EXPORT void yard_close (Driver *drvthis);
|
||||
MODULE_EXPORT int yard_width (Driver *drvthis);
|
||||
MODULE_EXPORT int yard_height (Driver *drvthis);
|
||||
MODULE_EXPORT void yard_clear (Driver *drvthis);
|
||||
MODULE_EXPORT void yard_flush (Driver *drvthis);
|
||||
MODULE_EXPORT void yard_string (Driver *drvthis, int x, int y, const char string[]);
|
||||
MODULE_EXPORT void yard_chr (Driver *drvthis, int x, int y, char c);
|
||||
MODULE_EXPORT void yard_num(Driver *drvthis, int x, int num);
|
||||
MODULE_EXPORT void yard_set_char(Driver *drvthis, int n, unsigned char *dat);
|
||||
MODULE_EXPORT int yard_get_free_chars(Driver *drvthis);
|
||||
MODULE_EXPORT int yard_cellwidth (Driver *drvthis);
|
||||
MODULE_EXPORT int yard_cellheight (Driver *drvthis);
|
||||
MODULE_EXPORT int yard_get_brightness (Driver *drvthis, int state);
|
||||
MODULE_EXPORT void yard_set_brightness (Driver *drvthis, int state, int promille);
|
||||
MODULE_EXPORT void yard_backlight (Driver *drvthis, int on);
|
||||
MODULE_EXPORT const char * yard_get_info( Driver *drvthis );
|
||||
|
||||
|
||||
#endif
|
||||
+7
-1
@@ -310,6 +310,9 @@ render_string(Widget *w, int left, int top, int right, int bottom, int fy)
|
||||
|
||||
if ((w != NULL) && (w->text != NULL) &&
|
||||
(w->x > 0) && (w->y > 0) && (w->y > fy) && (w->y <= bottom - top)) {
|
||||
int length;
|
||||
char str[BUFSIZE];
|
||||
|
||||
/*
|
||||
* FIXME: Could be a bug here? w->x is recalculated (On first
|
||||
* call only? Is it preserved between calls?) and first
|
||||
@@ -317,7 +320,10 @@ render_string(Widget *w, int left, int top, int right, int bottom, int fy)
|
||||
* strings totally off-screen. Is this on purpose? (M. Dolze)
|
||||
*/
|
||||
w->x = min(w->x, right - left);
|
||||
drivers_string(w->x + left, w->y + top, w->text);
|
||||
length = min(right - left - w->x + 1, sizeof(str)-1);
|
||||
strncpy(str, w->text, length);
|
||||
str[length] = '\0';
|
||||
drivers_string(w->x + left, w->y + top, str);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user