manufacturer of I/O-rich SBCs, operator interfaces, handheld instruments, and development tools for embedded control low cost single board computers, embedded controllers, and operator interfaces for scientific instruments & industrial control development tools for embedded control order our low cost I/O-rich embedded control products embedded controller manufacturer profile single board computers & embedded controllers development tools & starter kits for your embedded design operator interfaces with touchscreens and graphical user interface plug-in expansion modules for digital & analog I/O C language & Forth language integrated development tools, IDE single board and embedded computer accessories embedded controller enclosures, bezels, environmental gaskets

The C Programmer’s Guide to the Mosaic Handheld

Table of Contents

PART 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 3: Your First Program

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 10: Data Acquisition

Chapter 11: Serial Communications

Chapter 12: The Battery-Backed Real Time Clock

Chapter 13: Customizing the Handheld's I/O

PART 4: REFERENCE DATA

Appendix A: GUI Function Reference

Appendix B: Handheld Schematics

Glossary

<< Previous | Next >>

A     B     C     DF    G     H     I     K     LM    N     P     R     S    T    UVWXY   

uint New_Object ( uint object_type )

New_Object( u1 – u2 | u1 = object type, u2 = object reference )

Type

Function

Input Parameters

object_type        A 16 bit number that refers to an object type.  Valid object types are GRAPHIC, FONT, TEXTBOX, ACTION_KEY, DATA_ENTRY_KEY, SHIFT_KEYPLOT, and SCREEN.

Return Value

A 16 bit number that refers to the newly created object. This number should be stored into an object reference variable which can later be used to set the properties of the object, get the properties of the object, load the object into a screen, or unload the object from a screen.

Description

A method that creates new objects.  Errors include: HEAP_FULL and INVALID_OBJECT.

Usage

graphicStop = New_Object( GRAPHIC );

GRAPHIC New_Object graphicStop !

Library

library.c

library.4th

NO_BATTERY

NO_BATTERY

Type

Constant

Return Value

Long

Description

The name of a value of the BATTERY_STATE property of the GUI_BATTERY object that indicates the batteries are not present.

Usage

If ( Get_Property ( GUI_BATTERY, BATTERY_STATE ) == NO_BATTERY )

{

  printf(“There are no batteries.\n”);

}

GUI_BATTERY BATTERY_STATE Get_Property NO_BATTERY d=

if

  cr .” There are no batteries.”

endif

Library

library.c

library.4th

See Also

BATTERY_STATE, GUI_BATTERY, FULL_BATTERY, LOW_BATTERY, MEDIUM_BATTERY

NO_ERROR

NO_ERROR

Type

Constant

Return Value

Integer

Description

The name of a constant that indicates there was no error.

Usage

Initialize_GUI(START_GUI_HEAP, END_GUI_HEAP);

If(Read_Error() == NO_ERROR)

{

  printf(“No error was found.\n”);

}

START_GUI_HEAP END_GUI_HEAP Initialize_GUI

Read_Error NO_ERROR =

if

  cr .” No error was found.”

endif

Library

library.c

library.4th

NO_EVENT

NO_EVENT

Type

Constant

Return Value

Long

Description

The name of a value of the keypad property KEY_EVENT and PRIOR_KEY_EVENT that indicates there was no event.

Usage

If(Get_Property(GUI_KEYPAD0, KEY_EVENT)==NO_EVENT)

{

  printf(“There was no event.\n”);

}

GUI_KEYPAD0 KEY_EVENT Get_Property NO_EVENT d=

if

  cr .” There was no event.”

endif

Library

library.c

library.4th

See Also

PRESS_EVENT, HOLD_EVENT, RELEASE_EVENT

NO_KEY

NO_KEY

Type

Constant

Return Value

Integer

Description

The name of a value of the keypad property KEY_TYPE and PRIOR_KEY_TYPE that indicates there was no key that was pressed.

Usage

If(Get_Property(GUI_KEYPAD0, KEY_TYPE)==NO_KEY)

{

  printf(“No key was pressed.\n”);

}

GUI_KEYPAD0 KEY_TYPE Get_Property d>s NO_KEY =

if

  cr .” No key was pressed.”

endif

Library

library.c

library.4th

See Also

KEY_TYPE, PRIOR_KEY_TYPE

NUM_OBJECTS

NUM_OBJECTS

Type

Constant

Return Value

Integer

Description

The name of a screen property that contains the number of objects currently loaded into a screen.  This property is read only.

Usage

longNumObjects = Get_Property(GUI_SCREEN0, NUM_OBJECTS);

GUI_SCREEN0 NUM_OBJECTS Get_Property numObjects 2!

Library

library.c

library.4th

NUM_SHIFT_DOWN_VALUES

NUM_SHIFT_DOWN_VALUES

Type

Constant

Return Value

Integer

Description

The name of a read only data entry key property that contains the number of key codes currently associated with the key when the SHIFT_STATE equals to SHIFT_DOWN. NUM_SHIFT_DOWN_VALUES is automatically incremented when a key code is associated with a shift down value property of a data entry key.

Usage

longNumValues = Get_Property(dataentrykey0, NUM_SHIFT_DOWN_VALUES);

dataentrykey0 NUM_SHIFT_DOWN_VALUES Get_Property numValues 2!

Library

library.c

library.4th

See Also

NUM_SHIFT_UP_VALUES, SHIFT_DOWN, SHIFT_STATE

NUM_SHIFT_UP_VALUES

NUM_SHIFT_UP_VALUES

Type

Constant

Return Value

Integer

Description

The name of a read only data entry key property that contains the number of key codes currently associated with the key when the SHIFT_STATE equals to SHIFT_UPNUM_SHIFT_UP_VALUES is automatically incremented when a key code is associated with a shift up value property of a data entry key.

Usage

longNumValues = Get_Property(dataentrykey0, NUM_SHIFT_UP_VALUES);

dataentrykey0 NUM_SHIFT_UP_VALUES Get_Property numValues 2!

Library

library.c

library.4th

See Also

NUM_SHIFT_DOWN_VALUES, SHIFT_STATE, SHIFT_UP

<< Previous | Next >>


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