|
API Guide Home (Online version only) |
![]() |
00001 /******************************************************************************* 00002 * Copyright (c) 2004-2005 palmOne, Inc. or its subsidiaries. 00003 * All rights reserved. 00004 ******************************************************************************/ 00005 /** 00006 * @defgroup HWUtil Hardware Utility Library 00007 * @brief This library provides support for applications to control the state 00008 * of certain pieces of hardware on the device. 00009 * 00010 * This library currently allows the application to programmatically turn the 00011 * display on/off as well as controling the behavior of the LED light if available. 00012 * 00013 * @{ 00014 * @} 00015 */ 00016 /** 00017 * @ingroup HWUtil 00018 */ 00019 00020 /** 00021 * @file HardwareUtils68K.h 00022 * @version 1.0 00023 * @brief Public common header file to the Hardware Utilities Library used by 68K applications. 00024 * 00025 * This file contains the library constants and function prototypes for the library. 00026 * <hr> 00027 */ 00028 00029 #ifndef __HWUTILS68K_H__ 00030 #define __HWUTILS68K_H__ 00031 00032 #include <PalmTypes.h> 00033 #include <LibTraps.h> 00034 00035 /** 00036 * @name Library Constants 00037 * 00038 */ 00039 /*@{*/ 00040 #define kHWUtilsType sysFileTLibrary /**< */ 00041 #define kHWUtilsCreator 'HWut' /**< */ 00042 #define kHWUtilsName "HardwareUtils" /**< */ 00043 /*@}*/ 00044 00045 /** 00046 * @name Function Traps 00047 */ 00048 /*@{*/ 00049 #define kHWUtilsTrapOpen sysLibTrapOpen 00050 #define kHWUtilsTrapClose sysLibTrapClose 00051 #define kHWUtilsTrapBlinkLED (sysLibTrapCustom + 0) 00052 #define kHWUtilsTrapSetBlinkRate (sysLibTrapCustom + 1) 00053 #define kHWUtilsTrapEnableDisplay (sysLibTrapCustom + 2) 00054 #define kHWUtilsTrapGetDisplayState (sysLibTrapCustom + 3) 00055 /*@}*/ 00056 00057 #ifdef __cplusplus 00058 extern "C" { 00059 #endif 00060 00061 /** 00062 * @brief Standard library open routine 00063 * 00064 * @param refnum: IN: Library reference number 00065 * @return Error code. 00066 **/ 00067 Err HWUOpen(UInt16 refnum) 00068 SYS_TRAP(kHWUtilsTrapOpen); 00069 00070 /** 00071 * @brief Standard library close routine 00072 * 00073 * @param refnum: IN: Library reference number 00074 * @return Error code. 00075 **/ 00076 Err HWUClose(UInt16 refnum) 00077 SYS_TRAP(kHWUtilsTrapClose); 00078 00079 /** 00080 * @brief Set the LED blink state 00081 * 00082 * @param refnum: IN: Library reference number 00083 * @param b: IN: True if LED should be blinking. False otherwise. 00084 * @return Error code 00085 **/ 00086 Err HWUBlinkLED(UInt16 refnum, Boolean b) 00087 SYS_TRAP(kHWUtilsTrapBlinkLED); 00088 00089 /** 00090 * @brief Set the blink rate of the LED light 00091 * 00092 * @param refnum: IN: Library reference number 00093 * @param rate: IN: The rate at which the LED should blink. 00094 * @return Error code. 00095 **/ 00096 Err HWUSetBlinkRate(UInt16 refnum, UInt16 rate) 00097 SYS_TRAP(kHWUtilsTrapSetBlinkRate); 00098 00099 /** 00100 * @brief Set the state of the display 00101 * 00102 * @param refnum: IN: Library reference number 00103 * @param on: IN: True to enable display. False otherwise. 00104 * @return Error code. 00105 **/ 00106 Err HWUEnableDisplay(UInt16 refnum, Boolean on) 00107 SYS_TRAP(kHWUtilsTrapEnableDisplay); 00108 00109 /** 00110 * @brief Retrieve the current state of the display 00111 * 00112 * @param refnum: IN: Library reference number 00113 * @return True if the display is on. False otherwise. 00114 **/ 00115 Boolean HWUGetDisplayState(UInt16 refnum) 00116 SYS_TRAP(kHWUtilsTrapGetDisplayState); 00117 00118 #ifdef __cplusplus 00119 } 00120 #endif 00121 00122 #endif //__HWUTILS68K_H__ 00123
| Top | Palm Developer Network © 2004-2008, Palm, Inc. All rights reserved. Generated on Fri Jun 13 10:06:52 2008 for Palm API Guide |