wiki:SvnDisplayFramebuffer
Last modified 4 years ago Last modified on 05/20/13 21:14:18

disclaimer / info

THIS IS EXPERIMENTAL SOFTWARE AND HARDWARE. USE AT YOUR OWN RISK. THE MAINTAINER(S) OF THESE PAGES AND THE DEVELOPER(S) OF SOFTWARE AND HARDWARE PRESENTED ON THESE PAGES CAN NOT BE HELD LIABLE UNDER ANY CIRCUMSTANCES FOR DAMAGE TO HARDWARE OR SOFTWARE, LOST DATA, OR OTHER DIRECT OR INDIRECT DAMAGE RESULTING FROM THE USE OF THIS SOFTWARE OR HARDWARE. IF YOU DO NOT AGREE TO THESE CONDITIONS, YOU ARE NOT PERMITTED TO USE OR FURTHER DISTRIBUTE THIS SOFTWARE OR TO USE ANY TEMPLATES FOR BUILDING HARDWARE PRESENTED HERE.

  • this page deals with using a framebuffer device with serdisplib.
  • i'm not responsible for the content of external web pages
  • english is not my native language. please keep that in mind (corrections of english grammar and formulations are very welcome!)
  • use the most recent SVN trunk revision to test this driver

description

This driver supports framebuffer devices that are supported by linux framebuffer support. even an attached touchscreen may be used if it supported by linux.

Attention: this is a linux-only driver at the moment.

specifications

resolution variable
colours variable
adjustable contrast no
name in serdisplib "FRAMEBUFFER" (example: serdisp_open(sdcd, "FRAMEBUFFER", "");)
availability SVN trunk (2.x): yes
SVN 1.98.x branch: no
SVN 1.97.x branch: no

connecting the framebuffer device

intro

the framebuffer device must already be configured and initialised by linux - including resolution and colour depth.

important

  • the framebuffer device needs read/write-access for serdisplib
  • the touchscreen device needs read-only access for serdisplb
  • file-rights should be set using udev-rules (including a symlink for the touchscreen device)
  • the framebuffer device usually is something like /dev/fbX (X ... number of framebuffer)
  • the touchscreen device usually is an unpredictable input device (like /dev/input/input47) so it is best to let udev create a symlink

example for configuration of the touchscreen:

SUBSYSTEM=="input",ATTRS{idVendor}=="1ac7", ATTRS{idProduct}=="0001", GROUP="uucp",MODE="0660", SYMLINK+="input/touchscreen"
  • idVendor 1ac7 / idProduct 0001 is for an E2i touchscreen (this can be found for example in Mimo 720s USB monitors)
  • group should be changed according to ones needs
  • SYMLINK would create a symlink for the touchscreen device which can be accessed via /dev/input/touchscreen
  • this udev-rule should be called as late as possible (thus it should be placed in a rule like 99-somerules.rules)

examples

  • configuration in lcd4linux
     Display SerDispLib {
       Driver 'serdisplib'
       Model 'framebuffer'
       Options 'FBDEVICE=/dev/fb1;TOUCHDEVICE=/dev/input/touchscreen'
     } 
    
  • configuration in graphlcd
     [serdisp_framebuffer]
     Driver=serdisp
     Controller=framebuffer
     Options=FBDEVICE=/dev/fb0
    
     [mimo720s]
     Driver=serdisp
     Controller=framebuffer
     Options=FBDEVICE=/dev/fb1;TOUCHDEVICE=/dev/input/touchscreen;TOUCHSWAPY=1
    
  • calling test program testserdisp
      testserdisp -n framebuffer -o 'FBDEV=/dev/fb1'
      testserdisp -n framebuffer -o 'FBDEV=/dev/fb1;TOUCHDEVICE=/dev/input/touchscreen;TOUCHSWAPY=1;ROTATE=90'
    

passing options through serdisp_init():

intro

using the third parameter of serdisp_init(), driver specific options can be set.
common information about passing options can be found in a separate document.

examples:

  serdisp_init(sdcd, "FRAMEBUFFER", "FBDEV=/dev/fb1");
  serdisp_init(sdcd, "FRAMEBUFFER", "FBDEV=/dev/fb1;TOUCHDEVICE=/dev/input/touchscreen;TOUCHSWAPY=1;ROTATE=90");

additional options

identifier short remark default
FBDEVICE FBDEV set the framebuffer device /dev/fb0
REPORTDAMAGE DAMAGE report damage (0: no damage report, 1: automatic, 2: udlfb, 3: ugly (send '\n' after refresh) 1
TOUCHDEVICE TSDEV set the touchscreen device (none)
TOUCHSWAPX TSSWAPX swap x-asis of touchscreen 0
TOUCHSWAPY TSSWAPY swap y-asis of touchscreen 0

ranges, aliases

identifier range aliases
REPORTDAMAGE 0, 3 NONE=0,OFF=0,AUTO=1,UDLFB=2,UGLY=3
TOUCHSWAPX 0 - 1 OFF=0,ON=1,NO=0,YES=1
TOUCHSWAPY 0 - 1 OFF=0,ON=1,NO=0,YES=1

options for specific framebuffer devices

model touchscreen touchscreen options
Mimo 720s yes TOUCHSWAPY=1

history

  • 2013-05-19: first release of documentation