The C Programmer’s Guide to the Mosaic HandheldTable of ContentsPART 1 GETTING STARTED Introduction. How to Use This Manual Chapter 1: Getting to Know Your Handheld Instrument Chapter 2: Powering Your Handheld PART 2 PROGRAMMING THE MOSAIC HANDHELD Chapter 4: The IDE: Writing, Compiling, Downloading and Debugging Programs Chapter 5: Making Effective Use of Memory Chapter 6: Real Time Programming Chapter 7: Failure and Run-Time Error Recovery Chapter 8: Programming the Graphical User Interface PART 3 COMMUNICATIONS, MEASUREMENT, AND CONTROL Chapter 9: Digital and Timer-Controlled I/O Chapter 11: Serial Communications Chapter 12: The Battery-Backed Real Time Clock Chapter 13: Customizing the Handheld's I/O PART 4: REFERENCE DATA |
Glossary A B C DF G H I K LM N P R S T UVWXY IMAGE
Type Constant Return Value Integer Description The name of a property of a graphic or font object that contains the address of the image data. The address of the image data is generated by the Mosaic’s Image Conversion Program and stored in the Image Header File. Usage Set_Property(graphicSTOP, IMAGE, STOP_BMP);
Library library.c
IMAGE_WIDTH_DATA
Type Constant Return Value Integer Description The name of a property of a font object that contains the address of the image width data or the array that contains the width in pixels of each character. The address of the image width data is generated by the Mosaic’s Image Conversion Program and stored in the Image Header File. Usage Set_Property(graphicSTOP, IMAGE_WIDTH_DATA, COMIC_SANS_8_DAT);
Library library.c
INT_DATA_ENTRY_EVENT_PROCEDURE
Type Constant Return Value Integer Description The name of a keypad property that contains the xcfa (extended code field address) of a user defined event procedure. The event procedure is called after an overloaded data entry key is pressed but before the intrakey timeout period is reached. The intrakey timeout period is set to a half a second and is not adjustable. The event procedure can not take or return any parameters, but it can modify variables. The INT_DATA_ENTRY_EVENT_PROCEDURE property is unitialized when Initialize_GUI is called.
Usage Set_Property ( GUI_KEYPAD0, INT_DATA_ENTRY_EVENT_PROCEDURE, (long) delete_event_procedure_ptr );
Library library.c
See Also DATA_ENTRY_EVENT_PROCEDURE IN_DISPLAY
Type Constant Return Value Integer Description The name of a screen property that indicates the location of the screen’s data buffer (where images are drawn into) is in the display controller. All GUI Toolkit screens have their data buffers located in the display controller. All other screens have their data buffers located in the GUI Heap. This property is read only. Possible contents of this property are the booleans GUI_TRUE and GUI_FALSE. Usage longFlag = Get_Property(GUI_SCREEN2, IN_DISPLAY);
Library library.c
void Initialize_Battery ( void )
Type Function Description A method that initializes the GUI battery object and starts the 8-bit A/D which is used to read the battery voltage and charger state. Initialize_Battery must be called before Read_Battery. Be sure to install the appropriate jumpers on the Motherboard to connect the A/D inputs to the battery and the charger. If all 8 Port E lines are required by an application, do not install the jumpers on the Motherboard and don’t call Initialize_Battery or Read_Battery. To monitor the battery and use the remaining Port E lines as digital or analog inputs, get the 8 bit A/D resource before reading and then release the resource when finished. Usage Initialize_Battery();
Library library.c
See Also Read_Battery void Initialize_GUI ( xaddr heap start, xaddr heap end )
Type Function Input Parameters heap_start A 32 bit number that specifies the starting location of the GUI Heap. The heap must reside at a valid RAM location. All GUI objects reside in the GUI heap. heap_end A 32 bit number that specifies the ending location of the GUI Heap. Description Initializes the GUI Toolkit by: setting up a heap for the GUI Toolkit; setting up and activating a task for the GUI Toolkit; and, configuring the display, GUI Screens, GUI Keypads, GUI Font, and pen objects. Initializes the timeslicer to 0 and then starts the timeslicer. Error checking is performed to assure that Initialize_GUI has not already been called. Calling any other GUI Toolkit method before calling Initialize_GUI will crash the Handheld Controller. Errors include: GUI_EXISTS. Usage Initialize_GUI( START_GUI_HEAP, END_GUI_HEAP);
Library library.c
void Insert_Key ( uint keypad, uint key, uint key_position )
Type Function Input Parameters keypad_object A 16 bit number that refers to the keypad object that we’re inserting the key into. key_object A 16 bit number that refers to the key object that will be inserted into the keypad. key_position A number from 0 to 15 or 20 to 34 that sets the position of the key object in the keypad. Description Inserts a key into a keypad at the specified position. There are four valid keypads, one for each GUI screen. The valid keypads are GUI_KEYPAD0, GUI_KEYPAD1, GUI_KEYPAD2, and GUI_KEYPAD3. Once a key is inserted into a keypad and the keypad’s screen is visible, the key will become active and will respond to presses. The locations of the valid key positions are shown in the following table. Table A‑1 The physical location of the valid key positions for a keypad.
Errors include: INVALID_KEY, KEY_POS_OUT_OF_RANGE, and INVALID_KEYPAD. Usage Insert_Key( GUI_KEYPAD0, actionkeyStop, 8);
Library library.c
See Also GUI_KEYPAD0, GUI_KEYPAD1, GUI_KEYPAD2, GUI_KEYPAD3, VISIBLE INVALID_FONT
Type Constant Return Value Integer Description The name of an error that indicates the font object associated with a textbox or the GUI Toolkit is not valid. Usage Set_Property(textboxMesg, TEXTBOX_FONT, (ulong) graphicStop); If (Read_Error() == INVALID_FONT) { printf(“Attempted to use an invalid font for textboxMesg.\n”); Clear_Error(); }
Library library.c
INVALID_IMAGE
Type Constant Return Value Integer Description The name of an error that indicates the address of the image data is not valid. Usage Set_Property(graphicStop, IMAGE, GUI_FALSE); If (Read_Error() == INVALID_IMAGE) { printf(“Image for graphicStop is not valid.\n”); Clear_Error(); }
Library library.c
INVALID_KEY
Type Constant Return Value Integer Description The name of an error that indicates the key reference is not valid. Usage Insert_Key(GUI_KEYPAD0, graphicStop, 8); If (Read_Error() == INVALID_KEY) { printf(“graphicStop is not a valid key object.\n”); Clear_Error(); }
Library library.c
INVALID_KEYPAD
Type Constant Return Value Integer Description The name of an error that indicates the keypad reference is not valid. Usage Insert_Key(GUI_SCREEN0, actionkeyStop, 8); If (Read_Error() == INVALID_KEYPAD) { printf(“GUI_SCREEN0 is not a valid keypad.\n”); Clear_Error(); }
Library library.c
INVALID_OBJECT
Type Constant Return Value Integer Description The name of an error that indicates the object reference is not valid. Usage Set_Property(invalidObj, IMAGE, STOP_BMP); If (Read_Error() == INVALID_OBJECT) { printf(“Attempted to set a property for an invalid object.\n”); Clear_Error(); }
Library library.c
INVALID_PLOT
Type Constant Return Value Integer Description The name of an error that indicates the plot object reference is not valid. Usage Add_Data(graphicStop, 14); If (Read_Error() == INVALID_PLOT) { printf(“Attempted to add data to an invalid plot object.\n”); Clear_Error(); }
Library library.c
INVALID_PROPERTY
Type Constant Return Value Integer Description The name of an error that indicates the property is not valid. Usage Set_Property(graphicStop, TEXTBOX_FONT, STOP_BMP); If (Read_Error() == INVALID_PROPERTY) { printf(“Attempted to set an invalid property for graphicStop.\n”); Clear_Error(); }
Library library.c
INVALID_SCREEN
Type Constant Return Value Integer Description The name of an error that indicates the screen object reference is not valid. Usage Load(invalidObj, graphicStop, 0, 0); If (Read_Error() == INVALID_SCREEN) { printf(“Attempted to load a graphic into an invalid screen.\n”); Clear_Error(); }
Library library.c
INVALID_SHIFT_VALUE
Type Constant Return Value Integer Description The name of an error that indicates the shift value is not SHIFT_UP, SHIFT_DOWN, or SHIFT_NEUTRAL. Usage Set_Property(GUI_KEYPAD0, SHIFT_STATE, GUI_TRUE); If (Read_Error() == INVALID_SHIFT_VALUE) { printf(“Invalid shift state value.\n”); Clear_Error(); }
Library library.c
INVALID_TEXTBOX
Type Constant Return Value Integer Description The name of an error that indicates the textbox object reference is not valid. Usage STRING_TO_TEXTBOX(graphicStop, “hello”); If (Read_Error() == INVALID_TEXTBOX) { printf(“Attempted to write a string into an invalid textbox.\n”); Clear_Error(); }
Library library.c
INVERT
Type Constant Return Value Integer Description The name of a textbox property that inverts the background and rendered text of a textbox. With the INVERT property set to true, the background pixels are turned on and the pixels that render the text are turned off. The INVERT property of a textbox is set to GUI_FALSE when the textbox is instantiated. Usage Set_Property(textboxString, INVERT, GUI_TRUE);
Library library.c
|
Home|Site Map|Products|Manuals|Resources|Order|About Us
Copyright (c) 2006 Mosaic Industries, Inc.
Your source for single board computers, embedded controllers, and operator interfaces for instruments and automation