API Guide Home (Online version only) |

# PalmLED.h

Go to the documentation of this file.

    00001 /******************************************************************************
    00002  * Copyright (c) 2005 palmOne, Inc. or its subsidiaries.
    00003  * All rights reserved.
    00004  *****************************************************************************/
    00005 /**
    00006  *@ingroup System
    00007  *
    00008  */
    00009
    00010 /**
    00011  * @file    PalmLED.h
    00012  * @version 1.0
    00013  *
    00014  * @brief Palm's Generic LED dirver
    00015  *
    00016  *    Pledlib.prc, version 1.0
    00017  *    This file contains the Generic LED driver defines. This driver is a standard
    00018  *    libr driver that supports the BT notificaiton led. the interface follows the
    00019  *    standard palm unser notification interface.
    00020  *
    00021  *    Future drivers will support multiple Led's.
    00022  *
    00023  * NOTE: Make sure to check the version number for this driver implementation.
    00024  *
    00025  *
    00026  * <hr>
    00027  */
    00028
    00029
    00030 #ifndef __PalmLED_H__
    00031 #define __PalmLED_H__
    00032
    00033
    00034 // Palm OS common definitions
    00035 #include <PalmTypes.h>
    00036 #include <ErrorBase.h>
    00037 #include <SystemMgr.h>
    00038
    00039
    00040 // To Define when building the library
    00041 // TODO: DO I need this???
    00042 //#if (CPU_TYPE != CPU_68K) || (defined BUILDING_CODECMGR_LIB)
    00043 //  #define CODECMGR_LIB_TRAP(trapNum)
    00044 //#else
    00045 //  #include <LibTraps.h>
    00046 //  #define CODECMGR_LIB_TRAP(trapNum)  SYS_TRAP(trapNum)
    00047 //#endif
    00048
    00049 /**
    00050  * @name Type and creator of the Library
    00051  *
    00052  */
    00053 /*@{*/
    00054 #define kPalmLedName            "PalmLed"       /**<        */
    00055 #define kPalmLedType            sysFileTLibrary     /**<        */
    00056 #define kPalmLedCreator         'Pled'          /**<        */
    00057 #define kPalmLedModule          195         /**<        */
    00058 /*@}*/
    00059
    00060 /**
    00061  * @name Library version
    00062  *
    00063  */
    00064 /*@{*/
    00065 #define kPalmLedVersion1        sysMakeROMVersion(1, 0, 0, sysROMStageRelease, 0)   /**<        */
    00066 #define kPalmLedVersion         kPalmLedVersion1                    /**<        */
    00067 /*@}*/
    00068
    00069 /**
    00070  * @name Standard library functions
    00071  *
    00072  */
    00073 /*@{*/
    00074 #define kPalmLedTrapGetAttributes   (sysLibTrapCustom+0)    /**<        */
    00075 #define kPalmLedTrapSetAttributes   (sysLibTrapCustom+1)    /**<        */
    00076 /*@}*/
    00077
    00078
    00079 /**
    00080  * @name Get/Set Attribute
    00081  *
    00082  */
    00083 /*@{*/
    00084 #define kHALLEDPropertyUnderSleep   10
    00085     /**
    00086      * dataP points to a UInt32 that indicates how flexible the LED during Sleep is, as follows:
    00087      **/
    00088     #define kHALLEDPropertySleepOn          1       /**< bit 0 - ON during sleep */
    00089     #define kHALLEDPropertySleepPattern     2       /**< bit 1 - pattern on */
    00090     #define kHALLEDPropertySleepReserve     4       /**< bit 2 - reserve */
    00091     #define kHALLEDPropertySleepColorRed        8       /**< bit 3 - red */
    00092     #define kHALLEDPropertySleepColorGreen      0x10        /**< bit 4 - green */
    00093     #define kHALLEDPropertySleepColorBlue       0x20        /**< bit 5 - blue */
    00094     #define kHALLEDPropertySleepColorAmberWhite 0x40        /**< bit 6 - amber/white */
    00095                                     /**< bit 7-31 reserved */
    00096
    00097 #define kHALLEDCapcityUnderSleep    11
    00098     /**
    00099      * dataP points to a UInt32 that indicates how flexible the LED during Sleep is, as follows:
    00100      **/
    00101     #define kHALLEDCapcitySleepOn           1   /**< bit 0  ON during Sleep available */
    00102     #define kHALLEDCapcitySleepPattern      2   /**< bit 1  pattern when sleep available. */
    00103     #define kHALLEDCapcitySleepPatternSetting   4   /**< bit 2  pattern setting available */
    00104     #define kHALLEDCapcitySleepMultiColor       8   /**< bit 3  multi-color available */
    00105                                 /**< bit 4-31   reserved */
    00106 /*@}*/
    00107
    00108 /***********************************************************************
    00109  * Error codes
    00110  ***********************************************************************/
    00111
    00112 // TBD
    00113
    00114 /******************************************************************
    00115  * Constants and Types
    00116  ******************************************************************/
    00117
    00118  // Iterator used by CodecSupportedFormatEnumerate
    00119
    00120
    00121 /***********************************************************************
    00122  * Library trap
    00123  ***********************************************************************/
    00124
    00125
    00126
    00127 /***********************************************************************
    00128  * Generic Led driver defines
    00129  ***********************************************************************/
    00130
    00131
    00132 /***********************************************************************
    00133  * API Prototypes
    00134  ***********************************************************************/
    00135
    00136 #ifdef __cplusplus
    00137 extern "C" {
    00138 #endif
    00139
    00140 #if (CPU_TYPE != CPU_68K) || (defined BUILDING_PALMLED_LIB)
    00141 #include <Emul68K.h>
    00142
    00143
    00144
    00145 /**
    00146  * @brief 68K Glue Code
    00147  *
    00148  * @param emulStateP:   IN:
    00149  * @param *libEntryP:   IN:
    00150  * @param trapValue:    IN:
    00151  * @retval Err error code.
    00152  **/
    00153 Err LibDispatch68K(EmulStateRef emulStateP, LibTblEntry68KType *libEntryP, UInt32 trapValue);
    00154
    00155
    00156 #else
    00157
    00158
    00159 /**
    00160  * @brief Standard library function
    00161  *
    00162  * @param refnum:   IN:
    00163  * @retval Err error code.
    00164  **/
    00165 Err PalmLedOpen(UInt16 refnum)
    00166         SYS_TRAP(sysLibTrapOpen);
    00167
    00168 /**
    00169  * @brief Standard library function
    00170  *
    00171  * @param refnum:   IN:
    00172  * @retval Err error code.
    00173  **/
    00174 Err PalmLedClose(UInt16 refnum)
    00175         SYS_TRAP(sysLibTrapClose);
    00176
    00177 /**
    00178  * @brief Standard library function
    00179  *
    00180  * @param refnum:   IN:
    00181  * @retval Err error code.
    00182  **/
    00183 Err PalmLedSleep(UInt16 refnum)
    00184         SYS_TRAP(sysLibTrapSleep);
    00185
    00186 /**
    00187  * @brief Standard library function
    00188  *
    00189  * @param refnum:   IN:
    00190  * @retval Err error code.
    00191  **/
    00192 Err PalmLedWake(UInt16 refnum)
    00193         SYS_TRAP(sysLibTrapWake);
    00194
    00195 /**
    00196  * @brief Standard library function
    00197  *
    00198  * @param refnum:   IN:
    00199  * @param attr:     IN:
    00200  * @param dataP:    IN:
    00201  * @retval Err error code.
    00202  **/
    00203 Err HALAttnGetPalmLedAttributes(UInt16 refnum, UInt32 attr, void* dataP)
    00204         SYS_TRAP(kPalmLedTrapGetAttributes);
    00205
    00206 /**
    00207  * @brief Standard library function
    00208  *
    00209  * @param refnum:   IN:
    00210  * @param attr:     IN:
    00211  * @param dataP:    IN:
    00212  * @retval Err error code.
    00213  **/
    00214 Err HALAttnSetPalmLedAttributes(UInt16 refnum, UInt32 attr, void* dataP)
    00215         SYS_TRAP(kPalmLedTrapSetAttributes);
    00216
    00217
    00218 #endif // IF(CPU...
    00219
    00220 #ifdef __cplusplus
    00221 }
    00222 #endif
    00223
    00224 #endif // __PalmLED_H__

Top | Palm Developer Network © 2004-2008, Palm, Inc. All rights reserved. Generated on Fri Jun 13 10:06:54 2008 for Palm API Guide