User`s manual
UC-7400-LX Plus User’s Manual Programmer’s Guide
5-11
Turns the LCM backlight off.
KeyPad
The device node is /dev/keypad. The key value is defined in moxadevice.h.
int ioctl(fd, IOCTL_KEYPAD_HAS_PRESS, int *flag);
Checks how many keys have been pressed. Argument 3 returns the number of pressed keys. 0
means no keys were pressed.
int ioctl(fd, IOCTL_KEYPAD_GET_KEY, int *key);
Gets the value of the last key that was pressed. This function only reads one key value for each
function call. The value of the key value is returned in argument 3.
Special Note
1. The UC-7400-LX Plus’s kernel will store the “pressed key history” in a buffer. The maximum
buffer size is 31 keys. If the buffer overflows, the first key of the 31 that was pressed will be
dropped, without sounding the buzzer.
2. Currently, the UC-7400-LX Plus does NOT support pressing more than 1 key at the same
time.
Make File Example
The following Makefile file example codes are copied from the Hello example on the
UC-7400-LX Plus CD-ROM.
CC = xscale_be-gcc
CPP = xscale_be-gcc
SOURCES = hello.c
OBJS = $(SOURCES:.c=.o)
all: hello
hello: $(OBJS)
$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
clean:
rm -f $(OBJS) hello core *.gdb