User`s manual

Table Of Contents
UC-7400-CE User’s Manual Programming Examples
5-9
/* write text to the LCM device at a specify coordinate
<hndl> the open handle
<buffer> text
<len> the length of the text
<lcm_x> and <lcm,_y> pointers to the coordinate of the starting position of the
text,
the function would output the ending coordinate of the text to these pointers.
This function returns the number of written bytes
*/
int mxlcm_write(HANDLE hndl, char *buffer, unsigned int len,
unsigned int *lcm_x, unsigned int *lcm_y);
/* close the handle */
void mxlcm_close(HANDLE hndl);
/* clear the LCM screen */
void mxlcm_clear(HANDLE hndl);
Example #5Function Keys
There are five programmable function keys available on the UC-7420-CE or UC-7410-CE
computer for your applications. You can press a specified function key to trigger another
application or switch your application among different operation modes.
An internal service is pre-installed and mimics key presses for your application. Your application
needs to register a key press with the service. Once the key press is detected, the service notifies
your application via a software interrupt. Your application can then operate on your logic. In the
application level, library mxdev.lib offers the following APIs.
#define FKEYHNDL(f) int f(void* param)
/* initialization */
int mxfkey_init(void);
/* stop */
void mxfkey_stop(void);
/* register an operation to a keypad
<key> a pointer to a string “F1”~”F5”
<cb> a callback function to be trigger when the associated keypad is pressed
<param> parameters that would be carried to the callback function
Return zero in success.
*/
int mxkey_register(char *key, FKEYHNDL ((*cb)), void *param);