wiki:serdisplib

Version 2 (modified by michael, 13 years ago) (diff)

--

serdisplib

This driver controls all displays supported by the serdisplib project.

For details about serdisplib itself, supported displays, connections and wiring, installation and so on go to the serdisplib project page.


Display Section

Display <name> {
    Driver     'serdisplib'
    Model      <string>
    Port       <string>
    Options    <string>
    Font       <string>
    Contrast   <number>
    Backlight  <0|1>
    Reverse    <0|1>
    Rotate     <0..3>
    Foreground <color>
    Background <color>
    Basecolor  <color>
}

Parameters:

Driver'serdisplib'
Modeldisplay model/driver for serdisplib, e.g. 'OPTREX323'
Portport where the display is connected in serdisplib notation, e.g. 'PAR:/dev/parports/0'
Optionsserdisplib options, e.g. 'WIRING=1;INVERT=YES'
Fontfont size, specified as <width>x<height> (only '5x8' and '6x8' supported at the moment)
Contrastinitial contrast value, 0..10
Backlightinitial backlight state, 0 (off) or 1 (on)
Reverseinitial display inversion, 0 (normal) or 1 (inverted)
Rotateinitial display rotation, 0 (0 normal) to 3 (270 degree)
Foregroundcolor of active pixels (RRGGBBAA or RRGGBB), default is opaque black '000000ff' (see colors for details)
Backgroundcolor of inactive pixels (RRGGBBAA or RRGGBB), default is transparent 'ffffff00' (see colors for details)
Basecolorcolor of virtual backlight (RRGGBB), default is white 'ffffff' (see colors for details)

Plugins:

The driver provides the following functions:

LCD::Contrast(n)sets the display contrast (0..10)
LCD::Backlight(n)sets the backlight state, 0 (off) or 1 (on)
LCD::Reverse(n)sets the display inversion, 0 (normal) or 1 (inverted)
LCD::Rotate(n)sets the rotation, 0 (0 normal) to 3 (270 degree)

Example

Display Optrex323 {
    Driver  'serdisplib'
    Model   'OPTREX323'
    Port    'PAR:/dev/parports/0'
    Options ''
}