Remove comments from the code that are already part of docbook documentation. Pass through indent. Remove unused prototypes.
210 lines
6.2 KiB
Plaintext
210 lines
6.2 KiB
Plaintext
<sect1 id="ula200-howto">
|
|
<title>The ula200 Driver</title>
|
|
|
|
<sect2 id="ula200-general">
|
|
<title>General</title>
|
|
|
|
<para>
|
|
The ULA-200 (short for German <emphasis>USB-LCD-Ansteuerung</emphasis>),
|
|
manufactured and sold by <ulink url="http://www.elv.de">ELV</ulink>,
|
|
is a small board that connects a HD44780-compatible display to the computer
|
|
using the USB interface.
|
|
Additionally it provides 6 digital inputs that can be used for keys.
|
|
</para>
|
|
|
|
<para>
|
|
The <code>ula200</code> driver controls this board supporting the features:
|
|
|
|
<itemizedlist>
|
|
<listitem><para>display on a single-controller HD44780 display</para></listitem>
|
|
<listitem><para>standard icons (heart, checkbox)</para></listitem>
|
|
<listitem><para>backlight control</para></listitem>
|
|
<listitem><para>input buttons</para></listitem>
|
|
<listitem><para><emphasis>no</emphasis> horizontal or vertical bars</para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
|
<sect2 id="ula200-requirements">
|
|
<title>Requirements</title>
|
|
|
|
<para>
|
|
The driver uses <filename>libftdi</filename>, which again uses <filename>libusb</filename>
|
|
for communication with the device, so no kernel driver is needed on Linux, and the
|
|
driver can be used on other operating systems as well.
|
|
|
|
<note>
|
|
<para>
|
|
When using a <filename>libusb</filename> based driver like <code>IOWarrior</code>,
|
|
<application>LCDd</application> needs to be started as root.
|
|
</para>
|
|
</note>
|
|
|
|
<note>
|
|
<para>
|
|
On Linux, you have to take care that the <filename>ftdi_sio.ko</filename>
|
|
kernel module doesn't claim the ELV device.
|
|
If you didn't change the IDs in the kernel driver (<filename>ftdi_sio.c</filename>),
|
|
this should not matter.
|
|
</para>
|
|
</note>
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
|
<sect2 id="ula200-problems">
|
|
<title>Known problems</title>
|
|
|
|
<para>
|
|
Sometimes the display hangs (the ACK response is not received) on shutdown.
|
|
Reconnect the display in that case.
|
|
Please do the same if it hangs while starting up.
|
|
The latter only happens if it was not the first time <application>LCDd</application>
|
|
talked to the display.
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
|
<sect2 id="ula200-implementation-note">
|
|
<title>Implementation note</title>
|
|
<subtitle>(by the driver's author Bernhard Walle)</subtitle>
|
|
|
|
<para>
|
|
The ULA-200 talks a text protocol which allows to display text using a
|
|
high-level language, i.e.
|
|
<code>STX</code> <literal>s</literal> <replaceable>len</replaceable>
|
|
<replaceable>char0</replaceable> <replaceable>char1</replaceable> ... <code>ETX</code>.
|
|
It also allows low-level register access to the HD44780.
|
|
So in theory, it would be possible to write a connection type for the
|
|
<code>hd44780</code> driver and let the <code>hd44780</code> core do the rest.
|
|
I tried this. It was slow and didn't work with user-specific characters
|
|
(the hd44780 frequently changes this characters which seems to confuse the
|
|
microcontroller, at least I cannot explain why it didn't work, there was
|
|
garbage).
|
|
</para>
|
|
|
|
<para>
|
|
So I wrote a separate driver, the <code>ula200</code>, which uses
|
|
the high-level language and should work for displays with all sizes.
|
|
I only tested 20x4, so maybe for other sizes the positioning code may be adapted.
|
|
</para>
|
|
|
|
<para>
|
|
As I mentioned, there were problems with frequently changing the
|
|
user-definable characters.
|
|
I also tried to implement bar code in the <code>ula200</code> driver
|
|
with similar effects.
|
|
I gave it up because I don't need it personally and it can be done later.
|
|
However, standard icons are implemented.
|
|
The user-definable characters are set in startup and are not changed.
|
|
This works like a charm.
|
|
It is not possible to use character 0 with the high-level language
|
|
(or at least it isn't documented how to escape it).
|
|
It could be done with hd44780 code, but I replaced the character with
|
|
a standard character which looks good.
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
|
|
<!-- ## ELV ULA200 driver ## -->
|
|
<sect2 id="ula200-config">
|
|
<title>Configuration in LCDd.conf</title>
|
|
|
|
<sect3 id="ula200-config-section">
|
|
<title>[ula200]</title>
|
|
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term>
|
|
<property>Size</property> = ¶meters.size;
|
|
</term>
|
|
<listitem><para>
|
|
Select the LCD size [default: <literal>20x4</literal>]
|
|
</para></listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
<term>
|
|
<property>KeyMap_A</property> =
|
|
<parameter><replaceable>KEY</replaceable></parameter>
|
|
</term>
|
|
<term>
|
|
<property>KeyMap_B</property> =
|
|
<parameter><replaceable>KEY</replaceable></parameter>
|
|
</term>
|
|
<term>
|
|
<property>KeyMap_C</property> =
|
|
<parameter><replaceable>KEY</replaceable></parameter>
|
|
</term>
|
|
<term>
|
|
<property>KeyMap_D</property> =
|
|
<parameter><replaceable>KEY</replaceable></parameter>
|
|
</term>
|
|
<term>
|
|
<property>KeyMap_E</property> =
|
|
<parameter><replaceable>KEY</replaceable></parameter>
|
|
</term>
|
|
<term>
|
|
<property>KeyMap_F</property> =
|
|
<parameter><replaceable>KEY</replaceable></parameter>
|
|
</term>
|
|
<listitem><para>
|
|
If you have a non standard keypad you can associate any keystrings to keys.
|
|
There are 6 input keys in the ULA-200 hardware that generate characters
|
|
from '<literal>A</literal>' to '<literal>F</literal>'.
|
|
Legal values for <replaceable>KEY</replaceable> are <literal>Up</literal>,
|
|
<literal>Down</literal>, <literal>Left</literal>, <literal>Right</literal>,
|
|
<literal>Enter</literal> and <literal>Escape</literal>.
|
|
</para>
|
|
<para>
|
|
The following table lists the built-in default mapping hardcoded in the driver.
|
|
</para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<tbody>
|
|
<row>
|
|
<entry>KeyMap_A</entry>
|
|
<entry><literal>Up</literal></entry>
|
|
</row>
|
|
<row>
|
|
<entry>KeyMap_B</entry>
|
|
<entry><literal>Down</literal></entry>
|
|
</row>
|
|
<row>
|
|
<entry>KeyMap_C</entry>
|
|
<entry><literal>Left</literal></entry>
|
|
</row>
|
|
<row>
|
|
<entry>KeyMap_D</entry>
|
|
<entry><literal>Right</literal></entry>
|
|
</row>
|
|
<row>
|
|
<entry>KeyMap_E</entry>
|
|
<entry><literal>Enter</literal></entry>
|
|
</row>
|
|
<row>
|
|
<entry>KeyMap_F</entry>
|
|
<entry><literal>Escape</literal></entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
<para>
|
|
You may leave it unchanged if you have a standard keypad.
|
|
You can change it if you want to report other keystrings or have a non-standard keypad.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|