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 BACKLIGHT_ON
Type Constant Return Value Integer Description The name of a display property that controls the backlight on the monochrome display. Possible contents of this property are the booleans GUI_TRUE and GUI_FALSE. BACKLIGHT_ON is initialized to GUI_TRUE by Initialize_GUI. Usage Set_Property(GUI_DISPLAY,BACKLIGHT_ON,GUI_FALSE);
Library library.c
BATTERY_CURRENT
Type Constant Return Value Integer Description The name of a read-only battery property that contains the current draw from the battery in milliamps. Read_Battery must be called before reading this property to get the latest battery information. Usage Read_Battery(); // Get the latest battery information. Get_Property(GUI_BATTERY,BATTERY_CURRENT);
Library library.c
See Also Read_Battery
BATTERY_STATE
Type Constant Return Value Integer Description The name of a read-only battery property that contains the state of the battery. Possible contents of this property are NO_BATTERY, LOW_BATTERY, MEDIUM_BATTERY, and FULL_BATTERY. Read_Battery must be called before reading this property to get the latest battery information. Usage Read_Battery(); // Get the latest battery information. Get_Property(GUI_BATTERY,BATTERY_STATE);
Library library.c
See Also FULL_BATTERY, MEDIUM_BATTERY, LOW_BATTERY, NO_BATTERY, Read_Battery
BATTERY_VOLTAGE
Type Constant Return Value Integer Description The name of a read-only battery property that contains the voltage of the battery in millivolts. Read_Battery must be called before reading this property to get the latest battery information. Usage Read_Battery(); // Get the latest battery information. Get_Property(GUI_BATTERY,BATTERY_VOLTAGE);
Library library.c
See Also Read_Battery
BEEP_TIME
Type Constant Return Value Integer Description The name of a buzzer property that controls the length of time of a beep. The length of the BEEP_TIME is measured using the 16-bit free running counter accessible via the register named TCNT. The units of BEEP_TIME are in counts that are 2 microseconds long. The default BEEP_TIME is 2 milliseconds or 1000 counts. The range of BEEP_TIME is from 0 to 65535 or 0 to 131 milliseconds. For longer duration beeps, manually turn the buzzer on and off using the BUZZER_ON property. Usage Set_Property(GUI_BUZZER, BEEP_TIME, (ulong) 2000);
Library library.c
See Also BUZZER_ON BLOCK_ON_HOLD
Type Constant Return Value Integer Description The name of a key property that when set, disables the servicing of events when an action key is held down. Use this property for hold event procedurues that need to read, write, or modify GUI Toolkit properties. The final line of the hold event procedure must re-enable the servicing of events by setting the GUI_TOOLKIT property SERVICE_EVENTS to GUI_TRUE. The BLOCK_ON_HOLD property is set to GUI_FALSE when the action key is instantiated. Usage void Delete_Event_Procedure ( void ) { // The Delete Event Procedure code would go here. Delete_Character( textboxString );
// Reset SERVICE_EVENTS to GUI_TRUE to re-enable event servicing. // This should be the last thing done by the event procedure. Set_Property( GUI_TOOLKIT, SERVICE_EVENTS, GUI_TRUE); }
// We need to capture the addresses of the event procedures which are // used in Set_Property to set the event procedures of action keys. #include "begin_event_procedure_pointers.h"
xaddr (*delete_event_procedure_ptr)(void) = Delete_Event_Procedure;
#include "end_event_procedure_pointers.h"
// This is an example of a repeating action key. actionkeyDelete = New_Object ( ACTION_KEY ); Set_Property ( actionkeyDelete, BLOCK_ON_PRESS, GUI_TRUE ); Set_Property ( actionkeyDelete, BLOCK_ON_HOLD, GUI_TRUE ); Set_Property ( actionkeyDelete, PRESS_EVENT_PROCEDURE, (long) delete_event_procedure_ptr ); Set_Property ( actionkeyDelete, HOLD_EVENT_PROCEDURE, (long) delete_event_procedure_ptr ); // Assign the delete key to GUI_KEYPAD0, position 15 Insert_Key ( GUI_KEYPAD0, actionkeyDelete, 15);
Library library.c
See Also BLOCK_ON_PRESS, BLOCK_ON_RELEASE, SERVICE_EVENTS BLOCK_ON_PRESS
Type Constant Return Value Integer Description The name of a key property that when set, disables the servicing of events when an action key is pressed. Use this property for press event procedurues that need to read, write, or modify GUI Toolkit properties. The final line of the press event procedure must re-enable the servicing of events by setting the GUI_TOOLKIT property SERVICE_EVENTS to GUI_TRUE. The BLOCK_ON_PRESS property is set to GUI_FALSE when the action key is instantiated. Usage void Delete_Event_Procedure ( void ) { // The Delete Event Procedure code would go here. Delete_Character( textboxString );
// Reset SERVICE_EVENTS to GUI_TRUE to re-enable event servicing. // This should be the last thing done by the event procedure. Set_Property( GUI_TOOLKIT, SERVICE_EVENTS, GUI_TRUE); }
// We need to capture the addresses of the event procedures which are // used in Set_Property to set the event procedures of action keys. #include "begin_event_procedure_pointers.h"
xaddr (*delete_event_procedure_ptr)(void) = Delete_Event_Procedure;
#include "end_event_procedure_pointers.h"
// This is an example of a repeating action key. actionkeyDelete = New_Object ( ACTION_KEY ); Set_Property ( actionkeyDelete, BLOCK_ON_PRESS, GUI_TRUE ); Set_Property ( actionkeyDelete, BLOCK_ON_HOLD, GUI_TRUE ); Set_Property ( actionkeyDelete, PRESS_EVENT_PROCEDURE, (long) delete_event_procedure_ptr ); Set_Property ( actionkeyDelete, HOLD_EVENT_PROCEDURE, (long) delete_event_procedure_ptr ); // Assign the delete key to GUI_KEYPAD0, position 15 Insert_Key ( GUI_KEYPAD0, actionkeyDelete, 15);
Library library.c
See Also BLOCK_ON_HOLD, BLOCK_ON_RELEASE, SERVICE_EVENTS BLOCK_ON_RELEASE
Type Constant Return Value Integer Description The name of a key property that when set, disables the servicing of events until when an action key is released. Use this property for release event procedurues that need to read, write, or modify GUI Toolkit properties. The final line of the release event procedure must re-enable the servicing of events by setting the GUI_TOOLKIT property SERVICE_EVENTS to GUI_TRUE. The BLOCK_ON_RELEASE property is set to GUI_FALSE when the action key is instantiated. Usage Set_Property ( actionkeyDelete, BLOCK_ON_RELEASE, GUI_TRUE );
Library library.c
See Also BLOCK_ON_PRESS, BLOCK_ON_HOLD, SERVICE_EVENTS BORDER
Type Constant Return Value Integer Description The name of a textbox or plot property that draws or erases a one pixel border around the object. Possible contents of this property are the booleans GUI_TRUE and GUI_FALSE. BOARDER is initialized to GUI_FALSE when a plot or a textbox is instantiated. Usage Set_Property(textboxMessage, BORDER, GUI_TRUE);
Library library.c
BRIGHT_BACKLIGHT
Type Constant Return Value Integer Description The name of a display property that controls the brightness of the backlight once it is on. Possible contents of this property are the booleans GUI_TRUE and GUI_FALSE. BRIGHT_BACKLIGHT is initialized to GUI_FALSE by Initialize_GUI. Usage Set_Property(GUI_DISPLAY,BRIGHT_BACKLIGHT,GUI_TRUE);
Library library.c
BUFFER_SIZE
Type Constant Return Value Integer Description The name of a plot property that contains the size of the plot’s circular data buffer in bytes. The size of the buffer is limited by the amount of heap space of GUI Toolkit or 65,535, whatever is smaller. The size of the buffer must also be larger than or equal to the pixel width of the plot object. BUFFER_SIZE is initialized to 240 when a plot is instantiated. Usage Set_Property(plotVoltage, BUFFER_SIZE, (ulong) 300);
Library library.c
BUFFER_SIZE_OUT_OF_RANGE
Type Constant Return Value Integer Description The name of an error that indicates the size of a buffer for a plot object must be greater than or equal to the width of the plot in pixels. Usage Set_Property(plotVoltage, BUFFER_SIZE, (ulong) 200); if(Read_Error() == BUFFER_SIZE_OUT_OF_RANGE) { printf(“Buffer size must be >= plot width in pixels.\n”); Clear_Error(); }
Library library.c
void Buzz ( void )
Type Function Description A method that turns on the piezo electric buzzer for a certain length of time as specified by the BEEP_TIME property of the buzzer object. The default length is 2 milliseconds. Usage Buzz();
Library library.c
See Also BEEP_TIME BUZZER_ON
Type Constant Return Value Integer Description The name of a buzzer property used to control the buzzer. Possible contents of this property are the booleans GUI_TRUE and GUI_FALSE. BUZZER_ON is initialized to GUI_FALSE by Initialize_GUI. Usage Set_Property(GUI_BUZZER, BUZZER_ON, GUI_FALSE);
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