Appendix d, Programming the lcm – Lanner FW-8895 User Manual

Page 42

Advertising
background image

38

Programming the LCM

Appendix D

Network Application Platforms

For USB and Serial Text or Graphic-based LCM

Jumper selection between text and graphic mode

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:
1. Extract source file:

#tar -xzvf lanner-serial-usb-lcm-version.tgz

2. Change directory to the extracted folder:

#cd lanner-serial-usb-lcm-vx

3. Type make to build source code:

#make

After compilation, the executable programs (usb_disp,

usb_key, ser_disp, ser_key) where disp denotes display

control 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:

1.

The OS supported by Lanner LCM function

include platforms based on Linux Kernel series

2.4.x and Linux Kernel series 2.6.x, FreeBSD 8.0,

and DOS.

2.

For information on installation on platforms

other than Linux, see \lanner-serial-usb-lcm-

v0.5\README and \lanner-serial-usb-lcm-v0.5\

dos-example\README

Install
To install, type the following command:
#mknod /dev/usb/hiddev0 c 180 96

Execution
This section contains sample executable programs that

you could test on your platform. It demonstrates some

useful functionality that the LCM provides.
Type the execution command:
# ./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
[-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
[-c cmd]: specify the command to be used.
[-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)

Advertising
This manual is related to the following products: