Appendix c, Appendix c: programming the lcm, Programming the lcm – Lanner FW-8893C User Manual
Page 41

36
Programming the LCM
Appendix C
Network Application Platforms
Appendix C:
Programming the LCM
The LCD panel module (LCM) is designed to provide real-
time operating status and configuration information for
the system. For sample LCM code, see LCM foler on the
Driver and Manual CD. The driver and the program library
can also be found in the folder.
The system support USB LCM. The LCM connects to the
motherboard’s USB LCM port.
Jumper Selection for USB and Serial Text or Graphic-
based LCM
Text LCM
1 1 0
J6
J7
J8
Graphic
LCM
1 1 1
J6
J7
J8
Build
To build program source code on Linux platform, use the
following steps as a guideline:
Extract source file:
1.
#tar -xzvf lanner-serial-usb-lcm-version.tgz
Change directory to the extracted folder
2.
#cd lanner-serial-usb-lcm-vx
Type make to build source code:
3.
#make
After compilation, the executable programs (usb_disp,
usb_key, ser_disp, ser_key) where disp denotes the control
of display and key denotes the keypad input function and
usb and ser denote USB and serial interfaces respectively
will appear in the program’s folder.
Note: The OS supported by Lanner LCM function
include platforms based on Linux Kernel series
2.4.x and Linux Kernel series 2.6.x.
Install
#mknod /dev/usb/hiddev0 c 180 96
Note:
The OS supported by Lanner LCM function
1.
include platforms based on Linux Kernel series
2.4.x and Linux Kernel series 2.6.x, FreeBSD 8.0,
and DOS.
For information on installation on platforms
2.
other than Linux, see \lanner-serial-usb-lcm-
v0.5\README and \lanner-serial-usb-lcm-v0.5\
dos-example\ README
Execution
# ./ser_disp or ./usb_disp
Options:
[-I] | [-o XXXXX] | [ [-b YYYYY] | [-f ttyS_No] | [-d filename] |
[-g filename] | [-c cmd] | [-0 arg0] [-1 arg1]... [-h]
[-I]: Identify LCM information and get flash setting
[-o XXXXX]: to override default baud rate
valid values are: 9600, 19200, 38400, 57600, 115200
[-b YYYYY]: to change the baud rate
valid values are: 9600, 19200, 115200
[-f ttyS_No]: assign the keypad device used as ttySNO
[-d filename]: to display the specified file on Text LCD
[-g filename]: to display the specified file on Graphic
LCD
[-0 arg0]: data[0]
[-1 arg1]: data[1]
[-2 arg2]: data[2]
[-3 arg3]: data[3]
[-4 arg4]: data[4]
[-v]: be verbose
[-h]: this help
#./ser_key or ./usb_key
The keypad function test program will not detect the
keypad device; therefore, you should assign it with the
[-f] option (the default is /dev/ttyS0 or /dev/usb/hiddev0)